xref: /optee_os/core/drivers/rstctrl/stm32_rstctrl.h (revision 3ef177b4f15359331455239c7cf374bd2b8a7f67)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2024, STMicroelectronics
4  */
5 
6 #include <drivers/rstctrl.h>
7 #include <sys/queue.h>
8 
9 /*
10  * struct stm32_reset_data - Reset controller platform data
11  * @get_rstctrl_ops: Handler to retrieve the controller operation handlers
12  */
13 struct stm32_reset_data {
14 	struct rstctrl_ops * (*get_rstctrl_ops)(unsigned int id);
15 };
16 
17 /*
18  * struct stm32_rstline - Exposed rstctrl instance
19  * @id: Identifier used in the device tree bindings
20  * @rstctrl: Related reset controller instance
21  * @link: Reference in reset controller list
22  */
23 struct stm32_rstline {
24 	unsigned int id;
25 	struct rstctrl rstctrl;
26 	SLIST_ENTRY(stm32_rstline) link;
27 };
28 
29 struct stm32_rstline *to_stm32_rstline(struct rstctrl *rstctrl);
30 
31 TEE_Result stm32_rstctrl_provider_probe(const void *fdt, int offs,
32 					const void *compat_data);
33