]> git.karo-electronics.de Git - linux-beck.git/commitdiff
MXC: rename mxc_map_io to architecture specific versions
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 2 Apr 2009 20:32:10 +0000 (22:32 +0200)
committerSascha Hauer <s.hauer@pengutronix.de>
Thu, 7 May 2009 14:15:37 +0000 (16:15 +0200)
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>
16 files changed:
arch/arm/mach-mx1/generic.c
arch/arm/mach-mx1/mx1ads.c
arch/arm/mach-mx1/scb9328.c
arch/arm/mach-mx2/generic.c
arch/arm/mach-mx2/mx27ads.c
arch/arm/mach-mx2/pcm038.c
arch/arm/mach-mx3/clock-imx35.c
arch/arm/mach-mx3/clock.c
arch/arm/mach-mx3/mm.c
arch/arm/mach-mx3/mx31ads.c
arch/arm/mach-mx3/mx31lite.c
arch/arm/mach-mx3/mx31moboard.c
arch/arm/mach-mx3/mx31pdk.c
arch/arm/mach-mx3/pcm037.c
arch/arm/mach-mx3/pcm043.c
arch/arm/plat-mxc/include/mach/common.h

index 0dec6f300ffc140da11ce1937e84323af90a6e40..9c3528dbbfec94d34914fd2a5d0209de85cab862 100644 (file)
@@ -37,7 +37,9 @@ static struct map_desc imx_io_desc[] __initdata = {
        }
 };
 
-void __init mxc_map_io(void)
+void __init mx1_map_io(void)
 {
+       mxc_set_cpu_type(MXC_CPU_MX1);
+
        iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc));
 }
