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 "scp_mmap.h"
9 #include "scp_tc1_mhu.h"
10
11 #include <mod_mhu2.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_TC1_MHU_DEVICE_IDX_COUNT + 1] = {
21 [SCP_TC1_MHU_DEVICE_IDX_SCP_AP_S_CLUS0] = {
22 .name = "MHU_SCP_AP_S",
23 .sub_element_count = 1,
24 .data = &((
25 struct
26 mod_mhu2_channel_config){
27 .irq = MHU_AP_SEC_IRQ,
28 .recv = SCP_MHU_SCP_AP_RCV_S_CLUS0,
29 .send = SCP_MHU_SCP_AP_SND_S_CLUS0,
30 .channel = 0,
31 }),
32 },
33 [SCP_TC1_MHU_DEVICE_IDX_SCP_AP_NS_HP_CLUS0] = {
34 .name = "MHU_SCP_AP_NS_HP",
35 .sub_element_count = 1,
36 .data = &((
37 struct
38 mod_mhu2_channel_config){
39 .irq = MHU_AP_NONSEC_HP_IRQ,
40 .recv = SCP_MHU_SCP_AP_RCV_NS_CLUS0,
41 .send = SCP_MHU_SCP_AP_SND_NS_CLUS0,
42 .channel = 0,
43 }),
44 },
45 [SCP_TC1_MHU_DEVICE_IDX_SCP_AP_NS_LP_CLUS0] = {
46 .name = "MHU_SCP_AP_NS_LP",
47 .sub_element_count = 1,
48 .data = &((
49 struct
50 mod_mhu2_channel_config){
51 .irq = MHU_AP_NONSEC_LP_IRQ,
52 .recv = SCP_MHU_SCP_AP_RCV_NS_CLUS0,
53 .send = SCP_MHU_SCP_AP_SND_NS_CLUS0,
54 .channel = 1,
55 }),
56 },
57 [SCP_TC1_MHU_DEVICE_IDX_COUNT] = { 0 },
58 };
59
mhu_get_element_table(fwk_id_t module_id)60 static const struct fwk_element *mhu_get_element_table(fwk_id_t module_id)
61 {
62 return mhu_element_table;
63 }
64
65 const struct fwk_module_config config_mhu2 = {
66 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(mhu_get_element_table),
67 };
68