aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-07-11 07:00:36 -0400
committerOlof Johansson <olof@lixom.net>2014-07-12 12:51:36 -0400
commit0e32986c0f51d585b4980a0f01c269627f51b78b (patch)
tree72d0504ed437644e39f3112a9f16604416dc8238 /arch/arm
parentab70e7e7e5acafaaf7105c752b25b46a618951e9 (diff)
ARM: pxa: Don't hardcode addresses and size in map_desc tables
The virtual address, physical address and size of all regions for which we create static mappings are defined in PXA headers. Replaced the hardcoded values with macros. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/generic.c10
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-pxa/pxa25x.c2
-rw-r--r--arch/arm/mach-pxa/pxa27x.c8
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c2
5 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 94f49c23ca02..68a75fe16020 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -79,14 +79,14 @@ EXPORT_SYMBOL(get_clk_frequency_khz);
79 */ 79 */
80static struct map_desc common_io_desc[] __initdata = { 80static struct map_desc common_io_desc[] __initdata = {
81 { /* Devs */ 81 { /* Devs */
82 .virtual = 0xf2000000, 82 .virtual = (unsigned long)PERIPH_VIRT,
83 .pfn = __phys_to_pfn(0x40000000), 83 .pfn = __phys_to_pfn(PERIPH_PHYS),
84 .length = 0x02000000, 84 .length = PERIPH_SIZE,
85 .type = MT_DEVICE 85 .type = MT_DEVICE
86 }, { /* UNCACHED_PHYS_0 */ 86 }, { /* UNCACHED_PHYS_0 */
87 .virtual = 0xff000000, 87 .virtual = UNCACHED_PHYS_0,
88 .pfn = __phys_to_pfn(0x00000000), 88 .pfn = __phys_to_pfn(0x00000000),
89 .length = 0x00100000, 89 .length = UNCACHED_PHYS_0_SIZE,
90 .type = MT_DEVICE 90 .type = MT_DEVICE
91 } 91 }
92}; 92};
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index ccb06e485520..efb3965aa929 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -20,7 +20,7 @@
20 * The mapping is set in mach-pxa/generic.c. 20 * The mapping is set in mach-pxa/generic.c.
21 */ 21 */
22#define UNCACHED_PHYS_0 0xff000000 22#define UNCACHED_PHYS_0 0xff000000
23#define UNCACHED_ADDR UNCACHED_PHYS_0 23#define UNCACHED_PHYS_0_SIZE 0x00100000
24 24
25/* 25/*
26 * Intel PXA2xx internal register mapping: 26 * Intel PXA2xx internal register mapping:
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index f2c28972084d..926c506f99bc 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -331,7 +331,7 @@ static struct map_desc pxa25x_io_desc[] __initdata = {
331 { /* Mem Ctl */ 331 { /* Mem Ctl */
332 .virtual = (unsigned long)SMEMC_VIRT, 332 .virtual = (unsigned long)SMEMC_VIRT,
333 .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), 333 .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
334 .length = 0x00200000, 334 .length = SMEMC_SIZE,
335 .type = MT_DEVICE 335 .type = MT_DEVICE
336 }, 336 },
337}; 337};
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 301471a07a10..440564458767 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -402,12 +402,12 @@ static struct map_desc pxa27x_io_desc[] __initdata = {
402 { /* Mem Ctl */ 402 { /* Mem Ctl */
403 .virtual = (unsigned long)SMEMC_VIRT, 403 .virtual = (unsigned long)SMEMC_VIRT,
404 .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), 404 .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
405 .length = 0x00200000, 405 .length = SMEMC_SIZE,
406 .type = MT_DEVICE 406 .type = MT_DEVICE
407 }, { /* IMem ctl */ 407 }, { /* IMem ctl */
408 .virtual = 0xfe000000, 408 .virtual = (unsigned long)IMEMC_VIRT,
409 .pfn = __phys_to_pfn(0x58000000), 409 .pfn = __phys_to_pfn(IMEMC_PHYS),
410 .length = 0x00100000, 410 .length = IMEMC_SIZE,
411 .type = MT_DEVICE 411 .type = MT_DEVICE
412 }, 412 },
413}; 413};
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 87011f3de69d..593ccd35ca97 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -416,7 +416,7 @@ static struct map_desc pxa3xx_io_desc[] __initdata = {
416 { /* Mem Ctl */ 416 { /* Mem Ctl */
417 .virtual = (unsigned long)SMEMC_VIRT, 417 .virtual = (unsigned long)SMEMC_VIRT,
418 .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), 418 .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE),
419 .length = 0x00200000, 419 .length = SMEMC_SIZE,
420 .type = MT_DEVICE 420 .type = MT_DEVICE
421 } 421 }
422}; 422};