2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
10 #include <platform_def.h>
11 #include <sgm_plat_config.h>
12 #include <sgm_variant.h>
15 static css_plat_config_t
*css_plat_info
;
18 const css_inteconn_config_t sgm_inteconn
= {
20 .plat_inteconn_desc
= NULL
23 /* Special definition for SGM775 */
24 /* Topology configuration for SGM775 */
25 const unsigned char sgm775_power_domain_tree_desc
[] = {
26 /* No of root nodes */
28 /* No of children for the root node */
29 PLAT_ARM_CLUSTER_COUNT
,
30 /* No of children for the first cluster node */
31 PLAT_ARM_CLUSTER_CORE_COUNT
,
34 const css_topology_t sgm775_topology
= {
35 .power_tree
= sgm775_power_domain_tree_desc
,
36 .plat_cluster_core_count
= PLAT_ARM_CLUSTER_CORE_COUNT
39 /* Configuration structure for SGM775 */
40 css_plat_config_t sgm775_config
= {
41 .inteconn
= &sgm_inteconn
,
42 .topology
= &sgm775_topology
45 /*******************************************************************************
46 * This function initializes the platform structure.
47 ******************************************************************************/
48 void plat_config_init(void)
50 /* Get the platform configurations */
51 switch (GET_PLAT_PART_NUM
) {
52 case SGM775_SSC_VER_PART_NUM
:
53 css_plat_info
= &sgm775_config
;
57 ERROR("Not a valid sgm variant!\n");
62 /*******************************************************************************
63 * This function returns the platform structure pointer.
64 ******************************************************************************/
65 css_plat_config_t
*get_plat_config(void)
67 assert(css_plat_info
!= NULL
);
71 #if TRUSTED_BOARD_BOOT
72 int plat_get_mbedtls_heap(void **heap_addr
, size_t *heap_size
)
74 assert(heap_addr
!= NULL
);
75 assert(heap_size
!= NULL
);
77 return arm_get_mbedtls_heap(heap_addr
, heap_size
);