• Home
  • Raw
  • Download

Lines Matching +full:module +full:- +full:instance

4  * Copyright (C) 2011-2012 Texas Instruments Incorporated - https://www.ti.com/
28 #include "cm-regbits-34xx.h"
29 #include "cm-regbits-33xx.h"
35 * 0x0 func: Module is fully functional, including OCP
36 * 0x1 trans: Module is performing transition: wakeup, or sleep, or sleep
38 * 0x2 idle: Module is in Idle mode (only OCP part). It is functional if
40 * 0x3 disabled: Module is disabled and cannot be accessed
50 /* Read a register in a CM instance */
62 /* Read-modify-write a register in CM */
87 * _clkctrl_idlest - read a CM_*_CLKCTRL register; mask & shift IDLEST bitfield
88 * @inst: CM instance register offset (*_INST macro)
89 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
103 * _is_module_ready - can module registers be accessed without causing an abort?
104 * @inst: CM instance register offset (*_INST macro)
105 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
107 * Returns true if the module's CM_*_CLKCTRL.IDLEST bitfield is either
121 * _clktrctrl_write - write @c to a CM_CLKSTCTRL.CLKTRCTRL register bitfield
123 * @inst: CM instance register offset (*_INST macro)
126 * @c must be the unshifted value for CLKTRCTRL - i.e., this function
142 * am33xx_cm_is_clkdm_in_hwsup - is a clockdomain in hwsup idle mode?
143 * @inst: CM instance register offset (*_INST macro)
147 * is in hardware-supervised idle mode, or 0 otherwise.
161 * am33xx_cm_clkdm_enable_hwsup - put a clockdomain in hwsup-idle mode
162 * @inst: CM instance register offset (*_INST macro)
166 * hardware-supervised idle mode. No return value.
174 * am33xx_cm_clkdm_disable_hwsup - put a clockdomain in swsup-idle mode
175 * @inst: CM instance register offset (*_INST macro)
179 * software-supervised idle mode, i.e., controlled manually by the
188 * am33xx_cm_clkdm_force_sleep - try to put a clockdomain into idle
189 * @inst: CM instance register offset (*_INST macro)
201 * am33xx_cm_clkdm_force_wakeup - try to take a clockdomain out of idle
202 * @inst: CM instance register offset (*_INST macro)
218 * am33xx_cm_wait_module_ready - wait for a module to be in 'func' state
220 * @inst: CM instance register offset (*_INST macro)
221 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
224 * Wait for the module IDLEST to be functional. If the idle state is in any
225 * the non functional state (trans, idle or disabled), module and thus the
237 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; in am33xx_cm_wait_module_ready()
241 * am33xx_cm_wait_module_idle - wait for a module to be in 'disabled'
244 * @inst: CM instance register offset (*_INST macro)
245 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
248 * Wait for the module IDLEST to be disabled. Some PRCM transition,
249 * like reset assertion or parent clock de-activation must wait the
250 * module to be fully disabled.
261 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; in am33xx_cm_wait_module_idle()
265 * am33xx_cm_module_enable - Enable the modulemode inside CLKCTRL
266 * @mode: Module mode (SW or HW)
268 * @inst: CM instance register offset (*_INST macro)
269 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
285 * am33xx_cm_module_disable - Disable the module inside CLKCTRL
287 * @inst: CM instance register offset (*_INST macro)
288 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
302 * Clockdomain low-level functions
307 am33xx_cm_clkdm_force_sleep(clkdm->cm_inst, clkdm->clkdm_offs); in am33xx_clkdm_sleep()
313 am33xx_cm_clkdm_force_wakeup(clkdm->cm_inst, clkdm->clkdm_offs); in am33xx_clkdm_wakeup()
319 am33xx_cm_clkdm_enable_hwsup(clkdm->cm_inst, clkdm->clkdm_offs); in am33xx_clkdm_allow_idle()
324 am33xx_cm_clkdm_disable_hwsup(clkdm->cm_inst, clkdm->clkdm_offs); in am33xx_clkdm_deny_idle()
329 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP) in am33xx_clkdm_clk_enable()
339 hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs); in am33xx_clkdm_clk_disable()
341 if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) in am33xx_clkdm_clk_disable()
353 * am33xx_clkdm_save_context - Save the clockdomain transition context
360 clkdm->context = am33xx_cm_read_reg_bits(clkdm->cm_inst, in am33xx_clkdm_save_context()
361 clkdm->clkdm_offs, in am33xx_clkdm_save_context()
368 * am33xx_restore_save_context - Restore the clockdomain transition context
375 switch (clkdm->context) { in am33xx_clkdm_restore_context()