Lines Matching +full:de +full:- +full:assertion

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2008-2011 Texas Instruments, Inc.
26 #include "cm-regbits-34xx.h"
30 #include "prcm-common.h"
58 * omap_cm_base_init - Populates the cm partitions
77 * _clkctrl_idlest - read a CM_*_CLKCTRL register; mask & shift IDLEST bitfield
94 * _is_module_ready - can module registers be accessed without causing an abort?
130 /* Read-modify-write a register in CM1. Caller must lock */
171 * _clktrctrl_write - write @c to a CM_CLKSTCTRL.CLKTRCTRL register bitfield
177 * @c must be the unshifted value for CLKTRCTRL - i.e., this function
191 * omap4_cminst_is_clkdm_in_hwsup - is a clockdomain in hwsup idle mode?
197 * is in hardware-supervised idle mode, or 0 otherwise.
211 * omap4_cminst_clkdm_enable_hwsup - put a clockdomain in hwsup-idle mode
217 * hardware-supervised idle mode. No return value.
225 * omap4_cminst_clkdm_disable_hwsup - put a clockdomain in swsup-idle mode
231 * software-supervised idle mode, i.e., controlled manually by the
240 * omap4_cminst_clkdm_force_wakeup - try to take a clockdomain out of idle
263 * omap4_cminst_wait_module_ready - wait for a module to be in 'func' state
282 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; in omap4_cminst_wait_module_ready()
286 * omap4_cminst_wait_module_idle - wait for a module to be in 'disabled'
294 * like reset assertion or parent clock de-activation must wait the
306 return (i < MAX_MODULE_DISABLE_TIME) ? 0 : -EBUSY; in omap4_cminst_wait_module_idle()
310 * omap4_cminst_module_enable - Enable the modulemode inside CLKCTRL
330 * omap4_cminst_module_disable - Disable the module inside CLKCTRL
347 * Clockdomain low-level functions
353 omap4_cminst_set_inst_reg_bits((1 << clkdm2->dep_bit), in omap4_clkdm_add_wkup_sleep_dep()
354 clkdm1->prcm_partition, in omap4_clkdm_add_wkup_sleep_dep()
355 clkdm1->cm_inst, clkdm1->clkdm_offs + in omap4_clkdm_add_wkup_sleep_dep()
363 omap4_cminst_clear_inst_reg_bits((1 << clkdm2->dep_bit), in omap4_clkdm_del_wkup_sleep_dep()
364 clkdm1->prcm_partition, in omap4_clkdm_del_wkup_sleep_dep()
365 clkdm1->cm_inst, clkdm1->clkdm_offs + in omap4_clkdm_del_wkup_sleep_dep()
373 return omap4_cminst_read_inst_reg_bits(clkdm1->prcm_partition, in omap4_clkdm_read_wkup_sleep_dep()
374 clkdm1->cm_inst, in omap4_clkdm_read_wkup_sleep_dep()
375 clkdm1->clkdm_offs + in omap4_clkdm_read_wkup_sleep_dep()
377 (1 << clkdm2->dep_bit)); in omap4_clkdm_read_wkup_sleep_dep()
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()
393 cd->wkdep_usecount = 0; 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()
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()
413 return -EINVAL; in omap4_clkdm_sleep()
420 omap4_cminst_clkdm_force_wakeup(clkdm->prcm_partition, in omap4_clkdm_wakeup()
421 clkdm->cm_inst, clkdm->clkdm_offs); in omap4_clkdm_wakeup()
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()
433 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) 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()
443 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) in omap4_clkdm_clk_enable()
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()
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()
482 * omap4_clkdm_save_context - Save the clockdomain modulemode context
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()
498 * omap4_clkdm_restore_context - Restore the clockdomain modulemode context
505 switch (clkdm->context) { in omap4_clkdm_restore_context()