1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Description:
8  *     SCMI Clock Management Protocol Support.
9  */
10 #include <mod_scmi.h>
11 #include <mod_scmi_clock.h>
12 
13 #include <fwk_id.h>
14 #include <fwk_log.h>
15 #include <fwk_status.h>
16 
17 #include <inttypes.h>
18 
mod_scmi_clock_rate_set_policy(enum mod_scmi_clock_policy_status * policy_status,enum mod_clock_round_mode * round_mode,uint64_t * rate,enum mod_scmi_clock_policy_commit policy_commit,fwk_id_t service_id,uint32_t clock_dev_id)19 int mod_scmi_clock_rate_set_policy(
20     enum mod_scmi_clock_policy_status *policy_status,
21     enum mod_clock_round_mode *round_mode,
22     uint64_t *rate,
23     enum mod_scmi_clock_policy_commit policy_commit,
24     fwk_id_t service_id,
25     uint32_t clock_dev_id)
26 {
27 #if FWK_LOG_LEVEL <= FWK_LOG_LEVEL_DEBUG
28     FWK_LOG_DEBUG(
29         "[SCMI-CLK] Set Clock Rate Policy Handler agent: %u clock: %" PRIu32
30         "\n",
31         fwk_id_get_element_idx(service_id),
32         clock_dev_id);
33 #endif
34 
35     *policy_status = MOD_SCMI_CLOCK_EXECUTE_MESSAGE_HANDLER;
36 
37     return FWK_SUCCESS;
38 }
39