Lines Matching +full:de +full:- +full:asserted
4 * Copyright (C) 2011-2012 Texas Instruments Incorporated - https://www.ti.com/
24 #include "prm-regbits-33xx.h"
42 /* Read-modify-write a register in PRM. Caller must lock */
56 * am33xx_prm_is_hardreset_asserted - read the HW reset line state of
63 * Returns 1 if the (sub)module hardreset line is currently asserted,
64 * 0 if the (sub)module hardreset line is not currently asserted, or
65 * -EINVAL upon parameter error.
80 * am33xx_prm_assert_hardreset - assert the HW reset line of a submodule
87 * reset line to be asserted / deasserted in order to fully enable the
88 * IP. These modules may have multiple hard-reset lines that reset
90 * place the submodule into reset. Returns 0 upon success or -EINVAL
104 * am33xx_prm_deassert_hardreset - deassert a submodule hardreset line and
114 * reset line to be asserted / deasserted in order to fully enable the
115 * IP. These modules may have multiple hard-reset lines that reset
119 * -EINVAL upon an argument error, -EEXIST if the submodule was already out
120 * of reset, or -EBUSY if the submodule did not exit reset promptly.
129 /* Check the current status to avoid de-asserting the line twice */ in am33xx_prm_deassert_hardreset()
131 return -EEXIST; in am33xx_prm_deassert_hardreset()
136 /* de-assert the reset control line */ in am33xx_prm_deassert_hardreset()
146 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; in am33xx_prm_deassert_hardreset()
153 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_next_pwrst()
161 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_read_next_pwrst()
172 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_read_pwrst()
183 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_lowpwrstchange()
191 pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_clear_all_prev_pwrst()
199 m = pwrdm->logicretstate_mask; in am33xx_pwrdm_set_logic_retst()
201 return -EINVAL; in am33xx_pwrdm_set_logic_retst()
204 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_logic_retst()
213 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_read_logic_pwrst()
224 m = pwrdm->logicretstate_mask; in am33xx_pwrdm_read_logic_retst()
226 return -EINVAL; in am33xx_pwrdm_read_logic_retst()
228 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_read_logic_retst()
240 m = pwrdm->mem_on_mask[bank]; in am33xx_pwrdm_set_mem_onst()
242 return -EINVAL; in am33xx_pwrdm_set_mem_onst()
245 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_mem_onst()
255 m = pwrdm->mem_ret_mask[bank]; in am33xx_pwrdm_set_mem_retst()
257 return -EINVAL; in am33xx_pwrdm_set_mem_retst()
260 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_mem_retst()
269 m = pwrdm->mem_pwrst_mask[bank]; in am33xx_pwrdm_read_mem_pwrst()
271 return -EINVAL; in am33xx_pwrdm_read_mem_pwrst()
273 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_read_mem_pwrst()
284 m = pwrdm->mem_retst_mask[bank]; in am33xx_pwrdm_read_mem_retst()
286 return -EINVAL; in am33xx_pwrdm_read_mem_retst()
288 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_read_mem_retst()
301 * via a callback and a periodic timer check -- how long do we expect in am33xx_pwrdm_wait_transition()
306 while ((am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs) in am33xx_pwrdm_wait_transition()
313 pwrdm->name); in am33xx_pwrdm_wait_transition()
314 return -EAGAIN; in am33xx_pwrdm_wait_transition()
329 * am33xx_prm_global_warm_sw_reset - reboot the device via warm reset
347 pwrdm->context = am33xx_prm_read_reg(pwrdm->prcm_offs, in am33xx_pwrdm_save_context()
348 pwrdm->pwrstctrl_offs); in am33xx_pwrdm_save_context()
353 pwrdm->context &= ~AM33XX_LOWPOWERSTATECHANGE_MASK; in am33xx_pwrdm_save_context()
360 st = am33xx_prm_read_reg(pwrdm->prcm_offs, in am33xx_pwrdm_restore_context()
361 pwrdm->pwrstst_offs); in am33xx_pwrdm_restore_context()
363 am33xx_prm_write_reg(pwrdm->context, pwrdm->prcm_offs, in am33xx_pwrdm_restore_context()
364 pwrdm->pwrstctrl_offs); in am33xx_pwrdm_restore_context()
368 ctrl = OMAP_POWERSTATEST_MASK & pwrdm->context; in am33xx_pwrdm_restore_context()