• Home
  • Raw
  • Download

Lines Matching refs:clkdm

380 static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm)  in omap4_clkdm_clear_all_wkup_sleep_deps()  argument
385 if (!clkdm->prcm_partition) in omap4_clkdm_clear_all_wkup_sleep_deps()
388 for (cd = clkdm->wkdep_srcs; cd && cd->clkdm_name; cd++) { in omap4_clkdm_clear_all_wkup_sleep_deps()
389 if (!cd->clkdm) in omap4_clkdm_clear_all_wkup_sleep_deps()
392 mask |= 1 << cd->clkdm->dep_bit; in omap4_clkdm_clear_all_wkup_sleep_deps()
396 omap4_cminst_clear_inst_reg_bits(mask, clkdm->prcm_partition, in omap4_clkdm_clear_all_wkup_sleep_deps()
397 clkdm->cm_inst, clkdm->clkdm_offs + in omap4_clkdm_clear_all_wkup_sleep_deps()
402 static int omap4_clkdm_sleep(struct clockdomain *clkdm) in omap4_clkdm_sleep() argument
404 if (clkdm->flags & CLKDM_CAN_HWSUP) in omap4_clkdm_sleep()
405 omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, in omap4_clkdm_sleep()
406 clkdm->cm_inst, in omap4_clkdm_sleep()
407 clkdm->clkdm_offs); in omap4_clkdm_sleep()
408 else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP) in omap4_clkdm_sleep()
409 omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, in omap4_clkdm_sleep()
410 clkdm->cm_inst, in omap4_clkdm_sleep()
411 clkdm->clkdm_offs); in omap4_clkdm_sleep()
418 static int omap4_clkdm_wakeup(struct clockdomain *clkdm) in omap4_clkdm_wakeup() argument
420 omap4_cminst_clkdm_force_wakeup(clkdm->prcm_partition, in omap4_clkdm_wakeup()
421 clkdm->cm_inst, clkdm->clkdm_offs); in omap4_clkdm_wakeup()
425 static void omap4_clkdm_allow_idle(struct clockdomain *clkdm) in omap4_clkdm_allow_idle() argument
427 omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, in omap4_clkdm_allow_idle()
428 clkdm->cm_inst, clkdm->clkdm_offs); in omap4_clkdm_allow_idle()
431 static void omap4_clkdm_deny_idle(struct clockdomain *clkdm) in omap4_clkdm_deny_idle() argument
433 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) in omap4_clkdm_deny_idle()
434 omap4_clkdm_wakeup(clkdm); in omap4_clkdm_deny_idle()
436 omap4_cminst_clkdm_disable_hwsup(clkdm->prcm_partition, in omap4_clkdm_deny_idle()
437 clkdm->cm_inst, in omap4_clkdm_deny_idle()
438 clkdm->clkdm_offs); in omap4_clkdm_deny_idle()
441 static int omap4_clkdm_clk_enable(struct clockdomain *clkdm) in omap4_clkdm_clk_enable() argument
443 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) in omap4_clkdm_clk_enable()
444 return omap4_clkdm_wakeup(clkdm); in omap4_clkdm_clk_enable()
449 static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) in omap4_clkdm_clk_disable() argument
453 if (!clkdm->prcm_partition) in omap4_clkdm_clk_disable()
461 if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING && in omap4_clkdm_clk_disable()
462 !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) { in omap4_clkdm_clk_disable()
463 omap4_clkdm_allow_idle(clkdm); in omap4_clkdm_clk_disable()
467 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, in omap4_clkdm_clk_disable()
468 clkdm->cm_inst, clkdm->clkdm_offs); in omap4_clkdm_clk_disable()
470 if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) in omap4_clkdm_clk_disable()
471 omap4_clkdm_sleep(clkdm); in omap4_clkdm_clk_disable()
487 static int omap4_clkdm_save_context(struct clockdomain *clkdm) in omap4_clkdm_save_context() argument
489 clkdm->context = omap4_cminst_read_inst_reg(clkdm->prcm_partition, in omap4_clkdm_save_context()
490 clkdm->cm_inst, in omap4_clkdm_save_context()
491 clkdm->clkdm_offs + in omap4_clkdm_save_context()
493 clkdm->context &= OMAP4430_MODULEMODE_MASK; in omap4_clkdm_save_context()
503 static int omap4_clkdm_restore_context(struct clockdomain *clkdm) in omap4_clkdm_restore_context() argument
505 switch (clkdm->context) { in omap4_clkdm_restore_context()
507 omap4_clkdm_deny_idle(clkdm); in omap4_clkdm_restore_context()
510 omap4_clkdm_sleep(clkdm); in omap4_clkdm_restore_context()
513 omap4_clkdm_wakeup(clkdm); in omap4_clkdm_restore_context()
516 omap4_clkdm_allow_idle(clkdm); in omap4_clkdm_restore_context()