summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-nomadik/timer.c
diff options
context:
space:
mode:
authorLinus Walleij2012-01-11 09:46:59 +0100
committerLinus Walleij2012-01-31 00:05:24 +0100
commitb9576623c4217a5d753c272158e1e108c25a1a57 (patch)
tree0c6e4b503990c4b1fe6f48d50623603f0fddbf65 /arch/arm/plat-nomadik/timer.c
parentLinux 3.3-rc1 (diff)
downloadkernel-qcow2-linux-b9576623c4217a5d753c272158e1e108c25a1a57.tar.gz
kernel-qcow2-linux-b9576623c4217a5d753c272158e1e108c25a1a57.tar.xz
kernel-qcow2-linux-b9576623c4217a5d753c272158e1e108c25a1a57.zip
ARM: plat-nomadik: get rid of global mtu base pointer
Pass the base offset to the Nomadik MTU timer in the init call instead of keeping a global pointer to be assigned. Acked-by: Alessandro Rubini <rubini@unipv.it> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/plat-nomadik/timer.c')
-rw-r--r--arch/arm/plat-nomadik/timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index ad1b45b605a4..46f50f24205f 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -66,12 +66,11 @@
#define MTU_PCELL2 0xff8
#define MTU_PCELL3 0xffC
+static void __iomem *mtu_base;
static bool clkevt_periodic;
static u32 clk_prescale;
static u32 nmdk_cycle; /* write-once */
-void __iomem *mtu_base; /* Assigned by machine code */
-
#ifdef CONFIG_NOMADIK_MTU_SCHED_CLOCK
/*
* Override the global weak sched_clock symbol with this
@@ -183,11 +182,12 @@ void nmdk_clksrc_reset(void)
mtu_base + MTU_CR(0));
}
-void __init nmdk_timer_init(void)
+void __init nmdk_timer_init(void __iomem *base)
{
unsigned long rate;
struct clk *clk0;
+ mtu_base = base;
clk0 = clk_get_sys("mtu0", NULL);
BUG_ON(IS_ERR(clk0));