1 /*
2 * Renesas SCP/MCP Software
3 * Copyright (c) 2020-2021, Renesas Electronics Corporation. All rights
4 * reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9 #include <config_rcar_pmic.h>
10 #include <config_rcar_mock_pmic_bd9571.h>
11
12 #include <mod_rcar_mock_pmic_bd9571.h>
13 #include <mod_rcar_pmic.h>
14
15 #include <fwk_element.h>
16 #include <fwk_module.h>
17 #include <fwk_module_idx.h>
18
19 static const struct fwk_element element_table[] = {
20 [MOD_RCAR_PMIC_ELEMENT_IDX_LITTLE] = {
21 .name = "CPU_GROUP_LITTLE",
22 .data =
23 &(const struct mod_rcar_pmic_device_config){
24 .driver_id = FWK_ID_ELEMENT_INIT(
25 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
26 MOD_RCAR_MOCK_PMIC_ELEMENT_IDX_LITTLE),
27 .driver_api_id = FWK_ID_API_INIT(
28 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
29 MOD_RCAR_MOCK_PMIC_API_IDX_PSU_DRIVER) },
30 },
31 [MOD_RCAR_PMIC_ELEMENT_IDX_BIG] = {
32 .name = "CPU_GROUP_BIG",
33 .data =
34 &(const struct mod_rcar_pmic_device_config){
35 .driver_id = FWK_ID_ELEMENT_INIT(
36 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
37 MOD_RCAR_MOCK_PMIC_ELEMENT_IDX_BIG),
38 .driver_api_id = FWK_ID_API_INIT(
39 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
40 MOD_RCAR_MOCK_PMIC_API_IDX_PSU_DRIVER) },
41 },
42 [MOD_RCAR_PMIC_ELEMENT_IDX_DDR_BKUP] = {
43 .name = "PMIC_DDR_BKUP",
44 .data =
45 &(const struct mod_rcar_pmic_device_config){
46 .driver_id = FWK_ID_ELEMENT_INIT(
47 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
48 RCAR_PMIC_CPU_DDR_BKUP),
49 .driver_api_id = FWK_ID_API_INIT(
50 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
51 MOD_RCAR_MOCK_PMIC_API_IDX_PSU_DRIVER) },
52 },
53 [MOD_RCAR_PMIC_ELEMENT_IDX_GPU] = {
54 .name = "GPU",
55 .data =
56 &(const struct mod_rcar_pmic_device_config){
57 .driver_id = FWK_ID_ELEMENT_INIT(
58 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
59 MOD_RCAR_MOCK_PMIC_ELEMENT_IDX_GPU),
60 .driver_api_id = FWK_ID_API_INIT(
61 FWK_MODULE_IDX_RCAR_MOCK_PMIC_BD9571,
62 MOD_RCAR_MOCK_PMIC_API_IDX_PSU_DRIVER) },
63 },
64 { 0 }
65 };
66
rcar_pmic_get_element_table(fwk_id_t module_id)67 static const struct fwk_element *rcar_pmic_get_element_table(fwk_id_t module_id)
68 {
69 return element_table;
70 }
71
72 struct fwk_module_config config_rcar_pmic = {
73 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(rcar_pmic_get_element_table),
74 .data = NULL,
75 };
76