xref: /rk3399_ARM-atf/plat/arm/board/fvp/include/fconf_hw_config_getter.h (revision 04e06973e1fef87849c498c7f045aa2be8aada1c)
1 /*
2  * Copyright (c) 2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef FCONF_HW_CONFIG_GETTER_H
8 #define FCONF_HW_CONFIG_GETTER_H
9 
10 #include <lib/fconf/fconf.h>
11 
12 /* Hardware Config related getter */
13 #define hw_config__gicv3_config_getter(prop) gicv3_config.prop
14 
15 #define hw_config__topology_getter(prop) soc_topology.prop
16 
17 #define hw_config__uart_serial_config_getter(prop) uart_serial_config.prop
18 
19 struct gicv3_config_t {
20 	uint64_t gicd_base;
21 	uint64_t gicr_base;
22 };
23 
24 struct hw_topology_t {
25 	uint32_t plat_cluster_count;
26 	uint32_t cluster_cpu_count;
27 	uint32_t plat_cpu_count;
28 	uint32_t plat_max_pwr_level;
29 };
30 
31 struct uart_serial_config_t {
32 	uint64_t uart_base;
33 	uint32_t uart_clk;
34 };
35 
36 int fconf_populate_gicv3_config(uintptr_t config);
37 int fconf_populate_topology(uintptr_t config);
38 int fconf_populate_uart_config(uintptr_t config);
39 
40 extern struct gicv3_config_t gicv3_config;
41 extern struct hw_topology_t soc_topology;
42 extern struct uart_serial_config_t uart_serial_config;
43 
44 #endif /* FCONF_HW_CONFIG_GETTER_H */
45