Commit cd4a05f9df859e7cd2efa96e035444a3decb427a

Authored by Sascha Hauer
1 parent 13e9f61235

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>

Showing 16 changed files with 39 additions and 18 deletions Side-by-side Diff

arch/arm/mach-mx1/generic.c
... ... @@ -37,8 +37,10 @@
37 37 }
38 38 };
39 39  
40   -void __init mxc_map_io(void)
  40 +void __init mx1_map_io(void)
41 41 {
  42 + mxc_set_cpu_type(MXC_CPU_MX1);
  43 +
42 44 iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
43 45 }
arch/arm/mach-mx1/mx1ads.c
... ... @@ -198,7 +198,7 @@
198 198 .phys_io = IMX_IO_PHYS,
199 199 .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc,
200 200 .boot_params = PHYS_OFFSET + 0x100,
201   - .map_io = mxc_map_io,
  201 + .map_io = mx1_map_io,
202 202 .init_irq = mxc_init_irq,
203 203 .timer = &mx1ads_timer,
204 204 .init_machine = mx1ads_init,
arch/arm/mach-mx1/scb9328.c
... ... @@ -153,7 +153,7 @@
153 153 .phys_io = 0x00200000,
154 154 .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
155 155 .boot_params = 0x08000100,
156   - .map_io = mxc_map_io,
  156 + .map_io = mx1_map_io,
157 157 .init_irq = mxc_init_irq,
158 158 .timer = &scb9328_timer,
159 159 .init_machine = scb9328_init,
arch/arm/mach-mx2/generic.c
... ... @@ -69,8 +69,17 @@
69 69 * system startup to create static physical to virtual
70 70 * memory map for the IO modules.
71 71 */
72   -void __init mxc_map_io(void)
  72 +void __init mx21_map_io(void)
73 73 {
  74 + mxc_set_cpu_type(MXC_CPU_MX21);
  75 +
  76 + iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
  77 +}
  78 +
  79 +void __init mx27_map_io(void)
  80 +{
  81 + mxc_set_cpu_type(MXC_CPU_MX27);
  82 +
74 83 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
75 84 }
arch/arm/mach-mx2/mx27ads.c
... ... @@ -277,7 +277,7 @@
277 277  
278 278 static void __init mx27ads_map_io(void)
279 279 {
280   - mxc_map_io();
  280 + mx27_map_io();
281 281 iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc));
282 282 }
283 283  
arch/arm/mach-mx2/pcm038.c
... ... @@ -295,7 +295,7 @@
295 295 .phys_io = AIPI_BASE_ADDR,
296 296 .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
297 297 .boot_params = PHYS_OFFSET + 0x100,
298   - .map_io = mxc_map_io,
  298 + .map_io = mx27_map_io,
299 299 .init_irq = mxc_init_irq,
300 300 .init_machine = pcm038_init,
301 301 .timer = &pcm038_timer,
arch/arm/mach-mx3/clock-imx35.c
... ... @@ -440,8 +440,6 @@
440 440 int i;
441 441 unsigned int ll = 0;
442 442  
443   - mxc_set_cpu_type(MXC_CPU_MX35);
444   -
445 443 #ifdef CONFIG_DEBUG_LL_CONSOLE
446 444 ll = (3 << 16);
447 445 #endif
arch/arm/mach-mx3/clock.c
... ... @@ -566,8 +566,6 @@
566 566 u32 reg;
567 567 int i;
568 568  
569   - mxc_set_cpu_type(MXC_CPU_MX31);
570   -
571 569 ckih_rate = fref;
572 570  
573 571 for (i = 0; i < ARRAY_SIZE(lookups); i++)
arch/arm/mach-mx3/mm.c
... ... @@ -72,8 +72,17 @@
72 72 * system startup to create static physical to virtual memory mappings
73 73 * for the IO modules.
74 74 */
75   -void __init mxc_map_io(void)
  75 +void __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 +
  82 +void __init mx35_map_io(void)
  83 +{
  84 + mxc_set_cpu_type(MXC_CPU_MX35);
  85 +
77 86 iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
78 87 }
79 88  
arch/arm/mach-mx3/mx31ads.c
... ... @@ -511,7 +511,7 @@
511 511 */
512 512 static void __init mx31ads_map_io(void)
513 513 {
514   - mxc_map_io();
  514 + mx31_map_io();
515 515 iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc));
516 516 }
517 517  
arch/arm/mach-mx3/mx31lite.c
... ... @@ -59,7 +59,7 @@
59 59 */
60 60 void __init mx31lite_map_io(void)
61 61 {
62   - mxc_map_io();
  62 + mx31_map_io();
63 63 iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc));
64 64 }
65 65  
arch/arm/mach-mx3/mx31moboard.c
... ... @@ -117,7 +117,7 @@
117 117 .phys_io = AIPS1_BASE_ADDR,
118 118 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
119 119 .boot_params = PHYS_OFFSET + 0x100,
120   - .map_io = mxc_map_io,
  120 + .map_io = mx31_map_io,
121 121 .init_irq = mxc_init_irq,
122 122 .init_machine = mxc_board_init,
123 123 .timer = &mx31moboard_timer,
arch/arm/mach-mx3/mx31pdk.c
... ... @@ -84,7 +84,7 @@
84 84 .phys_io = AIPS1_BASE_ADDR,
85 85 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
86 86 .boot_params = PHYS_OFFSET + 0x100,
87   - .map_io = mxc_map_io,
  87 + .map_io = mx31_map_io,
88 88 .init_irq = mxc_init_irq,
89 89 .init_machine = mxc_board_init,
90 90 .timer = &mx31pdk_timer,
arch/arm/mach-mx3/pcm037.c
... ... @@ -309,7 +309,7 @@
309 309 .phys_io = AIPS1_BASE_ADDR,
310 310 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
311 311 .boot_params = PHYS_OFFSET + 0x100,
312   - .map_io = mxc_map_io,
  312 + .map_io = mx31_map_io,
313 313 .init_irq = mxc_init_irq,
314 314 .init_machine = mxc_board_init,
315 315 .timer = &pcm037_timer,
arch/arm/mach-mx3/pcm043.c
... ... @@ -244,7 +244,7 @@
244 244 .phys_io = AIPS1_BASE_ADDR,
245 245 .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
246 246 .boot_params = PHYS_OFFSET + 0x100,
247   - .map_io = mxc_map_io,
  247 + .map_io = mx35_map_io,
248 248 .init_irq = mxc_init_irq,
249 249 .init_machine = mxc_board_init,
250 250 .timer = &pcm043_timer,
arch/arm/plat-mxc/include/mach/common.h
... ... @@ -14,7 +14,11 @@
14 14 struct platform_device;
15 15 struct clk;
16 16  
17   -extern void mxc_map_io(void);
  17 +extern void mx1_map_io(void);
  18 +extern void mx21_map_io(void);
  19 +extern void mx27_map_io(void);
  20 +extern void mx31_map_io(void);
  21 +extern void mx35_map_io(void);
18 22 extern void mxc_init_irq(void);
19 23 extern void mxc_timer_init(struct clk *timer_clk);
20 24 extern int mx1_clocks_init(unsigned long fref);