From 5ab96a8df094b87673b67e4dce70e31248d663a3 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sat, 25 Apr 2015 16:02:53 +0800 Subject: ARM: imx: use dynamic mapping for CCM Replace the static mapping of CCM block in clock drivers with dynamic mapping. Signed-off-by: Shawn Guo --- arch/arm/mach-imx/clk-imx35.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-imx/clk-imx35.c') diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index 4ef1e8bdac5b..5818521a8766 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c @@ -71,11 +71,14 @@ static struct clk *clk[clk_max]; int __init mx35_clocks_init(void) { - void __iomem *base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); + void __iomem *base; u32 pdr0, consumer_sel, hsp_sel; struct arm_ahb_div *aad; unsigned char *hsp_div; + base = ioremap(MX35_CCM_BASE_ADDR, SZ_4K); + BUG_ON(!base); + pdr0 = __raw_readl(base + MXC_CCM_PDR0); consumer_sel = (pdr0 >> 16) & 0xf; aad = &clk_consumer[consumer_sel]; -- cgit v1.2.3