diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-05-03 03:28:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-04 12:50:05 -0400 |
commit | 41ac329f607add059ae8b063375c5d9d6e7471cf (patch) | |
tree | b8e33a20cbac44e3f8cecef764e55b1d9ba7e311 /arch/arm/mach-ux500/cpu.c | |
parent | 5b1f7ddf18b75adeb433ef9d91a2e4bd7580facc (diff) |
ARM: 6087/1: ux500: move sys_timer to cpu.c
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>
Diffstat (limited to 'arch/arm/mach-ux500/cpu.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 05615c094493..d81ad023963c 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -13,7 +13,9 @@ | |||
13 | #include <asm/hardware/cache-l2x0.h> | 13 | #include <asm/hardware/cache-l2x0.h> |
14 | #include <asm/hardware/gic.h> | 14 | #include <asm/hardware/gic.h> |
15 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
16 | #include <asm/localtimer.h> | ||
16 | 17 | ||
18 | #include <plat/mtu.h> | ||
17 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
18 | #include <mach/setup.h> | 20 | #include <mach/setup.h> |
19 | #include <mach/devices.h> | 21 | #include <mach/devices.h> |
@@ -76,3 +78,22 @@ static int ux500_l2x0_init(void) | |||
76 | } | 78 | } |
77 | early_initcall(ux500_l2x0_init); | 79 | early_initcall(ux500_l2x0_init); |
78 | #endif | 80 | #endif |
81 | |||
82 | static void __init ux500_timer_init(void) | ||
83 | { | ||
84 | #ifdef CONFIG_LOCAL_TIMERS | ||
85 | /* Setup the local timer base */ | ||
86 | twd_base = __io_address(UX500_TWD_BASE); | ||
87 | #endif | ||
88 | /* Setup the MTU base */ | ||
89 | if (cpu_is_u8500ed()) | ||
90 | mtu_base = __io_address(U8500_MTU0_BASE_ED); | ||
91 | else | ||
92 | mtu_base = __io_address(UX500_MTU0_BASE); | ||
93 | |||
94 | nmdk_timer_init(); | ||
95 | } | ||
96 | |||
97 | struct sys_timer ux500_timer = { | ||
98 | .init = ux500_timer_init, | ||
99 | }; | ||