aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-02-06 12:15:06 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-13 05:34:30 -0400
commitfb4416ad61e4dac816ae866999115500c818406b (patch)
tree7c727464a91aa1b94c3f18e2942546f352518342 /arch
parentcb88214d726b337d49c1f65cbc5e5ac85837b11b (diff)
[ARM] MX31: Move static virtual mappings of AIPS1/2 to common file
On MX31 we can't do much without mapping the AIPS1/2 register space. Move these mappings from individual boards to plat-mxc/mm.c Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx3/mm.c10
-rw-r--r--arch/arm/mach-mx3/mx31ads.c10
-rw-r--r--arch/arm/mach-mx3/mx31lite.c10
-rw-r--r--arch/arm/mach-mx3/mx31moboard.c28
-rw-r--r--arch/arm/mach-mx3/mx31pdk.c28
-rw-r--r--arch/arm/mach-mx3/pcm037.c28
6 files changed, 13 insertions, 101 deletions
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c
index 44fcb6679f9a..9e1459cb4b74 100644
--- a/arch/arm/mach-mx3/mm.c
+++ b/arch/arm/mach-mx3/mm.c
@@ -54,6 +54,16 @@ static struct map_desc mxc_io_desc[] __initdata = {
54 .pfn = __phys_to_pfn(AVIC_BASE_ADDR), 54 .pfn = __phys_to_pfn(AVIC_BASE_ADDR),
55 .length = AVIC_SIZE, 55 .length = AVIC_SIZE,
56 .type = MT_DEVICE_NONSHARED 56 .type = MT_DEVICE_NONSHARED
57 }, {
58 .virtual = AIPS1_BASE_ADDR_VIRT,
59 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
60 .length = AIPS1_SIZE,
61 .type = MT_DEVICE_NONSHARED
62 }, {
63 .virtual = AIPS2_BASE_ADDR_VIRT,
64 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
65 .length = AIPS2_SIZE,
66 .type = MT_DEVICE_NONSHARED
57 }, 67 },
58}; 68};
59 69
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index 5c76ac5ba0fe..83e5e8e1276f 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -492,21 +492,11 @@ static void mxc_init_i2c(void)
492 */ 492 */
493static struct map_desc mx31ads_io_desc[] __initdata = { 493static struct map_desc mx31ads_io_desc[] __initdata = {
494 { 494 {
495 .virtual = AIPS1_BASE_ADDR_VIRT,
496 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
497 .length = AIPS1_SIZE,
498 .type = MT_DEVICE_NONSHARED
499 }, {
500 .virtual = SPBA0_BASE_ADDR_VIRT, 495 .virtual = SPBA0_BASE_ADDR_VIRT,
501 .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), 496 .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
502 .length = SPBA0_SIZE, 497 .length = SPBA0_SIZE,
503 .type = MT_DEVICE_NONSHARED 498 .type = MT_DEVICE_NONSHARED
504 }, { 499 }, {
505 .virtual = AIPS2_BASE_ADDR_VIRT,
506 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
507 .length = AIPS2_SIZE,
508 .type = MT_DEVICE_NONSHARED
509 }, {
510 .virtual = CS4_BASE_ADDR_VIRT, 500 .virtual = CS4_BASE_ADDR_VIRT,
511 .pfn = __phys_to_pfn(CS4_BASE_ADDR), 501 .pfn = __phys_to_pfn(CS4_BASE_ADDR),
512 .length = CS4_SIZE / 2, 502 .length = CS4_SIZE / 2,
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mx31lite.c
index e61fad2f60f3..894d98cd9941 100644
--- a/arch/arm/mach-mx3/mx31lite.c
+++ b/arch/arm/mach-mx3/mx31lite.c
@@ -42,21 +42,11 @@
42 */ 42 */
43static struct map_desc mx31lite_io_desc[] __initdata = { 43static struct map_desc mx31lite_io_desc[] __initdata = {
44 { 44 {
45 .virtual = AIPS1_BASE_ADDR_VIRT,
46 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
47 .length = AIPS1_SIZE,
48 .type = MT_DEVICE_NONSHARED
49 }, {
50 .virtual = SPBA0_BASE_ADDR_VIRT, 45 .virtual = SPBA0_BASE_ADDR_VIRT,
51 .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), 46 .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
52 .length = SPBA0_SIZE, 47 .length = SPBA0_SIZE,
53 .type = MT_DEVICE_NONSHARED 48 .type = MT_DEVICE_NONSHARED
54 }, { 49 }, {
55 .virtual = AIPS2_BASE_ADDR_VIRT,
56 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
57 .length = AIPS2_SIZE,
58 .type = MT_DEVICE_NONSHARED
59 }, {
60 .virtual = CS4_BASE_ADDR_VIRT, 50 .virtual = CS4_BASE_ADDR_VIRT,
61 .pfn = __phys_to_pfn(CS4_BASE_ADDR), 51 .pfn = __phys_to_pfn(CS4_BASE_ADDR),
62 .length = CS4_SIZE, 52 .length = CS4_SIZE,
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c
index b30460a2a559..34c2a1b99d4f 100644
--- a/arch/arm/mach-mx3/mx31moboard.c
+++ b/arch/arm/mach-mx3/mx31moboard.c
@@ -103,32 +103,6 @@ static void __init mxc_board_init(void)
103 } 103 }
104} 104}
105 105
106/*
107 * This structure defines static mappings for the mx31moboard.
108 */
109static struct map_desc mx31moboard_io_desc[] __initdata = {
110 {
111 .virtual = AIPS1_BASE_ADDR_VIRT,
112 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
113 .length = AIPS1_SIZE,
114 .type = MT_DEVICE_NONSHARED
115 }, {
116 .virtual = AIPS2_BASE_ADDR_VIRT,
117 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
118 .length = AIPS2_SIZE,
119 .type = MT_DEVICE_NONSHARED
120 },
121};
122
123/*
124 * Set up static virtual mappings.
125 */
126void __init mx31moboard_map_io(void)
127{
128 mxc_map_io();
129 iotable_init(mx31moboard_io_desc, ARRAY_SIZE(mx31moboard_io_desc));
130}
131
132static void __init mx31moboard_timer_init(void) 106static void __init mx31moboard_timer_init(void)
133{ 107{
134 mx31_clocks_init(26000000); 108 mx31_clocks_init(26000000);
@@ -143,7 +117,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
143 .phys_io = AIPS1_BASE_ADDR, 117 .phys_io = AIPS1_BASE_ADDR,
144 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 118 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
145 .boot_params = PHYS_OFFSET + 0x100, 119 .boot_params = PHYS_OFFSET + 0x100,
146 .map_io = mx31moboard_map_io, 120 .map_io = mxc_map_io,
147 .init_irq = mxc_init_irq, 121 .init_irq = mxc_init_irq,
148 .init_machine = mxc_board_init, 122 .init_machine = mxc_board_init,
149 .timer = &mx31moboard_timer, 123 .timer = &mx31moboard_timer,
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c
index 9108f157b76c..bc63f1785691 100644
--- a/arch/arm/mach-mx3/mx31pdk.c
+++ b/arch/arm/mach-mx3/mx31pdk.c
@@ -59,32 +59,6 @@ static inline void mxc_init_imx_uart(void)
59} 59}
60 60
61/*! 61/*!
62 * This structure defines static mappings for the i.MX31PDK board.
63 */
64static struct map_desc mx31pdk_io_desc[] __initdata = {
65 {
66 .virtual = AIPS1_BASE_ADDR_VIRT,
67 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
68 .length = AIPS1_SIZE,
69 .type = MT_DEVICE_NONSHARED
70 }, {
71 .virtual = AIPS2_BASE_ADDR_VIRT,
72 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
73 .length = AIPS2_SIZE,
74 .type = MT_DEVICE_NONSHARED
75 },
76};
77
78/*!
79 * Set up static virtual mappings.
80 */
81static void __init mx31pdk_map_io(void)
82{
83 mxc_map_io();
84 iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc));
85}
86
87/*!
88 * Board specific initialization. 62 * Board specific initialization.
89 */ 63 */
90static void __init mxc_board_init(void) 64static void __init mxc_board_init(void)
@@ -110,7 +84,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
110 .phys_io = AIPS1_BASE_ADDR, 84 .phys_io = AIPS1_BASE_ADDR,
111 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 85 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
112 .boot_params = PHYS_OFFSET + 0x100, 86 .boot_params = PHYS_OFFSET + 0x100,
113 .map_io = mx31pdk_map_io, 87 .map_io = mxc_map_io,
114 .init_irq = mxc_init_irq, 88 .init_irq = mxc_init_irq,
115 .init_machine = mxc_board_init, 89 .init_machine = mxc_board_init,
116 .timer = &mx31pdk_timer, 90 .timer = &mx31pdk_timer,
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index a05e37b731be..7743c13bebad 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -210,32 +210,6 @@ static void __init mxc_board_init(void)
210 mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); 210 mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info);
211} 211}
212 212
213/*
214 * This structure defines static mappings for the pcm037 board.
215 */
216static struct map_desc pcm037_io_desc[] __initdata = {
217 {
218 .virtual = AIPS1_BASE_ADDR_VIRT,
219 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
220 .length = AIPS1_SIZE,
221 .type = MT_DEVICE_NONSHARED
222 }, {
223 .virtual = AIPS2_BASE_ADDR_VIRT,
224 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
225 .length = AIPS2_SIZE,
226 .type = MT_DEVICE_NONSHARED
227 },
228};
229
230/*
231 * Set up static virtual mappings.
232 */
233void __init pcm037_map_io(void)
234{
235 mxc_map_io();
236 iotable_init(pcm037_io_desc, ARRAY_SIZE(pcm037_io_desc));
237}
238
239static void __init pcm037_timer_init(void) 213static void __init pcm037_timer_init(void)
240{ 214{
241 mx31_clocks_init(26000000); 215 mx31_clocks_init(26000000);
@@ -250,7 +224,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
250 .phys_io = AIPS1_BASE_ADDR, 224 .phys_io = AIPS1_BASE_ADDR,
251 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 225 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
252 .boot_params = PHYS_OFFSET + 0x100, 226 .boot_params = PHYS_OFFSET + 0x100,
253 .map_io = pcm037_map_io, 227 .map_io = mxc_map_io,
254 .init_irq = mxc_init_irq, 228 .init_irq = mxc_init_irq,
255 .init_machine = mxc_board_init, 229 .init_machine = mxc_board_init,
256 .timer = &pcm037_timer, 230 .timer = &pcm037_timer,