1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include "n1sdp_scp_mmap.h"
9 
10 #include <mod_n1sdp_pcie.h>
11 
12 #include <fwk_element.h>
13 #include <fwk_id.h>
14 #include <fwk_module.h>
15 
16 #include <stdbool.h>
17 
18 static const struct fwk_element n1sdp_pcie_element_table[] = {
19     [0] = {
20         .name = "Generic-PCIe",
21         .data = &((struct n1sdp_pcie_dev_config) {
22             .ctrl_base = PCIE_IP_CFG_REG_SCP_BASE,
23             .global_config_base = PCIE_RC_CFG_REG_SCP_BASE,
24             .msg_base = PCIE_MSG_CFG_REG_SCP_BASE,
25             .axi_subordinate_base32 = PCIE_AXI_SUBORDINATE_SCP_BASE,
26             .axi_subordinate_base64 = PCIE_AXI64_SUBORDINATE_AP_BASE,
27             .ccix_capable = false,
28         }),
29     },
30     [1] = {
31         .name = "CCIX-PCIe",
32         .data = &((struct n1sdp_pcie_dev_config) {
33             .ctrl_base = CCIX_IP_CFG_REG_SCP_BASE,
34             .global_config_base = CCIX_RC_CFG_REG_SCP_BASE,
35             .msg_base = CCIX_MSG_CFG_REG_SCP_BASE,
36             .axi_subordinate_base32 = CCIX_AXI_SUBORDINATE_SCP_BASE,
37             .axi_subordinate_base64 = CCIX_AXI64_SUBORDINATE_AP_BASE,
38             .ccix_capable = true,
39         }),
40     },
41     [2] = { 0 }, /* Termination description. */
42 };
43 
n1sdp_pcie_get_element_table(fwk_id_t module_id)44 static const struct fwk_element *n1sdp_pcie_get_element_table
45     (fwk_id_t module_id)
46 {
47     return n1sdp_pcie_element_table;
48 }
49 
50 const struct fwk_module_config config_n1sdp_pcie = {
51     .elements = FWK_MODULE_DYNAMIC_ELEMENTS(n1sdp_pcie_get_element_table),
52 };
53