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 #include "n1sdp_core.h"
9 #include "n1sdp_scc_reg.h"
10 #include "n1sdp_scp_pik.h"
11 
12 #include <fwk_assert.h>
13 
n1sdp_core_get_core_per_cluster_count(unsigned int cluster)14 unsigned int n1sdp_core_get_core_per_cluster_count(unsigned int cluster)
15 {
16     fwk_assert(cluster < n1sdp_core_get_cluster_count());
17 
18     return CORES_PER_CLUSTER;
19 }
20 
n1sdp_core_get_core_count(void)21 unsigned int n1sdp_core_get_core_count(void)
22 {
23     return (NUMBER_OF_CLUSTERS * CORES_PER_CLUSTER);
24 }
25 
n1sdp_core_get_cluster_count(void)26 unsigned int n1sdp_core_get_cluster_count(void)
27 {
28     return NUMBER_OF_CLUSTERS;
29 }
30 
n1sdp_is_multichip_enabled(void)31 bool n1sdp_is_multichip_enabled(void)
32 {
33     return ((SCC->PLATFORM_CTRL & SCC_PLATFORM_CTRL_MULTI_CHIP_MODE_MASK) >>
34             SCC_PLATFORM_CTRL_MULTI_CHIP_MODE_POS);
35 }
36 
n1sdp_get_chipid(void)37 uint8_t n1sdp_get_chipid(void)
38 {
39     return ((uint8_t)((SCC->PLATFORM_CTRL & SCC_PLATFORM_CTRL_CHIPID_MASK) >>
40             SCC_PLATFORM_CTRL_CHIPID_POS));
41 }
42