aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-04-02 16:32:10 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-05-07 10:15:37 -0400
commitcd4a05f9df859e7cd2efa96e035444a3decb427a (patch)
treea09a737f4e41da61216fae85a845d6902b7a144c /arch
parent13e9f61235616966f9f6caefd533046c19d35c92 (diff)
MXC: rename mxc_map_io to architecture specific versions
This allows us to have more mapping functions for more than one i.MX architecture in the kernel. As this is the earliest board specific hook we have, also use it to set the cpu type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx1/generic.c4
-rw-r--r--arch/arm/mach-mx1/mx1ads.c2
-rw-r--r--arch/arm/mach-mx1/scb9328.c2
-rw-r--r--arch/arm/mach-mx2/generic.c12
-rw-r--r--arch/arm/mach-mx2/mx27ads.c2
-rw-r--r--arch/arm/mach-mx2/pcm038.c2
-rw-r--r--arch/arm/mach-mx3/clock-imx35.c2
-rw-r--r--arch/arm/mach-mx3/clock.c2
-rw-r--r--arch/arm/mach-mx3/mm.c11
-rw-r--r--arch/arm/mach-mx3/mx31ads.c2
-rw-r--r--arch/arm/mach-mx3/mx31lite.c2
-rw-r--r--arch/arm/mach-mx3/mx31moboard.c2
-rw-r--r--arch/arm/mach-mx3/mx31pdk.c2
-rw-r--r--arch/arm/mach-mx3/pcm037.c2
-rw-r--r--arch/arm/mach-mx3/pcm043.c2
-rw-r--r--arch/arm/plat-mxc/include/mach/common.h6
16 files changed, 39 insertions, 18 deletions
diff --git a/arch/arm/mach-mx1/generic.c b/arch/arm/mach-mx1/generic.c
index 0dec6f300ff..9c3528dbbfe 100644
--- a/arch/arm/mach-mx1/generic.c
+++ b/arch/arm/mach-mx1/generic.c
@@ -37,7 +37,9 @@ static struct map_desc imx_io_desc[] __initdata = {
37 } 37 }
38}; 38};
39 39
40void __init mxc_map_io(void) 40void __init mx1_map_io(void)
41{ 41{
42 mxc_set_cpu_type(MXC_CPU_MX1);
43
42 iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); 44 iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
43} 45}
diff --git a/arch/arm/mach-mx1/mx1ads.c b/arch/arm/mach-mx1/mx1ads.c
index e54057fb855..7a648c18393 100644
--- a/arch/arm/mach-mx1/mx1ads.c
+++ b/arch/arm/mach-mx1/mx1ads.c
@@ -198,7 +198,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
198 .phys_io = IMX_IO_PHYS, 198 .phys_io = IMX_IO_PHYS,
199 .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, 199 .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc,
200 .boot_params = PHYS_OFFSET + 0x100, 200 .boot_params = PHYS_OFFSET + 0x100,
201 .map_io = mxc_map_io, 201 .map_io = mx1_map_io,
202 .init_irq = mxc_init_irq, 202 .init_irq = mxc_init_irq,
203 .timer = &mx1ads_timer, 203 .timer = &mx1ads_timer,
204 .init_machine = mx1ads_init, 204 .init_machine = mx1ads_init,
diff --git a/arch/arm/mach-mx1/scb9328.c b/arch/arm/mach-mx1/scb9328.c
index 0e71f3fa28b..20e0b5bcdff 100644
--- a/arch/arm/mach-mx1/scb9328.c
+++ b/arch/arm/mach-mx1/scb9328.c
@@ -153,7 +153,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
153 .phys_io = 0x00200000, 153 .phys_io = 0x00200000,
154 .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, 154 .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
155 .boot_params = 0x08000100, 155 .boot_params = 0x08000100,
156 .map_io = mxc_map_io, 156 .map_io = mx1_map_io,
157 .init_irq = mxc_init_irq, 157 .init_irq = mxc_init_irq,
158 .timer = &scb9328_timer, 158 .timer = &scb9328_timer,
159 .init_machine = scb9328_init, 159 .init_machine = scb9328_init,
diff --git a/arch/arm/mach-mx2/generic.c b/arch/arm/mach-mx2/generic.c
index bd51dd04948..169372f69d8 100644
--- a/arch/arm/mach-mx2/generic.c
+++ b/arch/arm/mach-mx2/generic.c
@@ -69,7 +69,17 @@ static struct map_desc mxc_io_desc[] __initdata = {
69 * system startup to create static physical to virtual 69 * system startup to create static physical to virtual
70 * memory map for the IO modules. 70 * memory map for the IO modules.
71 */ 71 */
72void __init mxc_map_io(void) 72void __init mx21_map_io(void)
73{ 73{
74 mxc_set_cpu_type(MXC_CPU_MX21);
75
74 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); 76 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
75} 77}
78
79void __init mx27_map_io(void)
80{
81 mxc_set_cpu_type(MXC_CPU_MX27);
82
83 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
84}
85
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c
index 4a3b097adc1..f4ad932ba24 100644
--- a/arch/arm/mach-mx2/mx27ads.c
+++ b/arch/arm/mach-mx2/mx27ads.c
@@ -277,7 +277,7 @@ static struct map_desc mx27ads_io_desc[] __initdata = {
277 277
278static void __init mx27ads_map_io(void) 278static void __init mx27ads_map_io(void)
279{ 279{
280 mxc_map_io(); 280 mx27_map_io();
281 iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc)); 281 iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc));
282} 282}
283 283
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c
index aa4eaa61d1b..732937ca2c9 100644
--- a/arch/arm/mach-mx2/pcm038.c
+++ b/arch/arm/mach-mx2/pcm038.c
@@ -295,7 +295,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
295 .phys_io = AIPI_BASE_ADDR, 295 .phys_io = AIPI_BASE_ADDR,
296 .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, 296 .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
297 .boot_params = PHYS_OFFSET + 0x100, 297 .boot_params = PHYS_OFFSET + 0x100,
298 .map_io = mxc_map_io, 298 .map_io = mx27_map_io,
299 .init_irq = mxc_init_irq, 299 .init_irq = mxc_init_irq,
300 .init_machine = pcm038_init, 300 .init_machine = pcm038_init,
301 .timer = &pcm038_timer, 301 .timer = &pcm038_timer,
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index 1814ba44d1b..0d76521cb49 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -440,8 +440,6 @@ int __init mx35_clocks_init()
440 int i; 440 int i;
441 unsigned int ll = 0; 441 unsigned int ll = 0;
442 442
443 mxc_set_cpu_type(MXC_CPU_MX35);
444
445#ifdef CONFIG_DEBUG_LL_CONSOLE 443#ifdef CONFIG_DEBUG_LL_CONSOLE
446 ll = (3 << 16); 444 ll = (3 << 16);
447#endif 445#endif
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c
index 9957a11533a..09cbd4a15f8 100644
--- a/arch/arm/mach-mx3/clock.c
+++ b/arch/arm/mach-mx3/clock.c
@@ -566,8 +566,6 @@ int __init mx31_clocks_init(unsigned long fref)
566 u32 reg; 566 u32 reg;
567 int i; 567 int i;
568 568
569 mxc_set_cpu_type(MXC_CPU_MX31);
570
571 ckih_rate = fref; 569 ckih_rate = fref;
572 570
573 for (i = 0; i < ARRAY_SIZE(lookups); i++) 571 for (i = 0; i < ARRAY_SIZE(lookups); i++)
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c
index 9e1459cb4b7..1f5fdd456cb 100644
--- a/arch/arm/mach-mx3/mm.c
+++ b/arch/arm/mach-mx3/mm.c
@@ -72,8 +72,17 @@ static struct map_desc mxc_io_desc[] __initdata = {
72 * system startup to create static physical to virtual memory mappings 72 * system startup to create static physical to virtual memory mappings
73 * for the IO modules. 73 * for the IO modules.
74 */ 74 */
75void __init mxc_map_io(void) 75void __init mx31_map_io(void)
76{ 76{
77 mxc_set_cpu_type(MXC_CPU_MX31);
78
79 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
80}
81
82void __init mx35_map_io(void)
83{
84 mxc_set_cpu_type(MXC_CPU_MX35);
85
77 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); 86 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
78} 87}
79 88
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index a6d6efefa6a..db2e06a8123 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -511,7 +511,7 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
511 */ 511 */
512static void __init mx31ads_map_io(void) 512static void __init mx31ads_map_io(void)
513{ 513{
514 mxc_map_io(); 514 mx31_map_io();
515 iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc)); 515 iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc));
516} 516}
517 517
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mx31lite.c
index 894d98cd994..76b36da9223 100644
--- a/arch/arm/mach-mx3/mx31lite.c
+++ b/arch/arm/mach-mx3/mx31lite.c
@@ -59,7 +59,7 @@ static struct map_desc mx31lite_io_desc[] __initdata = {
59 */ 59 */
60void __init mx31lite_map_io(void) 60void __init mx31lite_map_io(void)
61{ 61{
62 mxc_map_io(); 62 mx31_map_io();
63 iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc)); 63 iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc));
64} 64}
65 65
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c
index 34c2a1b99d4..77168ed555e 100644
--- a/arch/arm/mach-mx3/mx31moboard.c
+++ b/arch/arm/mach-mx3/mx31moboard.c
@@ -117,7 +117,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
117 .phys_io = AIPS1_BASE_ADDR, 117 .phys_io = AIPS1_BASE_ADDR,
118 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 118 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
119 .boot_params = PHYS_OFFSET + 0x100, 119 .boot_params = PHYS_OFFSET + 0x100,
120 .map_io = mxc_map_io, 120 .map_io = mx31_map_io,
121 .init_irq = mxc_init_irq, 121 .init_irq = mxc_init_irq,
122 .init_machine = mxc_board_init, 122 .init_machine = mxc_board_init,
123 .timer = &mx31moboard_timer, 123 .timer = &mx31moboard_timer,
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c
index bc63f178569..048084bc613 100644
--- a/arch/arm/mach-mx3/mx31pdk.c
+++ b/arch/arm/mach-mx3/mx31pdk.c
@@ -84,7 +84,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
84 .phys_io = AIPS1_BASE_ADDR, 84 .phys_io = AIPS1_BASE_ADDR,
85 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 85 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
86 .boot_params = PHYS_OFFSET + 0x100, 86 .boot_params = PHYS_OFFSET + 0x100,
87 .map_io = mxc_map_io, 87 .map_io = mx31_map_io,
88 .init_irq = mxc_init_irq, 88 .init_irq = mxc_init_irq,
89 .init_machine = mxc_board_init, 89 .init_machine = mxc_board_init,
90 .timer = &mx31pdk_timer, 90 .timer = &mx31pdk_timer,
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index bd475cccc57..68098917cc8 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -309,7 +309,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
309 .phys_io = AIPS1_BASE_ADDR, 309 .phys_io = AIPS1_BASE_ADDR,
310 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 310 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
311 .boot_params = PHYS_OFFSET + 0x100, 311 .boot_params = PHYS_OFFSET + 0x100,
312 .map_io = mxc_map_io, 312 .map_io = mx31_map_io,
313 .init_irq = mxc_init_irq, 313 .init_irq = mxc_init_irq,
314 .init_machine = mxc_board_init, 314 .init_machine = mxc_board_init,
315 .timer = &pcm037_timer, 315 .timer = &pcm037_timer,
diff --git a/arch/arm/mach-mx3/pcm043.c b/arch/arm/mach-mx3/pcm043.c
index 638b358a02f..8d27c324abf 100644
--- a/arch/arm/mach-mx3/pcm043.c
+++ b/arch/arm/mach-mx3/pcm043.c
@@ -244,7 +244,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
244 .phys_io = AIPS1_BASE_ADDR, 244 .phys_io = AIPS1_BASE_ADDR,
245 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, 245 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
246 .boot_params = PHYS_OFFSET + 0x100, 246 .boot_params = PHYS_OFFSET + 0x100,
247 .map_io = mxc_map_io, 247 .map_io = mx35_map_io,
248 .init_irq = mxc_init_irq, 248 .init_irq = mxc_init_irq,
249 .init_machine = mxc_board_init, 249 .init_machine = mxc_board_init,
250 .timer = &pcm043_timer, 250 .timer = &pcm043_timer,
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index b2f9b72644d..02c3cd004db 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -14,7 +14,11 @@
14struct platform_device; 14struct platform_device;
15struct clk; 15struct clk;
16 16
17extern void mxc_map_io(void); 17extern void mx1_map_io(void);
18extern void mx21_map_io(void);
19extern void mx27_map_io(void);
20extern void mx31_map_io(void);
21extern void mx35_map_io(void);
18extern void mxc_init_irq(void); 22extern void mxc_init_irq(void);
19extern void mxc_timer_init(struct clk *timer_clk); 23extern void mxc_timer_init(struct clk *timer_clk);
20extern int mx1_clocks_init(unsigned long fref); 24extern int mx1_clocks_init(unsigned long fref);