1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2015-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include "system_mmap.h"
9 
10 #include <mod_sgm775_ddr_phy500.h>
11 
12 #include <fwk_element.h>
13 #include <fwk_id.h>
14 #include <fwk_module.h>
15 
16 #include <stddef.h>
17 
18 /* Table of DDR PHY500 element descriptions. */
19 static struct fwk_element sgm775_ddr_phy500_element_table[] = {
20     [0] = { .name = "DDR_PHY500-0",
21             .data = &((struct mod_sgm775_ddr_phy500_element_config) {
22                 .ddr = DDR_PHY0,
23         }),
24     },
25     [1] = { .name = "DDR_PHY500-1",
26             .data = &((struct mod_sgm775_ddr_phy500_element_config) {
27                 .ddr = DDR_PHY1,
28         }),
29     },
30     [2] = { .name = "DDR_PHY500-2",
31             .data = &((struct mod_sgm775_ddr_phy500_element_config) {
32                 .ddr = DDR_PHY2,
33         }),
34     },
35     [3] = { .name = "DDR_PHY500-3",
36             .data = &((struct mod_sgm775_ddr_phy500_element_config) {
37                 .ddr = DDR_PHY3,
38         }),
39     },
40     [4] = { 0 }, /* Termination description. */
41 };
42 
sgm775_ddr_phy500_get_element_table(fwk_id_t module_id)43 static const struct fwk_element *sgm775_ddr_phy500_get_element_table
44     (fwk_id_t module_id)
45 {
46     return sgm775_ddr_phy500_element_table;
47 }
48 
49 /* Configuration of the DDR PHY500 module. */
50 struct fwk_module_config config_sgm775_ddr_phy500 = {
51     .elements =
52         FWK_MODULE_DYNAMIC_ELEMENTS(sgm775_ddr_phy500_get_element_table),
53 };
54