diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2015-04-25 15:44:10 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2015-06-03 14:44:29 +0800 |
commit | 6c529c499fecfe65da6429917bd9cb319040c69e (patch) | |
tree | 479b41c66c118bee48546435d1b6d8a093e1cbbf /arch/arm/mach-imx/time.c | |
parent | 0ed4668a5fafa922f450fca4b3431610a21626c5 (diff) | |
download | linux-6c529c499fecfe65da6429917bd9cb319040c69e.tar.bz2 |
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 <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/time.c')
-rw-r--r-- | arch/arm/mach-imx/time.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |