Lines Matching +full:reset +full:- +full:mask
1 // SPDX-License-Identifier: GPL-2.0-only
18 #include "prcm-common.h"
23 #include "prm-regbits-44xx.h"
34 * omap_prm_base_init - Populates the prm partitions
75 /* Read-modify-write a register in PRM. Caller must lock */
76 u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst, in omap4_prminst_rmw_inst_reg_bits() argument
82 v &= ~mask; in omap4_prminst_rmw_inst_reg_bits()
90 * omap4_prminst_is_hardreset_asserted - read the HW reset line state of
93 * @shift: register bit shift corresponding to the reset line to check
97 * -EINVAL upon parameter error.
112 * omap4_prminst_assert_hardreset - assert the HW reset line of a submodule
114 * @shift: register bit shift corresponding to the reset line to assert
117 * reset line to be asserted / deasserted in order to fully enable the
118 * IP. These modules may have multiple hard-reset lines that reset
120 * place the submodule into reset. Returns 0 upon success or -EINVAL
126 u32 mask = 1 << shift; in omap4_prminst_assert_hardreset() local
128 omap4_prminst_rmw_inst_reg_bits(mask, mask, part, inst, rstctrl_offs); in omap4_prminst_assert_hardreset()
134 * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and
136 * @shift: register bit shift corresponding to the reset line to deassert
137 * @st_shift: status bit offset corresponding to the reset line
140 * @rstctrl_offs: reset register offset
141 * @rstst_offs: reset status register offset
144 * reset line to be asserted / deasserted in order to fully enable the
145 * IP. These modules may have multiple hard-reset lines that reset
147 * take the submodule out of reset and wait until the PRCM indicates
148 * that the reset has completed before returning. Returns 0 upon success or
149 * -EINVAL upon an argument error, -EEXIST if the submodule was already out
150 * of reset, or -EBUSY if the submodule did not exit reset promptly.
156 u32 mask = 1 << shift; in omap4_prminst_deassert_hardreset() local
159 /* Check the current status to avoid de-asserting the line twice */ in omap4_prminst_deassert_hardreset()
162 return -EEXIST; in omap4_prminst_deassert_hardreset()
164 /* Clear the reset status by writing 1 to the status bit */ in omap4_prminst_deassert_hardreset()
167 /* de-assert the reset control line */ in omap4_prminst_deassert_hardreset()
168 omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs); in omap4_prminst_deassert_hardreset()
174 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; in omap4_prminst_deassert_hardreset()