[U-Boot] [PATCH v1 16/41] net: mvpp2: adjust the allocation/free of BM pools for PPv2.2

Joe Hershberger joe.hershberger at gmail.com
Tue Mar 21 17:18:40 UTC 2017


On Tue, Mar 21, 2017 at 9:27 AM, Stefan Roese <sr at denx.de> wrote:
> From: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>
> This commit adjusts the allocation and freeing of BM pools to support
> PPv2.2. This involves:
>
> - Checking that the number of buffer pointers is a multiple of 16, as
>   required by the hardware.
>
> - Adjusting the size of the DMA coherent area allocated for buffer
>   pointers. Indeed, PPv2.2 needs space for 2 pointers of 64-bits per
>   buffer, as opposed to 2 pointers of 32-bits per buffer in
>   PPv2.1. The size in bytes is now stored in a new field of the
>   mvpp2_bm_pool structure.
>
> - On PPv2.2, getting the physical and virtual address of each buffer
>   requires reading the MVPP2_BM_ADDR_HIGH_ALLOC to get the high order
>   bits of those addresses. A new utility function
>   mvpp2_bm_bufs_get_addrs() is introduced to handle this.
>
> - On PPv2.2, releasing a buffer requires writing the high order 32 bits
>   of the physical address to MVPP2_BM_PHY_VIRT_HIGH_RLS_REG. We no
>   longer need to write the virtual address to MVPP2_BM_VIRT_RLS_REG.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> Signed-off-by: Stefan Roese <sr at denx.de>

Acked-by: Joe Hershberger <joe.hershberger at ni.com>


More information about the U-Boot mailing list