From be7f3f901c619e24c93b8044c074306feedd8ee9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 25 Aug 2022 10:51:42 +0200 Subject: 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 Signed-off-by: Arnd Bergmann --- arch/arm/mach-footbridge/include/mach/memory.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch/arm/mach-footbridge/include/mach/memory.h') diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h index 8f0ca8e8b37e..9516877667d7 100644 --- a/arch/arm/mach-footbridge/include/mach/memory.h +++ b/arch/arm/mach-footbridge/include/mach/memory.h @@ -16,15 +16,6 @@ #ifndef __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H -/* - * The footbridge is programmed to expose the system RAM at 0xe0000000. - * The requirement is that the RAM isn't placed at bus address 0, which - * would clash with VGA cards. - */ -#define BUS_OFFSET 0xe0000000 -#define __virt_to_bus(x) ((x) + (BUS_OFFSET - PAGE_OFFSET)) -#define __bus_to_virt(x) ((x) - (BUS_OFFSET - PAGE_OFFSET)) - /* * Cache flushing area. */ -- cgit