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