1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2018-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef INTERNAL_CRG11_H
9 #define INTERNAL_CRG11_H
10 
11 #include "synquacer_mmap.h"
12 
13 #include <stdbool.h>
14 #include <stdint.h>
15 
16 /* CRG11 is only used to reboot system */
17 #define CRG11_CRSWR(crg11_top_reg_addr) (crg11_top_reg_addr + 0x0024U)
18 
19 #define INVALID_CRG11_ID (-1)
20 #define INVALID_LCRG (-1)
21 
22 typedef struct crg11_state_s {
23     unsigned int ps_mode : 4;
24     unsigned int fb_mode : 6;
25     uint32_t src_frequency;
26     int8_t lcrg_numerator;
27     uint32_t reg_addr;
28     uint16_t clock_domain_div_modifiable_mask;
29     uint8_t clock_domain_div[16];
30     uint8_t port_gate[16];
31     uint8_t gate_enable[16];
32     uint8_t ref_count;
33     unsigned int ap_change_allowed_flag : 1;
34 } crg11_state_t;
35 
36 #endif /* INTERNAL_CRG11_H */
37