@@ -202,16 +202,17 @@ static int __init mxc_clocksource_init(struct clk *timer_clk,
void __iomem *addr)
{
unsigned int c = clk_get_rate(timer_clk);
- void __iomem *reg = timer_base + (timer_is_v2() ? V2_TCN : MX1_2_TCN);
+
+ BUG_ON(!addr);
imx_delay_timer.read_current_timer = &imx_read_current_timer;
imx_delay_timer.freq = c;
register_current_timer_delay(&imx_delay_timer);
- sched_clock_reg = reg;
+ sched_clock_reg = addr;
sched_clock_register(mxc_read_sched_clock, 32, c);
- return clocksource_mmio_init(reg, "mxc_timer1", c, 200, 32,
+ return clocksource_mmio_init(addr, "mxc_timer1", c, 200, 32,
clocksource_mmio_readl_up);
}
Removed the use of global variable "timer_base" in the function of mxc_clocksource_init, and get the register address from the input parameter. Signed-off-by: Shenwei Wang <shenwei.wang@freescale.com> --- arch/arm/mach-imx/time.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)