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 "sgm775_mmap.h"
9
10 #include <mod_msys_rom.h>
11 #include <mod_power_domain.h>
12 #include <mod_ppu_v1.h>
13
14 #include <fwk_element.h>
15 #include <fwk_id.h>
16 #include <fwk_interrupt.h>
17 #include <fwk_module.h>
18 #include <fwk_module_idx.h>
19
20 static struct fwk_element sgm775_ppu_v1_element_table[] = {
21 {
22 .name = "CLUS0",
23 .data = &((struct mod_ppu_v1_pd_config) {
24 .pd_type = MOD_PD_TYPE_CLUSTER,
25 .ppu.reg_base = PPU_CLUS0_BASE,
26 .ppu.irq = FWK_INTERRUPT_NONE,
27 .observer_id = FWK_ID_NONE_INIT,
28 }),
29 },
30 {
31 .name = "CORE0",
32 .data = &((struct mod_ppu_v1_pd_config) {
33 .pd_type = MOD_PD_TYPE_CORE,
34 .ppu.reg_base = PPU_CLUS0CORE0_BASE,
35 .ppu.irq = FWK_INTERRUPT_NONE,
36 .cluster_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_PPU_V1, 0),
37 .observer_id = FWK_ID_NONE_INIT,
38 }),
39 },
40 { 0 }, /* Termination entry */
41 };
42
sgm775_ppu_v1_get_element_table(fwk_id_t module_id)43 static const struct fwk_element *sgm775_ppu_v1_get_element_table(
44 fwk_id_t module_id)
45 {
46 return sgm775_ppu_v1_element_table;
47 }
48
49 /*
50 * Power module configuration data
51 */
52 struct fwk_module_config config_ppu_v1 = {
53 .data =
54 &(struct mod_ppu_v1_config){
55 .pd_notification_id = FWK_ID_NOTIFICATION_INIT(
56 FWK_MODULE_IDX_MSYS_ROM,
57 MOD_MSYS_ROM_NOTIFICATION_IDX_POWER_SYSTOP),
58 .pd_source_id = FWK_ID_MODULE_INIT(FWK_MODULE_IDX_MSYS_ROM),
59 },
60
61 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(sgm775_ppu_v1_get_element_table),
62 };
63