Home
last modified time | relevance | path

Searched refs:rstctrl (Results 1 – 25 of 29) sorted by relevance

12

/optee_os/core/include/drivers/
H A Drstctrl.h13 struct rstctrl;
30 TEE_Result (*assert_level)(struct rstctrl *rstctrl, unsigned int to_us);
31 TEE_Result (*deassert_level)(struct rstctrl *rstctrl,
33 const char *(*get_name)(struct rstctrl *rstctrl);
41 struct rstctrl { struct
82 static inline TEE_Result rstctrl_assert_to(struct rstctrl *rstctrl, in rstctrl_assert_to() argument
85 return rstctrl->ops->assert_level(rstctrl, to_us); in rstctrl_assert_to()
88 static inline TEE_Result rstctrl_assert(struct rstctrl *rstctrl) in rstctrl_assert() argument
90 return rstctrl_assert_to(rstctrl, RSTCTRL_NO_TIMEOUT); in rstctrl_assert()
93 static inline TEE_Result rstctrl_deassert_to(struct rstctrl *rstctrl, in rstctrl_deassert_to() argument
[all …]
H A Datmel_rstc.h24 struct rstctrl *sam_get_rstctrl(unsigned int reset_id);
34 static inline struct rstctrl *sam_get_rstctrl(unsigned int reset_id __unused) in sam_get_rstctrl()
H A Dstm32mp2_rcc_util.h20 struct rstctrl *stm32mp_rcc_reset_id_to_rstctrl(unsigned int binding_id);
/optee_os/core/drivers/rstctrl/
H A Drstctrl.c15 TEE_Result rstctrl_get_exclusive(struct rstctrl *rstctrl) in rstctrl_get_exclusive() argument
23 if (!rstctrl->exclusive) { in rstctrl_get_exclusive()
24 rstctrl->exclusive = true; in rstctrl_get_exclusive()
33 void rstctrl_put_exclusive(struct rstctrl *rstctrl) in rstctrl_put_exclusive() argument
35 assert(rstctrl->exclusive); in rstctrl_put_exclusive()
37 WRITE_ONCE(rstctrl->exclusive, false); in rstctrl_put_exclusive()
41 const char *name, struct rstctrl **rstctrl) in rstctrl_dt_get_by_name() argument
49 return rstctrl_dt_get_by_index(fdt, nodeoffset, index, rstctrl); in rstctrl_dt_get_by_name()
H A Dstm32_rstctrl.c44 stm32_rstline->rstctrl.ops = pdata->get_rstctrl_ops(binding_id); in find_or_allocate_rstline()
52 struct stm32_rstline *to_stm32_rstline(struct rstctrl *rstctrl) in to_stm32_rstline() argument
54 assert(rstctrl); in to_stm32_rstline()
56 return container_of(rstctrl, struct stm32_rstline, rstctrl); in to_stm32_rstline()
59 struct rstctrl *stm32mp_rcc_reset_id_to_rstctrl(unsigned int binding_id) in stm32mp_rcc_reset_id_to_rstctrl()
66 return &rstline->rstctrl; in stm32mp_rcc_reset_id_to_rstctrl()
71 struct rstctrl **out_device) in stm32_rstctrl_get_dev()
85 *out_device = &stm32_rstline->rstctrl; in stm32_rstctrl_get_dev()
H A Dstm32_rstctrl.h48 struct rstctrl rstctrl; member
53 struct stm32_rstline *to_stm32_rstline(struct rstctrl *rstctrl);
H A Dstm32mp1_rstctrl.c40 static TEE_Result reset_assert(struct rstctrl *rstctrl, unsigned int to_us) in reset_assert() argument
42 unsigned int id = to_stm32_rstline(rstctrl)->id; in reset_assert()
85 static TEE_Result reset_deassert(struct rstctrl *rstctrl, unsigned int to_us) in reset_deassert() argument
87 unsigned int id = to_stm32_rstline(rstctrl)->id; in reset_deassert()
H A Dstm32mp21_rstctrl.c18 static TEE_Result stm32_reset_update(struct rstctrl *rstctrl, bool state, in stm32_reset_update() argument
21 unsigned int id = to_stm32_rstline(rstctrl)->id; in stm32_reset_update()
22 const struct stm32_reset_data *data = to_stm32_rstline(rstctrl)->data; in stm32_reset_update()
68 static TEE_Result stm32_reset_assert(struct rstctrl *rstctrl, in stm32_reset_assert() argument
71 return stm32_reset_update(rstctrl, true, to_us); in stm32_reset_assert()
74 static TEE_Result stm32_reset_deassert(struct rstctrl *rstctrl, in stm32_reset_deassert() argument
77 return stm32_reset_update(rstctrl, false, to_us); in stm32_reset_deassert()
H A Dstm32mp25_rstctrl.c18 static TEE_Result stm32_reset_update(struct rstctrl *rstctrl, bool state, in stm32_reset_update() argument
21 unsigned int id = to_stm32_rstline(rstctrl)->id; in stm32_reset_update()
22 const struct stm32_reset_data *data = to_stm32_rstline(rstctrl)->data; in stm32_reset_update()
68 static TEE_Result stm32_reset_assert(struct rstctrl *rstctrl, in stm32_reset_assert() argument
71 return stm32_reset_update(rstctrl, true, to_us); in stm32_reset_assert()
74 static TEE_Result stm32_reset_deassert(struct rstctrl *rstctrl, in stm32_reset_deassert() argument
77 return stm32_reset_update(rstctrl, false, to_us); in stm32_reset_deassert()
H A Dsub.mk1 srcs-y += rstctrl.c
/optee_os/core/drivers/
H A Datmel_rstc.c37 struct rstctrl rstctrl; member
44 static struct sam_rstline *to_sam_rstline(struct rstctrl *ptr) in to_sam_rstline()
48 return container_of(ptr, struct sam_rstline, rstctrl); in to_sam_rstline()
74 sam_rstline->rstctrl.ops = pdata->ops; in find_or_allocate_rstline()
83 struct rstctrl **out_rstctrl) in sam_rstctrl_dt_get()
94 *out_rstctrl = &sam_rstline->rstctrl; in sam_rstctrl_dt_get()
99 static TEE_Result reset_assert(struct rstctrl *rstctrl, in reset_assert() argument
102 unsigned int id = to_sam_rstline(rstctrl)->reset_id; in reset_assert()
110 static TEE_Result reset_deassert(struct rstctrl *rstctrl, in reset_deassert() argument
113 unsigned int id = to_sam_rstline(rstctrl)->reset_id; in reset_deassert()
[all …]
H A Dstm32_rng.c85 struct rstctrl *rstctrl; member
316 if (stm32_rng->rstctrl && in stm32_rng_init()
317 rstctrl_assert_to(stm32_rng->rstctrl, RNG_RESET_TIMEOUT_US)) { in stm32_rng_init()
322 if (stm32_rng->rstctrl && in stm32_rng_init()
323 rstctrl_deassert_to(stm32_rng->rstctrl, RNG_RESET_TIMEOUT_US)) { in stm32_rng_init()
600 res = rstctrl_dt_get_by_index(fdt, node, 0, &stm32_rng->rstctrl); in stm32_rng_parse_fdt()
H A Dsub.mk109 subdirs-$(CFG_DRIVERS_RSTCTRL) += rstctrl
H A Dstm32_omm.c69 struct rstctrl *reset[OSPI_NB_RESET];
/optee_os/core/pta/tests/
H A Ddt_driver_test.c228 struct rstctrl *rstctrl0 = NULL; in probe_test_resets()
229 struct rstctrl *rstctrl1 = NULL; in probe_test_resets()
230 struct rstctrl *rstctrl = NULL; in probe_test_resets() local
247 res = rstctrl_dt_get_by_name(fdt, node, "rst0", &rstctrl); in probe_test_resets()
251 if (rstctrl != rstctrl0) { in probe_test_resets()
517 struct rstctrl rstctrl; member
520 static struct dt_test_rstctrl *to_test_rstctrl(struct rstctrl *rstctrl) in to_test_rstctrl() argument
522 return container_of(rstctrl, struct dt_test_rstctrl, rstctrl); in to_test_rstctrl()
525 static TEE_Result dt_test_rstctrl_stub(struct rstctrl *rstctrl __maybe_unused, in dt_test_rstctrl_stub()
528 struct dt_test_rstctrl *dev = to_test_rstctrl(rstctrl); in dt_test_rstctrl_stub()
[all …]
/optee_os/core/lib/scmi-server/include/
H A Dscmi_agent_configuration.h35 struct rstctrl *rstctrl; member
/optee_os/core/arch/arm/plat-stm32mp2/
H A Dmain.c188 struct rstctrl *rstctrl = NULL; in do_reset() local
202 rstctrl = stm32mp_rcc_reset_id_to_rstctrl(SYS_R); in do_reset()
203 rstctrl_assert(rstctrl); in do_reset()
/optee_os/core/lib/scmi-server/
H A Dscmi_reset_consumer.c27 struct rstctrl *reset;
69 struct rstctrl *reset = NULL; in optee_scmi_server_init_resets()
135 .rstctrl = s_resets[n].reset, in optee_scmi_server_init_resets()
/optee_os/core/arch/arm/plat-stm32mp1/
H A Dscmi_server.c71 struct rstctrl *rstctrl; member
657 if (!rd->rstctrl || !nsec_can_access_resource(rd->etzpc_id)) in plat_scmi_rd_autonomous()
675 if (rstctrl_assert_to(rd->rstctrl, TIMEOUT_US_1MS)) in plat_scmi_rd_autonomous()
678 if (rstctrl_deassert_to(rd->rstctrl, TIMEOUT_US_1MS)) in plat_scmi_rd_autonomous()
693 if (!rd->rstctrl || !nsec_can_access_resource(rd->etzpc_id)) in plat_scmi_rd_set_state()
705 res = rstctrl_assert(rd->rstctrl); in plat_scmi_rd_set_state()
708 res = rstctrl_deassert(rd->rstctrl); in plat_scmi_rd_set_state()
1146 struct rstctrl *rstctrl = NULL; in stm32mp1_init_scmi_server() local
1152 rstctrl = stm32mp_rcc_reset_id_to_rstctrl(rd->reset_id); in stm32mp1_init_scmi_server()
1153 assert(rstctrl); in stm32mp1_init_scmi_server()
[all …]
H A Dstm32_util.h73 struct rstctrl *stm32mp_rcc_reset_id_to_rstctrl(unsigned int binding_id);
H A Dmain.c749 struct rstctrl *rstctrl = NULL; in do_reset() local
763 rstctrl = stm32mp_rcc_reset_id_to_rstctrl(MPSYST_R); in do_reset()
764 rstctrl_assert(rstctrl); in do_reset()
/optee_os/core/arch/arm/plat-sam/
H A Dscmi_server.c34 struct rstctrl *rstctrl; member
1103 if (!rd->rstctrl) in plat_scmi_rd_set_state()
1108 res = rstctrl_assert(rd->rstctrl); in plat_scmi_rd_set_state()
1111 res = rstctrl_deassert(rd->rstctrl); in plat_scmi_rd_set_state()
1190 struct rstctrl *rstctrl = NULL; in sam_init_scmi_server() local
1192 rstctrl = sam_get_rstctrl(rd->reset_id); in sam_init_scmi_server()
1193 assert(rstctrl); in sam_init_scmi_server()
1194 if (rstctrl_get_exclusive(rstctrl)) in sam_init_scmi_server()
1197 rd->rstctrl = rstctrl; in sam_init_scmi_server()
/optee_os/core/drivers/crypto/stm32/
H A Dstm32_cryp.h26 struct rstctrl *reset;
H A Dstm32_cryp.c1274 struct rstctrl *rstctrl = NULL; in stm32_cryp_probe() local
1287 res = rstctrl_dt_get_by_index(fdt, node, 0, &rstctrl); in stm32_cryp_probe()
1292 cryp_pdata.reset = rstctrl; in stm32_cryp_probe()
/optee_os/core/drivers/remoteproc/
H A Dstm32_remoteproc.c52 struct rstctrl *mcu_rst;
53 struct rstctrl *hold_boot;

12