Message ID | 1391811659-33716-2-git-send-email-d-gerlach@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 7 Feb 2014, Dave Gerlach wrote: > Since commit 65aa94b204d (ARM: OMAP4: clockdomain/CM code: Update supported > transition modes), on OMAP4, all CLKDMs support HW_AUTO so this is used > instead of SW_SLEEP for the idling of clockdomains. However, additional > SoCs now leverage the OMAP4 clockdomain code so update it to use SW_SLEEP > if the clockdomain data specifies that the CLKDM has the > CLKDM_CAN_FORCE_SLEEP flag set rather than using HW_AUTO for both cases. > > Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Thanks, queued for v3.15 unless someone else complains. Significant chunks of PM are pretty much broken now in mainline. So probably folks won't be able to detect a regression immediately. But I agree with the basic idea. - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 19 Feb 2014, Paul Walmsley wrote: > On Fri, 7 Feb 2014, Dave Gerlach wrote: > > > Since commit 65aa94b204d (ARM: OMAP4: clockdomain/CM code: Update supported > > transition modes), on OMAP4, all CLKDMs support HW_AUTO so this is used > > instead of SW_SLEEP for the idling of clockdomains. However, additional > > SoCs now leverage the OMAP4 clockdomain code so update it to use SW_SLEEP > > if the clockdomain data specifies that the CLKDM has the > > CLKDM_CAN_FORCE_SLEEP flag set rather than using HW_AUTO for both cases. > > > > Signed-off-by: Dave Gerlach <d-gerlach@ti.com> > > Thanks, queued for v3.15 unless someone else complains. > > Significant chunks of PM are pretty much broken now in mainline. So > probably folks won't be able to detect a regression immediately. But I > agree with the basic idea. By the way, please don't forget to Cc: any patches you send to the linux-arm-kernel mailing list also, at linux-arm-kernel@lists.infradead.org. - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 731ca13..f5c4731 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -254,6 +254,11 @@ void omap4_cminst_clkdm_force_wakeup(u8 part, u16 inst, u16 cdoffs) * */ +void omap4_cminst_clkdm_force_sleep(u8 part, u16 inst, u16 cdoffs) +{ + _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_SLEEP, part, inst, cdoffs); +} + /** * omap4_cminst_wait_module_ready - wait for a module to be in 'func' state * @part: PRCM partition ID that the CM_CLKCTRL register exists in @@ -404,8 +409,17 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm) static int omap4_clkdm_sleep(struct clockdomain *clkdm) { - omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, - clkdm->cm_inst, clkdm->clkdm_offs); + if (clkdm->flags & CLKDM_CAN_HWSUP) + omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, + clkdm->cm_inst, + clkdm->clkdm_offs); + else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP) + omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, + clkdm->cm_inst, + clkdm->clkdm_offs); + else + return -EINVAL; + return 0; }
Since commit 65aa94b204d (ARM: OMAP4: clockdomain/CM code: Update supported transition modes), on OMAP4, all CLKDMs support HW_AUTO so this is used instead of SW_SLEEP for the idling of clockdomains. However, additional SoCs now leverage the OMAP4 clockdomain code so update it to use SW_SLEEP if the clockdomain data specifies that the CLKDM has the CLKDM_CAN_FORCE_SLEEP flag set rather than using HW_AUTO for both cases. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> --- arch/arm/mach-omap2/cminst44xx.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)