1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8 #include <tc0_mock_psu.h>
9
10 #include <mod_mock_psu.h>
11
12 #include <fwk_element.h>
13 #include <fwk_module.h>
14
15 static const struct fwk_element element_table[] = {
16 [MOCK_PSU_ELEMENT_IDX_KLEIN] = {
17 .name = "DVFS_GROUP_KLEIN",
18 .data =
19 &(const struct mod_mock_psu_element_cfg){
20 .async_alarm_id = FWK_ID_NONE_INIT,
21 .async_alarm_api_id = FWK_ID_NONE_INIT,
22
23 .async_response_id = FWK_ID_NONE_INIT,
24 .async_response_api_id = FWK_ID_NONE_INIT,
25
26 .default_enabled = true,
27 .default_voltage = 550,
28 },
29 },
30 [MOCK_PSU_ELEMENT_IDX_MATTERHORN] = {
31 .name = "DVFS_GROUP_MATTERHORN",
32 .data =
33 &(const struct mod_mock_psu_element_cfg){
34 .async_alarm_id = FWK_ID_NONE_INIT,
35 .async_alarm_api_id = FWK_ID_NONE_INIT,
36
37 .async_response_id = FWK_ID_NONE_INIT,
38 .async_response_api_id = FWK_ID_NONE_INIT,
39
40 .default_enabled = true,
41 .default_voltage = 550,
42 },
43 },
44 [MOCK_PSU_ELEMENT_IDX_MATTERHORN_ELP_ARM] = {
45 .name = "DVFS_GROUP_MATTERHORN_ELP_ARM",
46 .data =
47 &(const struct mod_mock_psu_element_cfg){
48 .async_alarm_id = FWK_ID_NONE_INIT,
49 .async_alarm_api_id = FWK_ID_NONE_INIT,
50
51 .async_response_id = FWK_ID_NONE_INIT,
52 .async_response_api_id = FWK_ID_NONE_INIT,
53
54 .default_enabled = true,
55 .default_voltage = 550,
56 },
57 },
58 { 0 }
59 };
60
get_element_table(fwk_id_t module_id)61 static const struct fwk_element *get_element_table(fwk_id_t module_id)
62 {
63 return element_table;
64 }
65
66 const struct fwk_module_config config_mock_psu = {
67 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_element_table),
68 };
69