• Thomas Petazzoni's avatar
    arch/sh: pcie-sh7786: handle non-zero DMA offset · bf9c7e3d
    Thomas Petazzoni authored
    On SuperH, the base of the physical memory might be different from
    zero. In this case, PCI address zero will map to a non-zero physical
    address. In order to make sure that the DMA mapping API takes care of
    this DMA offset, we must fill in the dev->dma_pfn_offset field for PCI
    devices. This gets done in the pcibios_bus_add_device() hook, called
    for each new PCI device detected.
    
    The dma_pfn_offset global variable is re-calculated for every PCI
    controller available on the platform, but that's not an issue because
    its value will each time be exactly the same, as it only depends on
    the memory start address and memory size.
    Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Signed-off-by: default avatarRich Felker <dalias@libc.org>
    bf9c7e3d
pcie-sh7786.c 14.8 KB