1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include "scp_sgi575_mhu.h"
9 #include "scp_sgi575_mmap.h"
10 
11 #include <mod_mhu.h>
12 
13 #include <fwk_element.h>
14 #include <fwk_id.h>
15 #include <fwk_module.h>
16 
17 #include <fmw_cmsis.h>
18 
19 static const struct fwk_element mhu_element_table[] = {
20     [SCP_SGI575_MHU_DEVICE_IDX_SCP_AP_S] = {
21         .name = "MHU_SCP_AP_S",
22         .sub_element_count = 1,
23         .data = &((struct mod_mhu_device_config) {
24             .irq = MHU_AP_SEC_IRQ,
25             .in = SCP_MHU_AP_SCP_S(0),
26             .out = SCP_MHU_SCP_AP_S(0),
27         })
28     },
29     [SCP_SGI575_MHU_DEVICE_IDX_SCP_AP_NS] = {
30         .name = "MHU_SCP_AP_NS",
31         .sub_element_count = 1,
32         .data = &((struct mod_mhu_device_config) {
33             .irq = MHU_AP_NONSEC_IRQ,
34             .in = SCP_MHU_AP_SCP_NS(0),
35             .out = SCP_MHU_SCP_AP_NS(0),
36         })
37     },
38     [SCP_SGI575_MHU_DEVICE_IDX_COUNT] = { 0 },
39 };
40 
41 
mhu_get_element_table(fwk_id_t module_id)42 static const struct fwk_element *mhu_get_element_table(fwk_id_t module_id)
43 {
44     return mhu_element_table;
45 }
46 
47 const struct fwk_module_config config_mhu = {
48     .elements = FWK_MODULE_DYNAMIC_ELEMENTS(mhu_get_element_table),
49 };
50