1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3 * Copyright (c) 2024, STMicroelectronics
4 */
5
6 #ifndef SCMI_SERVER_CLOCK_CONSUMER_H
7 #define SCMI_SERVER_CLOCK_CONSUMER_H
8
9 #include <stdbool.h>
10 #include <stdint.h>
11 #include <tee_api_types.h>
12 #include <scmi_agent_configuration.h>
13
14 #ifdef CFG_SCMI_SERVER_CLOCK_CONSUMER
15 /*
16 * Initialize SCMI clock from clock consumer information from DT.
17 * Returns a TEE_Result compliant value
18 */
19 TEE_Result optee_scmi_server_init_clocks(const void *fdt, int node,
20 struct scpfw_agent_config *agent_cfg,
21 struct scpfw_channel_config
22 *channel_cfg);
23 #else
24 static inline TEE_Result
optee_scmi_server_init_clocks(const void * fdt __unused,int node __unused,struct scpfw_agent_config * agent_cfg __unused,struct scpfw_channel_config * channel_cfg __unused)25 optee_scmi_server_init_clocks(const void *fdt __unused, int node __unused,
26 struct scpfw_agent_config *agent_cfg __unused,
27 struct scpfw_channel_config *channel_cfg __unused)
28 {
29 return TEE_SUCCESS;
30 }
31 #endif /* CFG_SCMI_SERVER_CLOCK_CONSUMER */
32 #endif /* SCMI_SERVER_CLOCK_CONSUMER_H */
33