summaryrefslogtreecommitdiff
path: root/arch/arm/mach-prima2/timer.c
diff options
context:
space:
mode:
authorBinghua Duan <Binghua.Duan@csr.com>2012-08-20 06:42:36 +0000
committerMike Turquette <mturquette@linaro.org>2012-08-24 12:09:30 -0700
commit198678b0b8533efce832f0c99c8d35ad8fecb333 (patch)
tree55e9976889b17f18e5cc170b5c61ecbc2f95cfaa /arch/arm/mach-prima2/timer.c
parentfea7a08acb13524b47711625eebea40a0ede69a0 (diff)
ARM: PRIMA2: convert to common clk and finish full clk tree
Commit 02c981c07bc95ac1e only implements a little part of primaII clk tree due to common clk framework was not ready at that time. This patch converts the old driver to common clk and finish the full clk tree. Signed-off-by: Binghua Duan <Binghua.Duan@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-prima2/timer.c')
-rw-r--r--arch/arm/mach-prima2/timer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index f224107de7bc..d95bf252f694 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -21,6 +21,8 @@
#include <asm/sched_clock.h>
#include <asm/mach/time.h>
+#include "common.h"
+
#define SIRFSOC_TIMER_COUNTER_LO 0x0000
#define SIRFSOC_TIMER_COUNTER_HI 0x0004
#define SIRFSOC_TIMER_MATCH_0 0x0008
@@ -188,9 +190,13 @@ static void __init sirfsoc_clockevent_init(void)
static void __init sirfsoc_timer_init(void)
{
unsigned long rate;
+ struct clk *clk;
+
+ /* initialize clocking early, we want to set the OS timer */
+ sirfsoc_of_clk_init();
/* timer's input clock is io clock */
- struct clk *clk = clk_get_sys("io", NULL);
+ clk = clk_get_sys("io", NULL);
BUG_ON(IS_ERR(clk));