ARM: footbridge: remove custom DMA address handling
authorArnd Bergmann <arnd@arndb.de>
Thu, 25 Aug 2022 08:51:42 +0000 (10:51 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 15 Sep 2022 13:59:16 +0000 (15:59 +0200)
commitbe7f3f901c619e24c93b8044c074306feedd8ee9
treeab75c282a3d657d40bd3a15d3fb81057cafba8ee
parente7536617baec3b4717a37795cec306df9d655d07
ARM: footbridge: remove custom DMA address handling

Footbridge is the last Arm platform that has its own
__virt_to_bus()/__bus_to_virt()/phys_to_dma()/dma_to_phys() abstraction,
but this is just a simple offset now.

For PCI devices, the offset that is programmed into the PCI bridge must
also be set in each device using dma_direct_set_offset().  As Arm does
not have a pcibios_bus_add_device() helper yet, just use a bus notifier
for this.

For the ISA DMA, drivers now pass a non-translated physical address into
set_dma_addr(), so they have to be converted back with the corresponding
isa_bus_to_virt() function and then into the correct bus address with
the offset using the isa_dma_dev.

Tested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/include/asm/dma-direct.h [deleted file]
arch/arm/include/asm/dma.h
arch/arm/include/asm/hardware/dec21285.h
arch/arm/include/asm/memory.h
arch/arm/mach-footbridge/Kconfig
arch/arm/mach-footbridge/common.c
arch/arm/mach-footbridge/dc21285.c
arch/arm/mach-footbridge/dma-isa.c
arch/arm/mach-footbridge/include/mach/dma-direct.h [deleted file]
arch/arm/mach-footbridge/include/mach/memory.h