From 6c529c499fecfe65da6429917bd9cb319040c69e Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sat, 25 Apr 2015 15:44:10 +0800 Subject: ARM: imx: use dynamic mapping for timer Pass physical address of timer block to mxc_timer_init() call, which in turn does dynamic mapping within the function. Thus, we can avoid using static mapping in clock drivers. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/time.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-imx/time.c') diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 15d18e198303..acb1ff577cda 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c @@ -344,12 +344,13 @@ static void __init _mxc_timer_init(int irq, setup_irq(irq, &mxc_timer_irq); } -void __init mxc_timer_init(void __iomem *base, int irq) +void __init mxc_timer_init(unsigned long pbase, int irq) { struct clk *clk_per = clk_get_sys("imx-gpt.0", "per"); struct clk *clk_ipg = clk_get_sys("imx-gpt.0", "ipg"); - timer_base = base; + timer_base = ioremap(pbase, SZ_4K); + BUG_ON(!timer_base); _mxc_timer_init(irq, clk_per, clk_ipg); } -- cgit v1.2.3