diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-12 09:53:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-13 11:33:19 -0500 |
commit | c7baab5d1e97437a2fca63b71d467f193dbebb02 (patch) | |
tree | 227c8a1ffb2465035c1fd4466301d1bf5617892a /arch/arm/mach-ixp23xx | |
parent | 0d782dc430d94dc36b47cb11c2e33ecb1bb38234 (diff) |
ARM: fix clps711x, footbridge, integrator, ixp2000, ixp2300 and s3c build bug
Anders Grafström reports that footbridge fails to build after 1c4a4f4.
Fix this by adding the necessary definitions for __pfn_to_bus and
__bus_to_pfn.
Reported-by: Anders Grafström <anders.grafstrom@netinsight.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp23xx')
-rw-r--r-- | arch/arm/mach-ixp23xx/include/mach/memory.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h index fdd138706c70..94a3a86cfeb8 100644 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h | |||
@@ -19,16 +19,15 @@ | |||
19 | */ | 19 | */ |
20 | #define PHYS_OFFSET (0x00000000) | 20 | #define PHYS_OFFSET (0x00000000) |
21 | 21 | ||
22 | #define __virt_to_bus(v) \ | 22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)) |
23 | ({ unsigned int ret; \ | 23 | |
24 | ret = ((__virt_to_phys(v) - 0x00000000) + \ | 24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
25 | (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)); \ | 25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
26 | ret; }) | 26 | |
27 | 27 | #define __virt_to_bus(v) __phys_to_bus(__virt_to_phys(v)) | |
28 | #define __bus_to_virt(b) \ | 28 | #define __bus_to_virt(b) __phys_to_virt(__bus_to_phys(b)) |
29 | ({ unsigned int data; \ | 29 | #define __pfn_to_bus(p) __phys_to_bus(__pfn_to_phys(p)) |
30 | data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \ | 30 | #define __bus_to_pfn(b) __phys_to_pfn(__bus_to_phys(b)) |
31 | __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); }) | ||
32 | 31 | ||
33 | #define arch_is_coherent() 1 | 32 | #define arch_is_coherent() 1 |
34 | 33 | ||