ARM: imx5: reuse clock CCM mapping in pm code
authorShawn Guo <shawn.guo@freescale.com>
Tue, 20 May 2014 05:41:36 +0000 (13:41 +0800)
committerShawn Guo <shawn.guo@freescale.com>
Fri, 18 Jul 2014 08:10:08 +0000 (16:10 +0800)
The imx5 pm code needs to access CCM registers.  Let's remove the use
of CCM static mapping in pm code by reusing the dynamic mapping created
in clock code.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-imx/common.h
arch/arm/mach-imx/pm-imx5.c

index 4b69183..4e95865 100644 (file)
@@ -133,6 +133,8 @@ static void __init mx5_clocks_common_init(void __iomem *ccm_base)
 {
        int i;
 
+       imx5_pm_set_ccm_base(ccm_base);
+
        clk[IMX5_CLK_DUMMY]             = imx_clk_fixed("dummy", 0);
        clk[IMX5_CLK_CKIL]              = imx_obtain_fixed_clock("ckil", 0);
        clk[IMX5_CLK_OSC]               = imx_obtain_fixed_clock("osc", 0);
index 1d6cf4d..8aa198c 100644 (file)
@@ -143,8 +143,10 @@ void imx6q_pm_set_ccm_base(void __iomem *base);
 
 #ifdef CONFIG_PM
 void imx5_pm_init(void);
+void imx5_pm_set_ccm_base(void __iomem *base);
 #else
 static inline void imx5_pm_init(void) {}
+static inline void imx5_pm_set_ccm_base(void __iomem *base) {}
 #endif
 
 #ifdef CONFIG_NEON
Simple merge