ARM: 6087/1: ux500: move sys_timer to cpu.c
authorRabin Vincent <rabin.vincent@stericsson.com>
Mon, 3 May 2010 07:28:05 +0000 (08:28 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 4 May 2010 16:50:05 +0000 (17:50 +0100)
Move the common system timer setup code to cpu.c.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/cpu-u8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/include/mach/setup.h

index cd0bd36..072196c 100644 (file)
@@ -145,6 +145,6 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
        .map_io         = u8500_map_io,
        .init_irq       = ux500_init_irq,
        /* we re-use nomadik timer here */
-       .timer          = &u8500_timer,
+       .timer          = &ux500_timer,
        .init_machine   = u8500_init_machine,
 MACHINE_END
index 51e9bf2..d04299f 100644 (file)
@@ -17,9 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 
-#include <asm/localtimer.h>
 #include <asm/mach/map.h>
-#include <plat/mtu.h>
 #include <mach/hardware.h>
 #include <mach/setup.h>
 #include <mach/devices.h>
@@ -78,22 +76,3 @@ void __init u8500_init_devices(void)
 
        return ;
 }
-
-static void __init u8500_timer_init(void)
-{
-#ifdef CONFIG_LOCAL_TIMERS
-       /* Setup the local timer base */
-       twd_base = __io_address(U8500_TWD_BASE);
-#endif
-       /* Setup the MTU base */
-       if (cpu_is_u8500ed())
-               mtu_base = __io_address(U8500_MTU0_BASE_ED);
-       else
-               mtu_base = __io_address(U8500_MTU0_BASE);
-
-       nmdk_timer_init();
-}
-
-struct sys_timer u8500_timer = {
-       .init   = u8500_timer_init,
-};
index 05615c0..d81ad02 100644 (file)
@@ -13,7 +13,9 @@
 #include <asm/hardware/cache-l2x0.h>
 #include <asm/hardware/gic.h>
 #include <asm/mach/map.h>
+#include <asm/localtimer.h>
 
+#include <plat/mtu.h>
 #include <mach/hardware.h>
 #include <mach/setup.h>
 #include <mach/devices.h>
@@ -76,3 +78,22 @@ static int ux500_l2x0_init(void)
 }
 early_initcall(ux500_l2x0_init);
 #endif
+
+static void __init ux500_timer_init(void)
+{
+#ifdef CONFIG_LOCAL_TIMERS
+       /* Setup the local timer base */
+       twd_base = __io_address(UX500_TWD_BASE);
+#endif
+       /* Setup the MTU base */
+       if (cpu_is_u8500ed())
+               mtu_base = __io_address(U8500_MTU0_BASE_ED);
+       else
+               mtu_base = __io_address(UX500_MTU0_BASE);
+
+       nmdk_timer_init();
+}
+
+struct sys_timer ux500_timer = {
+       .init   = ux500_timer_init,
+};
index 6187eff..c730d07 100644 (file)
@@ -27,7 +27,7 @@ extern void nmdk_timer_init(void);
 extern void __init amba_add_devices(struct amba_device *devs[], int num);
 
 struct sys_timer;
-extern struct sys_timer u8500_timer;
+extern struct sys_timer ux500_timer;
 
 #define __IO_DEV_DESC(x, sz)   {               \
        .virtual        = IO_ADDRESS(x),        \