aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-01-26 22:12:59 -0500
committerPaul Walmsley <paul@pwsan.com>2010-01-26 22:12:59 -0500
commit55ed96945b1f3d0f4ad21a27b32ce4bd99d8c268 (patch)
tree0bec60498742922a9c00f39ff63eb48549d391fc /arch/arm/mach-omap2/pm34xx.c
parent6b04e0d99d4113ede24e263e3df246a17f490339 (diff)
OMAP2/3 clkdm/pwrdm: move wkdep/sleepdep handling from pwrdm to clkdm
Move clockdomain wakeup dependency and sleep dependency data structures from the powerdomain layer to the clockdomain layer, where they belong. These dependencies were originally placed in the powerdomain layer due to unclear documentation; however, it is clear now that these dependencies are between clockdomains. For OMAP2/3, this is not such a big problem, but for OMAP4 this needs to be fixed. Thanks to Benoît Cousson <b-cousson@ti.com> for his advice on this patch. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoît Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r--arch/arm/mach-omap2/pm34xx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index f841a6e33611..5f59df87abf7 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -1018,6 +1018,7 @@ void omap_push_sram_idle(void)
1018static int __init omap3_pm_init(void) 1018static int __init omap3_pm_init(void)
1019{ 1019{
1020 struct power_state *pwrst, *tmp; 1020 struct power_state *pwrst, *tmp;
1021 struct clockdomain *neon_clkdm, *per_clkdm, *mpu_clkdm, *core_clkdm;
1021 int ret; 1022 int ret;
1022 1023
1023 if (!cpu_is_omap34xx()) 1024 if (!cpu_is_omap34xx())
@@ -1057,6 +1058,11 @@ static int __init omap3_pm_init(void)
1057 core_pwrdm = pwrdm_lookup("core_pwrdm"); 1058 core_pwrdm = pwrdm_lookup("core_pwrdm");
1058 cam_pwrdm = pwrdm_lookup("cam_pwrdm"); 1059 cam_pwrdm = pwrdm_lookup("cam_pwrdm");
1059 1060
1061 neon_clkdm = clkdm_lookup("neon_clkdm");
1062 mpu_clkdm = clkdm_lookup("mpu_clkdm");
1063 per_clkdm = clkdm_lookup("per_clkdm");
1064 core_clkdm = clkdm_lookup("core_clkdm");
1065
1060 omap_push_sram_idle(); 1066 omap_push_sram_idle();
1061#ifdef CONFIG_SUSPEND 1067#ifdef CONFIG_SUSPEND
1062 suspend_set_ops(&omap_pm_ops); 1068 suspend_set_ops(&omap_pm_ops);
@@ -1065,14 +1071,14 @@ static int __init omap3_pm_init(void)
1065 pm_idle = omap3_pm_idle; 1071 pm_idle = omap3_pm_idle;
1066 omap3_idle_init(); 1072 omap3_idle_init();
1067 1073
1068 pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm); 1074 clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
1069 /* 1075 /*
1070 * REVISIT: This wkdep is only necessary when GPIO2-6 are enabled for 1076 * REVISIT: This wkdep is only necessary when GPIO2-6 are enabled for
1071 * IO-pad wakeup. Otherwise it will unnecessarily waste power 1077 * IO-pad wakeup. Otherwise it will unnecessarily waste power
1072 * waking up PER with every CORE wakeup - see 1078 * waking up PER with every CORE wakeup - see
1073 * http://marc.info/?l=linux-omap&m=121852150710062&w=2 1079 * http://marc.info/?l=linux-omap&m=121852150710062&w=2
1074 */ 1080 */
1075 pwrdm_add_wkdep(per_pwrdm, core_pwrdm); 1081 clkdm_add_wkdep(per_clkdm, core_clkdm);
1076 1082
1077 if (omap_type() != OMAP2_DEVICE_TYPE_GP) { 1083 if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
1078 omap3_secure_ram_storage = 1084 omap3_secure_ram_storage =