summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-footbridge/common.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-08-25 10:51:42 +0200
committerArnd Bergmann <arnd@arndb.de>2022-09-15 15:59:16 +0200
commitbe7f3f901c619e24c93b8044c074306feedd8ee9 (patch)
treeab75c282a3d657d40bd3a15d3fb81057cafba8ee /arch/arm/mach-footbridge/common.c
parente7536617baec3b4717a37795cec306df9d655d07 (diff)
downloadlinux-be7f3f901c619e24c93b8044c074306feedd8ee9.tar.bz2
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>
Diffstat (limited to 'arch/arm/mach-footbridge/common.c')
-rw-r--r--arch/arm/mach-footbridge/common.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index 9483eccea5ae..629e4676ed77 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -281,13 +281,3 @@ void footbridge_restart(enum reboot_mode mode, const char *cmd)
*CSR_SA110_CNTL |= (1 << 13);
}
}
-
-dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)
-{
- return paddr + (BUS_OFFSET - PHYS_OFFSET);
-}
-
-phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
-{
- return dev_addr - (BUS_OFFSET - PHYS_OFFSET);
-}