index e54057fb855b102a5b00a34ed5efc8f849ab4d33..7a648c18393042a854787f5f48d17ed3514dd2dd 100644 (file)
@@ -198,7 +198,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
        .phys_io        = IMX_IO_PHYS,
        .io_pg_offst    = (IMX_IO_BASE >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx1_map_io,
        .init_irq       = mxc_init_irq,
        .timer          = &mx1ads_timer,
        .init_machine   = mx1ads_init,
index 0e71f3fa28bf3ba5a916a632768d3e2d92a0ed4f..20e0b5bcdffcdc65538616d23cd25ba395e365e8 100644 (file)
@@ -153,7 +153,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
        .phys_io        = 0x00200000,
        .io_pg_offst    = ((0xe0200000) >> 18) & 0xfffc,
        .boot_params    = 0x08000100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx1_map_io,
        .init_irq       = mxc_init_irq,
        .timer          = &scb9328_timer,
        .init_machine   = scb9328_init,
index bd51dd04948eee62cb0415fe5ebc806a2ac287a0..169372f69d8f80871229669ad732e7c5593517e3 100644 (file)
@@ -69,7 +69,17 @@ static struct map_desc mxc_io_desc[] __initdata = {
  * system startup to create static physical to virtual
  * memory map for the IO modules.
  */
-void __init mxc_map_io(void)
+void __init mx21_map_io(void)
 {
+       mxc_set_cpu_type(MXC_CPU_MX21);
+
        iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
 }
+
+void __init mx27_map_io(void)
+{
+       mxc_set_cpu_type(MXC_CPU_MX27);
+
+       iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
+}
+
index 4a3b097adc12afa6e8c88e3c081a3ac334789064..f4ad932ba24fd82d7340177fa3ab914aa8db03e4 100644 (file)
@@ -277,7 +277,7 @@ static struct map_desc mx27ads_io_desc[] __initdata = {
 
 static void __init mx27ads_map_io(void)
 {
-       mxc_map_io();
+       mx27_map_io();
        iotable_init(mx27ads_io_desc, ARRAY_SIZE(mx27ads_io_desc));
 }
 
index aa4eaa61d1b5852bb58830cfdc6b9121741cc77e..732937ca2c9f01e5e494f7b158616cd880d6d284 100644 (file)
@@ -295,7 +295,7 @@ MACHINE_START(PCM038, "phyCORE-i.MX27")
        .phys_io        = AIPI_BASE_ADDR,
        .io_pg_offst    = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx27_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = pcm038_init,
        .timer          = &pcm038_timer,
index 1814ba44d1b99ce674c27539405eb64879457196..0d76521cb491c6bea2b79f49a8c5af682962b392 100644 (file)
@@ -440,8 +440,6 @@ int __init mx35_clocks_init()
        int i;
        unsigned int ll = 0;
 
-       mxc_set_cpu_type(MXC_CPU_MX35);
-
 #ifdef CONFIG_DEBUG_LL_CONSOLE
        ll = (3 << 16);
 #endif
index 9957a11533a4471fc7a03837417bf740e8765ae9..09cbd4a15f816d63b5fb11f65da673cdb04ae057 100644 (file)
@@ -566,8 +566,6 @@ int __init mx31_clocks_init(unsigned long fref)
        u32 reg;
        int i;
 
-       mxc_set_cpu_type(MXC_CPU_MX31);
-
        ckih_rate = fref;
 
        for (i = 0; i < ARRAY_SIZE(lookups); i++)
index 9e1459cb4b74891d960baff040476f9d322e6449..1f5fdd456cb987eed24908cc97b6e00b71f13819 100644 (file)
@@ -72,8 +72,17 @@ static struct map_desc mxc_io_desc[] __initdata = {
  * system startup to create static physical to virtual memory mappings
  * for the IO modules.
  */
-void __init mxc_map_io(void)
+void __init mx31_map_io(void)
 {
+       mxc_set_cpu_type(MXC_CPU_MX31);
+
+       iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
+}
+
+void __init mx35_map_io(void)
+{
+       mxc_set_cpu_type(MXC_CPU_MX35);
+
        iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
 }
 
index a6d6efefa6aa6ea468d08978ad45025e272bb308..db2e06a8123d2f2d207d51a8a833da4988d16a08 100644 (file)
@@ -511,7 +511,7 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
  */
 static void __init mx31ads_map_io(void)
 {
-       mxc_map_io();
+       mx31_map_io();
        iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc));
 }
 
index 894d98cd9941a108ee6dde70d5dc00ec00f083f6..76b36da92237a44459f3f39228ca4ee6e9acac1d 100644 (file)
@@ -59,7 +59,7 @@ static struct map_desc mx31lite_io_desc[] __initdata = {
  */
 void __init mx31lite_map_io(void)
 {
-       mxc_map_io();
+       mx31_map_io();
        iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc));
 }
 
index 34c2a1b99d4fdfbb31eafba6e4653513c9d0fef8..77168ed555ed8e718a4bcce22b5e772ec37c29df 100644 (file)
@@ -117,7 +117,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx31_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31moboard_timer,
index bc63f17856913205cb644ba8cffd0f72cfaa19fd..048084bc613366ad4afa595449f50cd436737c13 100644 (file)
@@ -84,7 +84,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx31_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31pdk_timer,
index bd475cccc57bc0bca60fb71f7ca28d145e19c98c..68098917cc83ca6a6d70eb328863b6f8b554428f 100644 (file)
@@ -309,7 +309,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx31_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &pcm037_timer,
index 638b358a02f257dd0da17a8e677308c863481cd5..8d27c324abf2a1d862e5b07a64f3a19e3e4eb301 100644 (file)
@@ -244,7 +244,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
        .phys_io        = AIPS1_BASE_ADDR,
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
-       .map_io         = mxc_map_io,
+       .map_io         = mx35_map_io,
        .init_irq       = mxc_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &pcm043_timer,
index b2f9b72644db4a019f9cfb054008e7338d37e524..02c3cd004db3b7a52f045be026a75d3f26eaab04 100644 (file)
 struct platform_device;
 struct clk;
 
-extern void mxc_map_io(void);
+extern void mx1_map_io(void);
+extern void mx21_map_io(void);
+extern void mx27_map_io(void);
+extern void mx31_map_io(void);
+extern void mx35_map_io(void);
 extern void mxc_init_irq(void);
 extern void mxc_timer_init(struct clk *timer_clk);
 extern int mx1_clocks_init(unsigned long fref);