ARM: DRA7: Add hook in SoC initcalls to enable pm initialization
authorRajendra Nayak <rnayak@ti.com>
Fri, 22 Aug 2014 14:02:34 +0000 (09:02 -0500)
committerTony Lindgren <tony@atomide.com>
Mon, 8 Sep 2014 22:50:39 +0000 (15:50 -0700)
With consolidated code, now we can add the required hooks for
DRA7 to enable power management.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
[nm@ti.com: minor modifications]
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/io.c

index 5bb15920f73ac94a2cbe6552566b13bd80aa8362..b6d2989d27e20accf102c021cc3539051f264e56 100644 (file)
@@ -60,7 +60,7 @@ static inline int omap3_pm_init(void)
 }
 #endif
 
-#if defined(CONFIG_PM) && (defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5))
+#if defined(CONFIG_PM) && (defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX))
 int omap4_pm_init(void);
 int omap4_pm_init_early(void);
 #else
index 2890c2df09f686ad5934a8186a0168394b5eb9b2..831805e40529d02133e28cd24e37713f670c6c7f 100644 (file)
@@ -698,6 +698,7 @@ void __init dra7xx_init_early(void)
        omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(DRA7XX_CM_CORE_AON_BASE),
                             OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE));
        omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
+       omap4_pm_init_early();
        omap_prm_base_init();
        omap_cm_base_init();
        omap44xx_prm_init();
@@ -712,6 +713,8 @@ void __init dra7xx_init_early(void)
 void __init dra7xx_init_late(void)
 {
        omap_common_late_init();
+       omap4_pm_init();
+       omap2_clk_enable_autoidle_all();
 }
 #endif