Lines Matching +full:de +full:- +full:asserting

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2011-2012 Texas Instruments Incorporated - https://www.ti.com/
17 #include "prm-regbits-33xx.h"
31 /* Read-modify-write a register in PRM. Caller must lock */
45 * am33xx_prm_is_hardreset_asserted - read the HW reset line state of
54 * -EINVAL upon parameter error.
69 * am33xx_prm_assert_hardreset - assert the HW reset line of a submodule
77 * IP. These modules may have multiple hard-reset lines that reset
79 * place the submodule into reset. Returns 0 upon success or -EINVAL
93 * am33xx_prm_deassert_hardreset - deassert a submodule hardreset line and
104 * IP. These modules may have multiple hard-reset lines that reset
108 * -EINVAL upon an argument error, -EEXIST if the submodule was already out
109 * of reset, or -EBUSY if the submodule did not exit reset promptly.
118 /* Check the current status to avoid de-asserting the line twice */ in am33xx_prm_deassert_hardreset()
120 return -EEXIST; in am33xx_prm_deassert_hardreset()
125 /* de-assert the reset control line */ in am33xx_prm_deassert_hardreset()
135 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; in am33xx_prm_deassert_hardreset()
142 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_next_pwrst()
150 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_read_next_pwrst()
161 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_read_pwrst()
172 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_lowpwrstchange()
180 pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_clear_all_prev_pwrst()
188 m = pwrdm->logicretstate_mask; in am33xx_pwrdm_set_logic_retst()
190 return -EINVAL; in am33xx_pwrdm_set_logic_retst()
193 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_logic_retst()
202 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_read_logic_pwrst()
213 m = pwrdm->logicretstate_mask; in am33xx_pwrdm_read_logic_retst()
215 return -EINVAL; in am33xx_pwrdm_read_logic_retst()
217 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_read_logic_retst()
229 m = pwrdm->mem_on_mask[bank]; in am33xx_pwrdm_set_mem_onst()
231 return -EINVAL; in am33xx_pwrdm_set_mem_onst()
234 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_mem_onst()
244 m = pwrdm->mem_ret_mask[bank]; in am33xx_pwrdm_set_mem_retst()
246 return -EINVAL; in am33xx_pwrdm_set_mem_retst()
249 pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_set_mem_retst()
258 m = pwrdm->mem_pwrst_mask[bank]; in am33xx_pwrdm_read_mem_pwrst()
260 return -EINVAL; in am33xx_pwrdm_read_mem_pwrst()
262 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); in am33xx_pwrdm_read_mem_pwrst()
273 m = pwrdm->mem_retst_mask[bank]; in am33xx_pwrdm_read_mem_retst()
275 return -EINVAL; in am33xx_pwrdm_read_mem_retst()
277 v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstctrl_offs); in am33xx_pwrdm_read_mem_retst()
290 * via a callback and a periodic timer check -- how long do we expect in am33xx_pwrdm_wait_transition()
295 while ((am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs) in am33xx_pwrdm_wait_transition()
302 pwrdm->name); in am33xx_pwrdm_wait_transition()
303 return -EAGAIN; in am33xx_pwrdm_wait_transition()
318 * am33xx_prm_global_warm_sw_reset - reboot the device via warm reset
345 pwrdm->context = am33xx_prm_read_reg(pwrdm->prcm_offs, in am33xx_pwrdm_save_context()
346 pwrdm->pwrstctrl_offs); in am33xx_pwrdm_save_context()
351 pwrdm->context &= ~AM33XX_LOWPOWERSTATECHANGE_MASK; in am33xx_pwrdm_save_context()
358 st = am33xx_prm_read_reg(pwrdm->prcm_offs, in am33xx_pwrdm_restore_context()
359 pwrdm->pwrstst_offs); in am33xx_pwrdm_restore_context()
361 am33xx_prm_write_reg(pwrdm->context, pwrdm->prcm_offs, in am33xx_pwrdm_restore_context()
362 pwrdm->pwrstctrl_offs); in am33xx_pwrdm_restore_context()
366 ctrl = OMAP_POWERSTATEST_MASK & pwrdm->context; in am33xx_pwrdm_restore_context()