Gabriel Fernandez | afdc1ae | 2025-05-27 15:27:53 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */ |
| 2 | /* |
| 3 | * Copyright (C) 2025, STMicroelectronics - All Rights Reserved |
| 4 | * Author(s): Gabriel Fernandez, <gabriel.fernandez@foss.st.com> for STMicroelectronics. |
| 5 | */ |
| 6 | |
| 7 | #include <reset-uclass.h> |
| 8 | |
| 9 | struct stm32_reset_cfg { |
| 10 | u16 offset; |
| 11 | u8 bit_idx; |
| 12 | bool set_clr; |
| 13 | bool inverted; |
| 14 | }; |
| 15 | |
| 16 | struct stm32_reset_data { |
| 17 | const struct stm32_reset_cfg * (*get_reset_line)(struct reset_ctl *reset_ctl); |
| 18 | u32 clear_offset; |
| 19 | u32 reset_us; |
| 20 | }; |
| 21 | |
| 22 | struct stm32_reset_priv { |
| 23 | fdt_addr_t base; |
| 24 | struct stm32_reset_cfg reset_line; |
| 25 | const struct stm32_reset_data *data; |
| 26 | }; |
| 27 | |
| 28 | extern const struct reset_ops stm32_reset_ops; |
| 29 | |
| 30 | int stm32_reset_core_probe(struct udevice *dev, |
| 31 | const struct stm32_reset_data *data); |