Commit 0e32986c authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Olof Johansson

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent ab70e7e7
...@@ -79,14 +79,14 @@ EXPORT_SYMBOL(get_clk_frequency_khz); ...@@ -79,14 +79,14 @@ EXPORT_SYMBOL(get_clk_frequency_khz);
*/ */
static struct map_desc common_io_desc[] __initdata = { static struct map_desc common_io_desc[] __initdata = {
{ /* Devs */ { /* Devs */
.virtual = 0xf2000000, .virtual = (unsigned long)PERIPH_VIRT,
.pfn = __phys_to_pfn(0x40000000), .pfn = __phys_to_pfn(PERIPH_PHYS),
.length = 0x02000000, .length = PERIPH_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, { /* UNCACHED_PHYS_0 */ }, { /* UNCACHED_PHYS_0 */
.virtual = 0xff000000, .virtual = UNCACHED_PHYS_0,
.pfn = __phys_to_pfn(0x00000000), .pfn = __phys_to_pfn(0x00000000),
.length = 0x00100000, .length = UNCACHED_PHYS_0_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
} }
}; };
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* The mapping is set in mach-pxa/generic.c. * The mapping is set in mach-pxa/generic.c.
*/ */
#define UNCACHED_PHYS_0 0xff000000 #define UNCACHED_PHYS_0 0xff000000
#define UNCACHED_ADDR UNCACHED_PHYS_0 #define UNCACHED_PHYS_0_SIZE 0x00100000
/* /*
* Intel PXA2xx internal register mapping: * Intel PXA2xx internal register mapping:
......
...@@ -331,7 +331,7 @@ static struct map_desc pxa25x_io_desc[] __initdata = { ...@@ -331,7 +331,7 @@ static struct map_desc pxa25x_io_desc[] __initdata = {
{ /* Mem Ctl */ { /* Mem Ctl */
.virtual = (unsigned long)SMEMC_VIRT, .virtual = (unsigned long)SMEMC_VIRT,
.pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
.length = 0x00200000, .length = SMEMC_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
}; };
......
...@@ -402,12 +402,12 @@ static struct map_desc pxa27x_io_desc[] __initdata = { ...@@ -402,12 +402,12 @@ static struct map_desc pxa27x_io_desc[] __initdata = {
{ /* Mem Ctl */ { /* Mem Ctl */
.virtual = (unsigned long)SMEMC_VIRT, .virtual = (unsigned long)SMEMC_VIRT,
.pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE),
.length = 0x00200000, .length = SMEMC_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, { /* IMem ctl */ }, { /* IMem ctl */
.virtual = 0xfe000000, .virtual = (unsigned long)IMEMC_VIRT,
.pfn = __phys_to_pfn(0x58000000), .pfn = __phys_to_pfn(IMEMC_PHYS),
.length = 0x00100000, .length = IMEMC_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
}; };
......
...@@ -416,7 +416,7 @@ static struct map_desc pxa3xx_io_desc[] __initdata = { ...@@ -416,7 +416,7 @@ static struct map_desc pxa3xx_io_desc[] __initdata = {
{ /* Mem Ctl */ { /* Mem Ctl */
.virtual = (unsigned long)SMEMC_VIRT, .virtual = (unsigned long)SMEMC_VIRT,
.pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE),
.length = 0x00200000, .length = SMEMC_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment