diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index cd0bd36221b9e30a33708f0e0d77dcd605665bce..072196c57263ecd3c5a0b34d4a1e2e33b9df6f8c 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -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 diff --git a/arch/arm/mach-ux500/cpu-u8500.c b/arch/arm/mach-ux500/cpu-u8500.c index 51e9bf2d71e247d8805655597047f55c53d2f32d..d04299f3b6b5fc59b2ea6fb88bf5a2439f0ef971 100644 --- a/arch/arm/mach-ux500/cpu-u8500.c +++ b/arch/arm/mach-ux500/cpu-u8500.c @@ -17,9 +17,7 @@ #include #include -#include #include -#include #include #include #include @@ -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, -}; diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 05615c094493f6f5b09530c94787425e61ed40a7..d81ad023963c74dbb1ea8998cd9ed541cae5da8e 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -13,7 +13,9 @@ #include #include #include +#include +#include #include #include #include @@ -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, +}; diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index 6187effe92db0e83526ef9beb07e08f0c39e9a5b..c730d078f9abf4064d15d0c4cfddb95f385c78ce 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h @@ -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), \