]> Pileus Git - ~andy/linux/commitdiff
ARM: mach-shmobile: sh73a0 map_io and init_early update
authorMagnus Damm <damm@opensource.se>
Wed, 29 Feb 2012 12:37:27 +0000 (21:37 +0900)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 12 Mar 2012 21:19:41 +0000 (22:19 +0100)
Update the sh73a0 SoC and the AG5EVM and Kota2 boards to make use
of the functions sh73a0_map_io() and sh73a0_add_early_devices().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-kota2.c
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/setup-sh73a0.c

index 068b754bc348ff20f1c091264cb80e3a09edf134..cd894a200d52148b08aa59e73cdbebc5edacf376 100644 (file)
@@ -46,7 +46,6 @@
 #include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/map.h>
 #include <asm/mach/time.h>
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -486,27 +485,6 @@ static struct platform_device *ag5evm_devices[] __initdata = {
        &sdhi1_device,
 };
 
-static struct map_desc ag5evm_io_desc[] __initdata = {
-       /* create a 1:1 entity map for 0xe6xxxxxx
-        * used by CPGA, INTC and PFC.
-        */
-       {
-               .virtual        = 0xe6000000,
-               .pfn            = __phys_to_pfn(0xe6000000),
-               .length         = 256 << 20,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-static void __init ag5evm_map_io(void)
-{
-       iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
-
-       /* setup early devices and console here as well */
-       sh73a0_add_early_devices();
-       shmobile_setup_console();
-}
-
 static void __init ag5evm_init(void)
 {
        sh73a0_pinmux_init();
@@ -634,7 +612,8 @@ struct sys_timer ag5evm_timer = {
 };
 
 MACHINE_START(AG5EVM, "ag5evm")
-       .map_io         = ag5evm_map_io,
+       .map_io         = sh73a0_map_io,
+       .init_early     = sh73a0_add_early_devices,
        .nr_irqs        = NR_IRQS_LEGACY,
        .init_irq       = sh73a0_init_irq,
        .handle_irq     = gic_handle_irq,
index c8e7ca23fc06f57794feca6900bf89a1445e41c4..cfc5f413cf0f7d2c9e4dbdc4f07237c80b1d5a40 100644 (file)
@@ -43,7 +43,6 @@
 #include <mach/common.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
-#include <asm/mach/map.h>
 #include <asm/mach/time.h>
 #include <asm/hardware/gic.h>
 #include <asm/hardware/cache-l2x0.h>
@@ -409,27 +408,6 @@ static struct platform_device *kota2_devices[] __initdata = {
        &sdhi1_device,
 };
 
-static struct map_desc kota2_io_desc[] __initdata = {
-       /* create a 1:1 entity map for 0xe6xxxxxx
-        * used by CPGA, INTC and PFC.
-        */
-       {
-               .virtual        = 0xe6000000,
-               .pfn            = __phys_to_pfn(0xe6000000),
-               .length         = 256 << 20,
-               .type           = MT_DEVICE_NONSHARED
-       },
-};
-
-static void __init kota2_map_io(void)
-{
-       iotable_init(kota2_io_desc, ARRAY_SIZE(kota2_io_desc));
-
-       /* setup early devices and console here as well */
-       sh73a0_add_early_devices();
-       shmobile_setup_console();
-}
-
 static void __init kota2_init(void)
 {
        sh73a0_pinmux_init();
@@ -547,7 +525,8 @@ struct sys_timer kota2_timer = {
 };
 
 MACHINE_START(KOTA2, "kota2")
-       .map_io         = kota2_map_io,
+       .map_io         = sh73a0_map_io,
+       .init_early     = sh73a0_add_early_devices,
        .nr_irqs        = NR_IRQS_LEGACY,
        .init_irq       = sh73a0_init_irq,
        .handle_irq     = gic_handle_irq,
index 3858b897f98be9d33f0daf663767df7a0ecaf92c..a0e0cfb4c545d12ce4962ab5547ae9419a5d9c34 100644 (file)
@@ -44,6 +44,7 @@ extern struct clk sh7372_extal1_clk;
 extern struct clk sh7372_extal2_clk;
 
 extern void sh73a0_init_irq(void);
+extern void sh73a0_map_io(void);
 extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
 extern void sh73a0_clock_init(void);
index 20e71e5cace4723dabc8276f47d3e1cfef8daf64..988eeb3782c7441666d2d6bbdf4bb4d34029db69 100644 (file)
 #include <linux/sh_timer.h>
 #include <mach/hardware.h>
 #include <mach/sh73a0.h>
+#include <mach/common.h>
 #include <asm/mach-types.h>
+#include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 
+static struct map_desc sh73a0_io_desc[] __initdata = {
+       /* create a 1:1 entity map for 0xe6xxxxxx
+        * used by CPGA, INTC and PFC.
+        */
+       {
+               .virtual        = 0xe6000000,
+               .pfn            = __phys_to_pfn(0xe6000000),
+               .length         = 256 << 20,
+               .type           = MT_DEVICE_NONSHARED
+       },
+};
+
+void __init sh73a0_map_io(void)
+{
+       iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
+}
+
 static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xe6c40000,
        .flags          = UPF_BOOT_AUTOCONF,
@@ -671,4 +690,7 @@ void __init sh73a0_add_early_devices(void)
 {
        early_platform_add_devices(sh73a0_early_devices,
                                   ARRAY_SIZE(sh73a0_early_devices));
+
+       /* setup early console here as well */
+       shmobile_setup_console();
 }