1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef TC0_CORE_H
9 #define TC0_CORE_H
10 
11 #include <fwk_assert.h>
12 
13 #define TC0_CORE_PER_CLUSTER_MAX 8
14 
15 #define CORES_PER_CLUSTER  8
16 #define NUMBER_OF_CLUSTERS 1
17 
tc0_core_get_cluster_count(void)18 static inline unsigned int tc0_core_get_cluster_count(void)
19 {
20     return NUMBER_OF_CLUSTERS;
21 }
22 
tc0_core_get_core_per_cluster_count(unsigned int cluster)23 static inline unsigned int tc0_core_get_core_per_cluster_count(
24     unsigned int cluster)
25 {
26     fwk_assert(cluster < tc0_core_get_cluster_count());
27 
28     return CORES_PER_CLUSTER;
29 }
30 
tc0_core_get_core_count(void)31 static inline unsigned int tc0_core_get_core_count(void)
32 {
33     return tc0_core_get_core_per_cluster_count(0) *
34         tc0_core_get_cluster_count();
35 }
36 
37 #endif /* TC0_CORE_H */
38