]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: imx5: let pm code map CCM block on its own
authorShawn Guo <shawn.guo@linaro.org>
Sat, 25 Apr 2015 14:38:19 +0000 (22:38 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Wed, 3 Jun 2015 06:44:30 +0000 (14:44 +0800)
We are about to move imx5 clock driver into drivers/clk, so let's get
imx5 pm code map CCM block on its own rather than relying on clock
driver to do the mapping.

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

index 0f7e536147cb09d3d86783bb30550b931d971a22..f341464fe7e985451fac6bc44c8809e28e65a967 100644 (file)
@@ -133,8 +133,6 @@ static struct clk_onecell_data clk_data;
 
 static void __init mx5_clocks_common_init(void __iomem *ccm_base)
 {
-       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 3682d094a25908d77febe53f2622c119d3f5d010..fe510fbd0c8c77aecb5d9a35870bf0de66c89ffe 100644 (file)
@@ -132,11 +132,9 @@ void imx6q_pm_set_ccm_base(void __iomem *base);
 #ifdef CONFIG_PM
 void imx51_pm_init(void);
 void imx53_pm_init(void);
-void imx5_pm_set_ccm_base(void __iomem *base);
 #else
 static inline void imx51_pm_init(void) {}
 static inline void imx53_pm_init(void) {}
-static inline void imx5_pm_set_ccm_base(void __iomem *base) {}
 #endif
 
 #ifdef CONFIG_NEON
index f1f80ab73e692ea70e95044eb016e92c9eddc28f..b04025592d944458fd6807523b7fa92ea59cfe5f 100644 (file)
 #define IMX5_DEFAULT_CPU_IDLE_STATE WAIT_UNCLOCKED_POWER_OFF
 
 struct imx5_pm_data {
+       phys_addr_t ccm_addr;
        phys_addr_t cortex_addr;
        phys_addr_t gpc_addr;
 };
 
 static const struct imx5_pm_data imx51_pm_data __initconst = {
+       .ccm_addr = 0x73fd4000,
        .cortex_addr = 0x83fa0000,
        .gpc_addr = 0x73fd8000,
 };
 
 static const struct imx5_pm_data imx53_pm_data __initconst = {
+       .ccm_addr = 0x53fd4000,
        .cortex_addr = 0x63fa0000,
        .gpc_addr = 0x53fd8000,
 };
@@ -68,11 +71,6 @@ static void __iomem *ccm_base;
 static void __iomem *cortex_base;
 static void __iomem *gpc_base;
 
-void __init imx5_pm_set_ccm_base(void __iomem *base)
-{
-       ccm_base = base;
-}
-
 /*
  * set cpu low power mode before WFI instruction. This function is called
  * mx5 because it can be used for mx51, and mx53.
@@ -208,6 +206,7 @@ static int __init imx5_pm_common_init(const struct imx5_pm_data *data)
 
        arm_pm_idle = imx5_pm_idle;
 
+       ccm_base = ioremap(data->ccm_addr, SZ_16K);
        cortex_base = ioremap(data->cortex_addr, SZ_16K);
        gpc_base = ioremap(data->gpc_addr, SZ_16K);
        WARN_ON(!ccm_base || !cortex_base || !gpc_base);