Lines Matching +full:wait +full:- +full:state
4 * (C) Copyright 2012-2014
7 * SPDX-License-Identifier: GPL-2.0+
17 * psc_delay() - delay for psc
28 * psc_wait() - Wait for end of transitional state
35 * Return: 0 when the domain is free. Returns -1 if a timeout occurred waiting
46 * It's still remotely possible that the hardware state machines in psc_wait()
60 return -1; in psc_wait()
66 * psc_get_domain_num() - Get the domain number
81 * psc_set_state() - powers up/down a module
83 * @state: 1 to enable, 0 to disable.
88 * be left in the power on state. Multiple modules can exist in a power
91 * Return: 0 on success, -1 if the module can't be powered up, or if there is a
94 int psc_set_state(u32 mod_num, u32 state) in psc_set_state() argument
111 /* Wait for the status of the domain/module to be non-transitional */ in psc_set_state()
113 return -1; in psc_set_state()
117 * existing state in psc_set_state()
119 * Set the next state of the power domain to on. It's OK if the domain in psc_set_state()
121 * change is made if the new state is power down. in psc_set_state()
123 if (state == PSC_REG_VAL_MDCTL_NEXT_ON) { in psc_set_state()
130 /* Set the next state for the module to enabled/disabled */ in psc_set_state()
132 mdctl = PSC_REG_MDCTL_SET_NEXT(mdctl, state); in psc_set_state()
141 /* Wait on the complete */ in psc_set_state()
146 * psc_enable_module() - power up a module
152 * Return: 0 on success, -1 if the module can't be powered up, or
169 * psc_disable_module() - Power down a module
172 * Return: 0 on success, -1 on failure or timeout.
189 * psc_set_reset_iso() - Set the reset isolation bit in mdctl
192 * The reset isolation enable bit is set. The state of the module is not
217 * psc_disable_domain() - Disable a power domain
238 * psc_module_keep_in_reset_enabled() - Keep module in enabled,in-reset state
254 /* Wait for any previous transitions to complete */ in psc_module_keep_in_reset_enabled()
261 /* Wait for transition to take place */ in psc_module_keep_in_reset_enabled()
285 timeout--; in psc_module_keep_in_reset_enabled()
291 return -ETIMEDOUT; in psc_module_keep_in_reset_enabled()
297 * psc_module_release_from_reset() - Release the module from reset
311 /* Wait for any previous transitions to complete */ in psc_module_release_from_reset()
314 /* Should be set to 1 to de-assert Local reset */ in psc_module_release_from_reset()
318 /* Wait for transition to take place */ in psc_module_release_from_reset()
329 timeout--; in psc_module_release_from_reset()
335 return -ETIMEDOUT; in psc_module_release_from_reset()