예제 #1
0
static int omap4_clkdm_clk_enable(struct clockdomain *clkdm)
{
	if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
		return omap4_clkdm_wakeup(clkdm);

	return 0;
}
예제 #2
0
static void omap4_clkdm_deny_idle(struct clockdomain *clkdm)
{
	if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
		omap4_clkdm_wakeup(clkdm);
	else
		omap4_cminst_clkdm_disable_hwsup(clkdm->prcm_partition,
						 clkdm->cm_inst,
						 clkdm->clkdm_offs);
}
예제 #3
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;
}