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 <mod_mock_psu.h>
9 #include <mod_psu.h>
10
11 #include <fwk_element.h>
12 #include <fwk_id.h>
13 #include <fwk_module.h>
14 #include <fwk_module_idx.h>
15
16 static const struct fwk_element element_table[] = {
17 {
18 .name = "DVFS_GROUP0",
19 .data = &(const struct mod_psu_element_cfg) {
20 .driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, 0),
21 .driver_api_id = FWK_ID_API_INIT(FWK_MODULE_IDX_MOCK_PSU,
22 MOD_MOCK_PSU_API_IDX_DRIVER)
23 },
24 },
25 {
26 .name = "DVFS_GROUP1",
27 .data = &(const struct mod_psu_element_cfg){
28 .driver_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_MOCK_PSU, 1),
29 .driver_api_id = FWK_ID_API_INIT(FWK_MODULE_IDX_MOCK_PSU,
30 MOD_MOCK_PSU_API_IDX_DRIVER)
31 },
32 },
33 { 0 }
34 };
35
psu_get_element_table(fwk_id_t module_id)36 static const struct fwk_element *psu_get_element_table(fwk_id_t module_id)
37 {
38 return element_table;
39 }
40
41 const struct fwk_module_config config_psu = {
42 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(psu_get_element_table),
43 };
44