1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2017-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
18 static const struct fwk_element element_table[] = {
19 [CONFIG_MOCK_PSU_ELEMENT_IDX_CLUS0] =
20 {
21 .name = "CLUSTER_0_CPUS",
22 .data =
23 &(const struct mod_mock_psu_element_cfg){
24 .async_alarm_id = FWK_ID_NONE_INIT,
25 .async_alarm_api_id = FWK_ID_NONE_INIT,
26
27 .async_response_id = FWK_ID_NONE_INIT,
28 .async_response_api_id = FWK_ID_NONE_INIT,
29
30 .default_enabled = true,
31 .default_voltage = 800,
32 },
33 },
34 [CONFIG_MOCK_PSU_ELEMENT_IDX_CLUS1] =
35 {
36 .name = "CLUSTER_1_CPUS",
37 .data =
38 &(const struct mod_mock_psu_element_cfg){
39 .async_alarm_id = FWK_ID_NONE_INIT,
40 .async_alarm_api_id = FWK_ID_NONE_INIT,
41
42 .async_response_id = FWK_ID_NONE_INIT,
43 .async_response_api_id = FWK_ID_NONE_INIT,
44
45 .default_enabled = true,
46 .default_voltage = 800,
47 },
48 },
49 { 0 }
50 };
51
get_element_table(fwk_id_t module_id)52 static const struct fwk_element *get_element_table(fwk_id_t module_id)
53 {
54 return element_table;
55 }
56
57 const struct fwk_module_config config_mock_psu = {
58 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_element_table),
59 .data = NULL,
60 };
61