[PATCH net-next v7 03/14] net: microchip: fdma: add PCIe ATU support

Simon Horman horms at kernel.org
Wed Sep 23 01:51:07 PDT 2026


On Fri, Sep 18, 2026 at 01:33:55PM +0200, Daniel Machon wrote:
> When lan966x or lan969x operates as a PCIe endpoint, the internal FDMA
> engine cannot directly access host memory. Instead, DMA addresses must
> be translated through the PCIe Address Translation Unit (ATU). The ATU
> provides outbound windows that map internal addresses to PCIe bus
> addresses.
> 
> The ATU outbound address space (0x10000000-0x1fffffff) is divided into
> six equally-sized regions (~42MB each). When FDMA buffers are allocated,
> a free ATU region is claimed and programmed with the DMA target address.
> The FDMA engine then uses the region's base address in its descriptors,
> and the ATU translates these to the actual DMA addresses on the PCIe bus.
> 
> Add the required functions and helpers that combine the DMA allocation
> with the ATU region mapping. These are used by the lan966x PCIe FDMA
> path.
> 
> The ATU cannot express a limit finer than its 64KB region granularity,
> so pad the mapped allocation to that boundary; otherwise the outbound
> window would extend past the memory the host allocated for DMA.
> 
> This implementation will also be used by the lan969x, when PCIe FDMA is
> added for that platform in the future.
> 
> Tested-by: Herve Codina <herve.codina at bootlin.com>
> Signed-off-by: Daniel Machon <daniel.machon at microchip.com>

Reviewed-by: Simon Horman <horms at kernel.org>




More information about the linux-arm-kernel mailing list