aboutsummaryrefslogtreecommitdiff
path: root/product/n1sdp
diff options
context:
space:
mode:
authorManoj Kumar <manoj.kumar3@arm.com>2018-10-26 11:08:33 +0530
committerdavidcunado-arm <david.cunado@arm.com>2018-10-30 16:58:33 +0000
commita4a1ed21f6a87dd41341af8ce3686d4156e48caf (patch)
tree34b44815b48f17c6d04e2063efae63fa8561f872 /product/n1sdp
parentad17979735621944bd8fff667d8c9be932fb7f87 (diff)
n1sdp: add n1sdp_core.c file
This patch adds n1sdp_core.c file used for calculation of core count and cluster count. Change-Id: Ie661f355b2309c618e95fd46014fb759464c9d23 Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
Diffstat (limited to 'product/n1sdp')
-rw-r--r--product/n1sdp/src/n1sdp_core.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/product/n1sdp/src/n1sdp_core.c b/product/n1sdp/src/n1sdp_core.c
new file mode 100644
index 00000000..0631fe06
--- /dev/null
+++ b/product/n1sdp/src/n1sdp_core.c
@@ -0,0 +1,26 @@
+/*
+ * Arm SCP/MCP Software
+ * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <assert.h>
+#include <n1sdp_core.h>
+
+unsigned int n1sdp_core_get_core_per_cluster_count(unsigned int cluster)
+{
+ assert(cluster < n1sdp_core_get_cluster_count());
+
+ return CORES_PER_CLUSTER;
+}
+
+unsigned int n1sdp_core_get_core_count(void)
+{
+ return (NUMBER_OF_CLUSTERS * CORES_PER_CLUSTER);
+}
+
+unsigned int n1sdp_core_get_cluster_count(void)
+{
+ return NUMBER_OF_CLUSTERS;
+}