1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include "config_clock.h"
9 #include "morello_scp_scmi.h"
10 
11 #include <mod_scmi_clock.h>
12 
13 #include <fwk_id.h>
14 #include <fwk_macros.h>
15 #include <fwk_module.h>
16 #include <fwk_module_idx.h>
17 
18 static const struct mod_scmi_clock_device agent_device_table_ospm[2] = {
19     {
20         /* DPU */
21         .element_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_DPU),
22     },
23     {
24         /* PIXEL_0 */
25         .element_id =
26             FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_CLOCK, CLOCK_IDX_PIXEL_0),
27     },
28 };
29 
30 static const struct mod_scmi_clock_agent
31     agent_table[SCP_SCMI_AGENT_ID_COUNT] = {
32         [SCP_SCMI_AGENT_ID_PSCI] = { 0 /* No access */ },
33         [SCP_SCMI_AGENT_ID_OSPM] = {
34             .device_table = agent_device_table_ospm,
35             .device_count = FWK_ARRAY_SIZE(agent_device_table_ospm),
36         },
37 };
38 
39 const struct fwk_module_config config_scmi_clock = {
40     .data = &((struct mod_scmi_clock_config){
41         .max_pending_transactions = 0,
42         .agent_table = agent_table,
43         .agent_count = FWK_ARRAY_SIZE(agent_table),
44     }),
45 };
46