1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2022, Linaro Limited and Contributors. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8 #include <fwk_module.h>
9 #include <mod_mock_psu.h>
10 #include "config_mock_psu.h"
11
12 static const struct fwk_element element_table[] = {
13 [CONFIG_MOCK_PSU_ELEMENT_IDX_CPU_GROUP_LITTLE] = {
14 .name = "CPU_GROUP_LITTLE",
15 .data = &(const struct mod_mock_psu_element_cfg) {
16 .default_enabled = true,
17 .default_voltage = 100,
18 .async_alarm_id = FWK_ID_NONE_INIT,
19 },
20 },
21 [CONFIG_MOCK_PSU_ELEMENT_IDX_CPU_GROUP_BIG] = {
22 .name = "CPU_GROUP_BIG",
23 .data = &(const struct mod_mock_psu_element_cfg) {
24 .default_enabled = true,
25 .default_voltage = 100,
26 .async_alarm_id = FWK_ID_NONE_INIT,
27 },
28 },
29 [CONFIG_MOCK_PSU_ELEMENT_IDX_GPU] = {
30 .name = "GPU",
31 .data = &(const struct mod_mock_psu_element_cfg) {
32 .default_enabled = true,
33 .default_voltage = 100,
34 .async_alarm_id = FWK_ID_NONE_INIT,
35 },
36 },
37 [CONFIG_MOCK_PSU_ELEMENT_IDX_VPU] = {
38 .name = "VPU",
39 .data = &(const struct mod_mock_psu_element_cfg) {
40 .default_enabled = true,
41 .default_voltage = 100,
42 .async_alarm_id = FWK_ID_NONE_INIT,
43 },
44 },
45 { 0 }
46 };
47
get_element_table(fwk_id_t module_id)48 static const struct fwk_element *get_element_table(fwk_id_t module_id)
49 {
50 return element_table;
51 }
52
53 struct fwk_module_config config_mock_psu = {
54 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_element_table),
55 };
56