xref: /rk3399_ARM-atf/include/services/lfa_component_desc.h (revision 92c0f3baf2d2ee0f4db2c290727e6034b8aa294b)
19e032181SManish V Badarkhe /*
29e032181SManish V Badarkhe  * Copyright (c) 2025, Arm Limited. All rights reserved.
39e032181SManish V Badarkhe  *
49e032181SManish V Badarkhe  * SPDX-License-Identifier: BSD-3-Clause
59e032181SManish V Badarkhe  */
69e032181SManish V Badarkhe 
79e032181SManish V Badarkhe #ifndef LFA_COMPONENT_DESC_H
89e032181SManish V Badarkhe #define LFA_COMPONENT_DESC_H
99e032181SManish V Badarkhe 
1006a6f296SManish V Badarkhe #include <stdbool.h>
119e032181SManish V Badarkhe #include <stdint.h>
129e032181SManish V Badarkhe 
139e032181SManish V Badarkhe typedef enum {
149e032181SManish V Badarkhe 	PRIME_NONE = 0,
1567fa182fSManish V Badarkhe 	PRIME_STARTED,
1667fa182fSManish V Badarkhe 	PRIME_COMPLETE,
179e032181SManish V Badarkhe } lfa_prime_status_t;
189e032181SManish V Badarkhe 
199e032181SManish V Badarkhe struct lfa_component_status {
209e032181SManish V Badarkhe 	uint32_t component_id;
219e032181SManish V Badarkhe 	lfa_prime_status_t prime_status;
2207de22d2SManish V Badarkhe 	bool cpu_rendezvous_required;
239e032181SManish V Badarkhe };
249e032181SManish V Badarkhe 
25*3151d9fcSManish V Badarkhe typedef int (*component_prime_fn)(struct lfa_component_status *activation);
26*3151d9fcSManish V Badarkhe typedef int (*component_activate_fn)(struct lfa_component_status *activation,
279e032181SManish V Badarkhe 					 uint64_t ep_address,
289e032181SManish V Badarkhe 					 uint64_t context_id);
299e032181SManish V Badarkhe 
309e032181SManish V Badarkhe struct lfa_component_ops {
319e032181SManish V Badarkhe 	component_prime_fn prime;
329e032181SManish V Badarkhe 	component_activate_fn activate;
3306a6f296SManish V Badarkhe 	bool may_reset_cpu;
3406a6f296SManish V Badarkhe 	bool cpu_rendezvous_required;
359e032181SManish V Badarkhe };
369e032181SManish V Badarkhe 
379e032181SManish V Badarkhe #endif /* LFA_COMPONENT_DESC_H */
38