1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8 #include "config_mock_psu.h"
9
10 #include <mod_mock_psu.h>
11
12 #include <fwk_element.h>
13 #include <fwk_id.h>
14 #include <fwk_module.h>
15
16 #include <stdbool.h>
17 #include <stddef.h>
18
19 static const struct fwk_element element_table[] = {
20 [MOD_MOCK_PSU_ELEMENT_IDX_VSYS] = {
21 .name = "VSYS",
22 .data = &(const struct mod_mock_psu_element_cfg) {
23 .async_alarm_id = FWK_ID_NONE_INIT,
24 .default_enabled = true,
25 .default_voltage = 900,
26 },
27 },
28 [MOD_MOCK_PSU_ELEMENT_IDX_VBIG] = {
29 .name = "VBIG",
30 .data = &(const struct mod_mock_psu_element_cfg) {
31 .async_alarm_id = FWK_ID_NONE_INIT,
32 .default_enabled = true,
33 .default_voltage = 900,
34 },
35 },
36 [MOD_MOCK_PSU_ELEMENT_IDX_VLITTLE] = {
37 .name = "VLITTLE",
38 .data = &(const struct mod_mock_psu_element_cfg) {
39 .async_alarm_id = FWK_ID_NONE_INIT,
40 .default_enabled = true,
41 .default_voltage = 900,
42 },
43 },
44 [MOD_MOCK_PSU_ELEMENT_IDX_VGPU] = {
45 .name = "VGPU",
46 .data = &(const struct mod_mock_psu_element_cfg) {
47 .async_alarm_id = FWK_ID_NONE_INIT,
48 .default_enabled = true,
49 .default_voltage = 850,
50 },
51 },
52 [MOD_MOCK_PSU_ELEMENT_IDX_COUNT] = { 0 }
53 };
54
get_element_table(fwk_id_t module_id)55 static const struct fwk_element *get_element_table(fwk_id_t module_id)
56 {
57 return element_table;
58 }
59
60 struct fwk_module_config config_mock_psu = {
61 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_element_table),
62 };
63