static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) { bool hwsup = false; if (!clkdm->prcm_partition) return 0; /* * The CLKDM_MISSING_IDLE_REPORTING flag documentation has * more details on the unpleasant problem this is working * around */ if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING && !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { omap4_clkdm_allow_idle(clkdm); return 0; } hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, clkdm->cm_inst, clkdm->clkdm_offs); if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) omap4_clkdm_sleep(clkdm); return 0; }
static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) { if (clkdm->flags & CLKDM_CAN_HWSUP) omap4_clkdm_allow_idle(clkdm); else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP) omap4_clkdm_sleep(clkdm); return 0; }
static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) { bool hwsup = false; hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, clkdm->cm_inst, clkdm->clkdm_offs); if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) omap4_clkdm_sleep(clkdm); return 0; }
static int omap4_clkdm_restore_context(struct clockdomain *clkdm) { switch (clkdm->context) { case OMAP34XX_CLKSTCTRL_DISABLE_AUTO: omap4_clkdm_deny_idle(clkdm); break; case OMAP34XX_CLKSTCTRL_FORCE_SLEEP: omap4_clkdm_sleep(clkdm); break; case OMAP34XX_CLKSTCTRL_FORCE_WAKEUP: omap4_clkdm_wakeup(clkdm); break; case OMAP34XX_CLKSTCTRL_ENABLE_AUTO: omap4_clkdm_allow_idle(clkdm); break; } return 0; }