aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/cpu.c')
-rw-r--r--arch/arm/mach-ux500/cpu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 05615c09449..d81ad023963 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}
77early_initcall(ux500_l2x0_init); 79early_initcall(ux500_l2x0_init);
78#endif 80#endif
81
82static 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
97struct sys_timer ux500_timer = {
98 .init = ux500_timer_init,
99};