diff options
| author | Tom Rini <[email protected]> | 2026-06-08 08:36:57 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-08 08:36:57 -0600 |
| commit | 5d4d6e331d3f056ecc7ab11b72098a3cf4fdb099 (patch) | |
| tree | bd545cc373e2646007a97ab90bdb5be52f481982 /include/reset.h | |
| parent | 9e87893c24d1f21350e69bc222e6a3214c933b3b (diff) | |
| parent | 8efa173b389e5cef6eece991351442baea0264fd (diff) | |
Merge tag 'xilinx-for-v2026.10-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next
AMD/Xilinx/FPGA changes for v2026.10-rc1 v2
zynqmp:
- Clean up USB gadget configuration
mbv:
- Reduce SPL size
versal:
- Add support for A/B capsule update
versal2:
- Add support for A/B capsule update
reset:
- Introduce reset_reset_bulk() generic interface
- zynqmp: Implement reset_reset_bulk() interface
spi:
- cadence: Switch to reset_reset_bulk() interface
Diffstat (limited to 'include/reset.h')
| -rw-r--r-- | include/reset.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/reset.h b/include/reset.h index 036a786d2ac..58574b983f6 100644 --- a/include/reset.h +++ b/include/reset.h @@ -321,6 +321,45 @@ int reset_deassert(struct reset_ctl *reset_ctl); int reset_deassert_bulk(struct reset_ctl_bulk *bulk); /** + * reset_reset - Reset a HW module by asserting and deasserting a reset signal. + * + * This function will assert and then deassert the specified reset signal, + * thus resetting the affected HW module. This is a convenience function + * that combines reset_assert() and reset_deassert(). + * + * If the controller implements struct reset_ops.rst_reset, that callback + * is used and @delay_us is interpreted as documented there. Otherwise the + * core performs reset_assert(), udelay(@delay_us), then reset_deassert(). + * + * @reset_ctl: A reset control struct that was previously successfully + * requested by reset_get_by_*(). + * @delay_us: Delay in microseconds between assert and deassert on the + * fallback path; meaning is driver-specific when rst_reset is used. + * Use 0 for no delay on the fallback path. + * Return: 0 if OK, or a negative error code. + */ +int reset_reset(struct reset_ctl *reset_ctl, ulong delay_us); + +/** + * reset_reset_bulk - Reset all HW modules in a reset control bulk struct. + * + * This calls reset_reset() on each entry in order. Each line therefore + * completes its own assert/delay/deassert (or controller rst_reset) before + * the next entry starts. That matches Linux reset_control_bulk_reset(). + * + * When several lines must stay asserted together for @delay_us (typical + * multi-reset controllers), use reset_assert_bulk(), udelay(@delay_us), + * and reset_deassert_bulk() instead. + * + * @bulk: A reset control bulk struct that was previously successfully + * requested by reset_get_bulk(). + * @delay_us: Delay in microseconds passed to each reset_reset(); see + * reset_reset() and struct reset_ops.rst_reset. + * Return: 0 if OK, or a negative error code. + */ +int reset_reset_bulk(struct reset_ctl_bulk *bulk, ulong delay_us); + +/** * rst_status - Check reset signal status. * * @reset_ctl: The reset signal to check. @@ -443,6 +482,16 @@ static inline int reset_deassert_bulk(struct reset_ctl_bulk *bulk) return 0; } +static inline int reset_reset(struct reset_ctl *reset_ctl, ulong delay_us) +{ + return -ENOSYS; +} + +static inline int reset_reset_bulk(struct reset_ctl_bulk *bulk, ulong delay_us) +{ + return -ENOSYS; +} + static inline int reset_status(struct reset_ctl *reset_ctl) { return -ENOTSUPP; |
