Lines Matching +full:reset +full:- +full:on +full:- +full:timeout

1 // SPDX-License-Identifier: GPL-2.0+
5 * (C) Copyright 2012-2014
16 * psc_delay() - delay for psc
27 * psc_wait() - Wait for end of transitional state
34 * Return: 0 when the domain is free. Returns -1 if a timeout occurred waiting
59 return -1; in psc_wait()
65 * psc_get_domain_num() - Get the domain number
80 * psc_set_state() - powers up/down a module
87 * be left in the power on state. Multiple modules can exist in a power
88 * domain, so powering down the domain based on a single module is not done.
90 * Return: 0 on success, -1 if the module can't be powered up, or if there is a
91 * timeout waiting for the transition.
103 * Get the power domain associated with the module number, and reset in psc_set_state()
110 /* Wait for the status of the domain/module to be non-transitional */ in psc_set_state()
112 return -1; in psc_set_state()
118 * Set the next state of the power domain to on. It's OK if the domain in psc_set_state()
119 * is always on. This code will not ever power down a domain, so no in psc_set_state()
140 /* Wait on the complete */ in psc_set_state()
145 * psc_enable_module() - power up a module
151 * Return: 0 on success, -1 if the module can't be powered up, or
152 * if there is a timeout waiting for the transition.
159 /* Set the bit to apply reset */ in psc_enable_module()
168 * psc_disable_module() - Power down a module
171 * Return: 0 on success, -1 on failure or timeout.
177 /* Set the bit to apply reset */ in psc_disable_module()
188 * psc_set_reset_iso() - Set the reset isolation bit in mdctl
191 * The reset isolation enable bit is set. The state of the module is not
194 * Return: 0 if the module config showed that reset isolation is supported.
203 /* Set the reset isolation bit */ in psc_set_reset_iso()
216 * psc_disable_domain() - Disable a power domain
237 * psc_module_keep_in_reset_enabled() - Keep module in enabled,in-reset state
239 * @gate_clocks: Can the clocks be gated on this module?
241 * Enable the module, but do not release the module from local reset. This is
242 * necessary for many processor systems on keystone SoCs to allow for system
244 * from reset.
251 int timeout = 100000; in psc_module_keep_in_reset_enabled() local
256 /* Should be set 0 to assert Local reset */ in psc_module_keep_in_reset_enabled()
264 /* Clear Module reset */ in psc_module_keep_in_reset_enabled()
277 while (timeout) { in psc_module_keep_in_reset_enabled()
284 timeout--; in psc_module_keep_in_reset_enabled()
287 if (!timeout) { in psc_module_keep_in_reset_enabled()
290 return -ETIMEDOUT; in psc_module_keep_in_reset_enabled()
296 * psc_module_release_from_reset() - Release the module from reset
300 * Allowing the module to be released from reset once all required inits are
308 int timeout = 100000; in psc_module_release_from_reset() local
313 /* Should be set to 1 to de-assert Local reset */ in psc_module_release_from_reset()
321 while (timeout) { in psc_module_release_from_reset()
328 timeout--; in psc_module_release_from_reset()
331 if (!timeout) { in psc_module_release_from_reset()
334 return -ETIMEDOUT; in psc_module_release_from_reset()