diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2014-07-23 15:37:43 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-07-29 18:08:52 -0400 |
commit | c6f54a9b39626090c934646f7d732e31b70ffce7 (patch) | |
tree | 46a2fb3b19d26780bb7958e053d4d8f00990e8f6 | |
parent | 04fcab32d3fa1d3f6afe97e0ab431c5572e07a2c (diff) |
ARM: 8113/1: remove remaining definitions of PLAT_PHYS_OFFSET from <mach/memory.h>
The platforms selecting NEED_MACH_MEMORY_H defined the start address of
their physical memory in the respective <mach/memory.h>. With
ARM_PATCH_PHYS_VIRT=y (which is quite common today) this is useless
though because the definition isn't used but determined dynamically.
So remove the definitions from all <mach/memory.h> and provide the
Kconfig symbol PHYS_OFFSET with the respective defaults in case
ARM_PATCH_PHYS_VIRT isn't enabled.
This allows to drop the dependency of PHYS_OFFSET on !NEED_MACH_MEMORY_H
which prevents compiling an integrator nommu-kernel.
(CONFIG_PAGE_OFFSET which has "default PHYS_OFFSET if !MMU" expanded to
"0x" because CONFIG_PHYS_OFFSET doesn't exist as INTEGRATOR selects
NEED_MACH_MEMORY_H.)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/Kconfig | 17 | ||||
-rw-r--r-- | arch/arm/include/asm/memory.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-ebsa110/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/memory.h | 22 | ||||
-rw-r--r-- | arch/arm/mach-footbridge/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-integrator/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-ks8695/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/memory.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-rpc/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/include/mach/memory.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/memory.h | 5 |
13 files changed, 17 insertions, 79 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 245058b3b0ef..44ed4a803d81 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -262,8 +262,22 @@ config NEED_MACH_MEMORY_H | |||
262 | 262 | ||
263 | config PHYS_OFFSET | 263 | config PHYS_OFFSET |
264 | hex "Physical address of main memory" if MMU | 264 | hex "Physical address of main memory" if MMU |
265 | depends on !ARM_PATCH_PHYS_VIRT && !NEED_MACH_MEMORY_H | 265 | depends on !ARM_PATCH_PHYS_VIRT |
266 | default DRAM_BASE if !MMU | 266 | default DRAM_BASE if !MMU |
267 | default 0x00000000 if ARCH_EBSA110 || \ | ||
268 | EP93XX_SDCE3_SYNC_PHYS_OFFSET || \ | ||
269 | ARCH_FOOTBRIDGE || \ | ||
270 | ARCH_INTEGRATOR || \ | ||
271 | ARCH_IOP13XX || \ | ||
272 | ARCH_KS8695 || \ | ||
273 | (ARCH_REALVIEW && !REALVIEW_HIGH_PHYS_OFFSET) | ||
274 | default 0x10000000 if ARCH_OMAP1 || ARCH_RPC | ||
275 | default 0x20000000 if ARCH_S5PV210 | ||
276 | default 0x70000000 if REALVIEW_HIGH_PHYS_OFFSET | ||
277 | default 0xc0000000 if EP93XX_SDCE0_PHYS_OFFSET || ARCH_SA1100 | ||
278 | default 0xd0000000 if EP93XX_SDCE1_PHYS_OFFSET | ||
279 | default 0xe0000000 if EP93XX_SDCE2_PHYS_OFFSET | ||
280 | default 0xf0000000 if EP93XX_SDCE3_ASYNC_PHYS_OFFSET | ||
267 | help | 281 | help |
268 | Please provide the physical address corresponding to the | 282 | Please provide the physical address corresponding to the |
269 | location of main memory in your system. | 283 | location of main memory in your system. |
@@ -435,7 +449,6 @@ config ARCH_EP93XX | |||
435 | select ARM_VIC | 449 | select ARM_VIC |
436 | select CLKDEV_LOOKUP | 450 | select CLKDEV_LOOKUP |
437 | select CPU_ARM920T | 451 | select CPU_ARM920T |
438 | select NEED_MACH_MEMORY_H | ||
439 | help | 452 | help |
440 | This enables support for the Cirrus EP93xx series of CPUs. | 453 | This enables support for the Cirrus EP93xx series of CPUs. |
441 | 454 | ||
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 2b751464d6ff..04ccf1c0a1af 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -150,13 +150,11 @@ | |||
150 | 150 | ||
151 | /* | 151 | /* |
152 | * PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical | 152 | * PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical |
153 | * memory. This is used for XIP and NoMMU kernels, or by kernels which | 153 | * memory. This is used for XIP and NoMMU kernels, and on platforms that don't |
154 | * have their own mach/memory.h. Assembly code must always use | 154 | * have CONFIG_ARM_PATCH_PHYS_VIRT. Assembly code must always use |
155 | * PLAT_PHYS_OFFSET and not PHYS_OFFSET. | 155 | * PLAT_PHYS_OFFSET and not PHYS_OFFSET. |
156 | */ | 156 | */ |
157 | #ifndef PLAT_PHYS_OFFSET | ||
158 | #define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) | 157 | #define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) |
159 | #endif | ||
160 | 158 | ||
161 | #ifndef __ASSEMBLY__ | 159 | #ifndef __ASSEMBLY__ |
162 | 160 | ||
diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h index 8e49066ad850..866f8a1c6ff7 100644 --- a/arch/arm/mach-ebsa110/include/mach/memory.h +++ b/arch/arm/mach-ebsa110/include/mach/memory.h | |||
@@ -17,11 +17,6 @@ | |||
17 | #define __ASM_ARCH_MEMORY_H | 17 | #define __ASM_ARCH_MEMORY_H |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * Physical DRAM offset. | ||
21 | */ | ||
22 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
23 | |||
24 | /* | ||
25 | * Cache flushing area - SRAM | 20 | * Cache flushing area - SRAM |
26 | */ | 21 | */ |
27 | #define FLUSH_BASE_PHYS 0x40000000 | 22 | #define FLUSH_BASE_PHYS 0x40000000 |
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h deleted file mode 100644 index c9400cf0051c..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/memory.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) | ||
9 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
10 | #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) | ||
11 | #define PLAT_PHYS_OFFSET UL(0xc0000000) | ||
12 | #elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) | ||
13 | #define PLAT_PHYS_OFFSET UL(0xd0000000) | ||
14 | #elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) | ||
15 | #define PLAT_PHYS_OFFSET UL(0xe0000000) | ||
16 | #elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) | ||
17 | #define PLAT_PHYS_OFFSET UL(0xf0000000) | ||
18 | #else | ||
19 | #error "Kconfig bug: No EP93xx PHYS_OFFSET set" | ||
20 | #endif | ||
21 | |||
22 | #endif | ||
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h index 5c6df377f969..6f2ecccdf323 100644 --- a/arch/arm/mach-footbridge/include/mach/memory.h +++ b/arch/arm/mach-footbridge/include/mach/memory.h | |||
@@ -59,11 +59,6 @@ extern unsigned long __bus_to_pfn(unsigned long); | |||
59 | */ | 59 | */ |
60 | #define FLUSH_BASE 0xf9000000 | 60 | #define FLUSH_BASE 0xf9000000 |
61 | 61 | ||
62 | /* | ||
63 | * Physical DRAM offset. | ||
64 | */ | ||
65 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
66 | |||
67 | #define FLUSH_BASE_PHYS 0x50000000 | 62 | #define FLUSH_BASE_PHYS 0x50000000 |
68 | 63 | ||
69 | #endif | 64 | #endif |
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h index 334d5e271889..7268cb50ded0 100644 --- a/arch/arm/mach-integrator/include/mach/memory.h +++ b/arch/arm/mach-integrator/include/mach/memory.h | |||
@@ -20,11 +20,6 @@ | |||
20 | #ifndef __ASM_ARCH_MEMORY_H | 20 | #ifndef __ASM_ARCH_MEMORY_H |
21 | #define __ASM_ARCH_MEMORY_H | 21 | #define __ASM_ARCH_MEMORY_H |
22 | 22 | ||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
27 | |||
28 | #define BUS_OFFSET UL(0x80000000) | 23 | #define BUS_OFFSET UL(0x80000000) |
29 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) | 24 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) |
30 | #define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) | 25 | #define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) |
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h index 7c032d0ab24a..59307e787588 100644 --- a/arch/arm/mach-iop13xx/include/mach/memory.h +++ b/arch/arm/mach-iop13xx/include/mach/memory.h | |||
@@ -3,11 +3,6 @@ | |||
3 | 3 | ||
4 | #include <mach/hardware.h> | 4 | #include <mach/hardware.h> |
5 | 5 | ||
6 | /* | ||
7 | * Physical DRAM offset. | ||
8 | */ | ||
9 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
10 | |||
11 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
12 | 7 | ||
13 | #if defined(CONFIG_ARCH_IOP13XX) | 8 | #if defined(CONFIG_ARCH_IOP13XX) |
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index 95e731a7ed6a..ab0d27fa8969 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h | |||
@@ -15,11 +15,6 @@ | |||
15 | 15 | ||
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | 17 | ||
18 | /* | ||
19 | * Physical SRAM offset. | ||
20 | */ | ||
21 | #define PLAT_PHYS_OFFSET KS8695_SDRAM_PA | ||
22 | |||
23 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
24 | 19 | ||
25 | #ifdef CONFIG_PCI | 20 | #ifdef CONFIG_PCI |
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index 3c2530523111..058a4f7d44c5 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -6,11 +6,6 @@ | |||
6 | #define __ASM_ARCH_MEMORY_H | 6 | #define __ASM_ARCH_MEMORY_H |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Physical DRAM offset. | ||
10 | */ | ||
11 | #define PLAT_PHYS_OFFSET UL(0x10000000) | ||
12 | |||
13 | /* | ||
14 | * Bus address is physical address, except for OMAP-1510 Local Bus. | 9 | * Bus address is physical address, except for OMAP-1510 Local Bus. |
15 | * OMAP-1510 bus address is translated into a Local Bus address if the | 10 | * OMAP-1510 bus address is translated into a Local Bus address if the |
16 | * OMAP bus type is lbus. We do the address translation based on the | 11 | * OMAP bus type is lbus. We do the address translation based on the |
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h index db09170e3832..23e7a313f75d 100644 --- a/arch/arm/mach-realview/include/mach/memory.h +++ b/arch/arm/mach-realview/include/mach/memory.h | |||
@@ -20,15 +20,6 @@ | |||
20 | #ifndef __ASM_ARCH_MEMORY_H | 20 | #ifndef __ASM_ARCH_MEMORY_H |
21 | #define __ASM_ARCH_MEMORY_H | 21 | #define __ASM_ARCH_MEMORY_H |
22 | 22 | ||
23 | /* | ||
24 | * Physical DRAM offset. | ||
25 | */ | ||
26 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET | ||
27 | #define PLAT_PHYS_OFFSET UL(0x70000000) | ||
28 | #else | ||
29 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
30 | #endif | ||
31 | |||
32 | #ifdef CONFIG_SPARSEMEM | 23 | #ifdef CONFIG_SPARSEMEM |
33 | 24 | ||
34 | /* | 25 | /* |
diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h index 18a221093bf5..b7e49571417d 100644 --- a/arch/arm/mach-rpc/include/mach/memory.h +++ b/arch/arm/mach-rpc/include/mach/memory.h | |||
@@ -19,11 +19,6 @@ | |||
19 | #define __ASM_ARCH_MEMORY_H | 19 | #define __ASM_ARCH_MEMORY_H |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * Physical DRAM offset. | ||
23 | */ | ||
24 | #define PLAT_PHYS_OFFSET UL(0x10000000) | ||
25 | |||
26 | /* | ||
27 | * Cache flushing area - ROM | 22 | * Cache flushing area - ROM |
28 | */ | 23 | */ |
29 | #define FLUSH_BASE_PHYS 0x00000000 | 24 | #define FLUSH_BASE_PHYS 0x00000000 |
diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-s5pv210/include/mach/memory.h index 2d3cfa221d5f..d584fac9156b 100644 --- a/arch/arm/mach-s5pv210/include/mach/memory.h +++ b/arch/arm/mach-s5pv210/include/mach/memory.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | 13 | #ifndef __ASM_ARCH_MEMORY_H |
14 | #define __ASM_ARCH_MEMORY_H | 14 | #define __ASM_ARCH_MEMORY_H |
15 | 15 | ||
16 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
17 | |||
18 | /* | 16 | /* |
19 | * Sparsemem support | 17 | * Sparsemem support |
20 | * Physical memory can be located from 0x20000000 to 0x7fffffff, | 18 | * Physical memory can be located from 0x20000000 to 0x7fffffff, |
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h index 12d376795abc..2054051eb797 100644 --- a/arch/arm/mach-sa1100/include/mach/memory.h +++ b/arch/arm/mach-sa1100/include/mach/memory.h | |||
@@ -10,11 +10,6 @@ | |||
10 | #include <asm/sizes.h> | 10 | #include <asm/sizes.h> |
11 | 11 | ||
12 | /* | 12 | /* |
13 | * Physical DRAM offset is 0xc0000000 on the SA1100 | ||
14 | */ | ||
15 | #define PLAT_PHYS_OFFSET UL(0xc0000000) | ||
16 | |||
17 | /* | ||
18 | * Because of the wide memory address space between physical RAM banks on the | 13 | * Because of the wide memory address space between physical RAM banks on the |
19 | * SA1100, it's much convenient to use Linux's SparseMEM support to implement | 14 | * SA1100, it's much convenient to use Linux's SparseMEM support to implement |
20 | * our memory map representation. Assuming all memory nodes have equal access | 15 | * our memory map representation. Assuming all memory nodes have equal access |