diff --git a/product/clark/include/clark_core.h b/product/clark/include/clark_core.h index 3cd141028a3bfbec8f81cd40aa99da868f868f25..bfda3730e9d47c2048dca5649b481ba79a7157e1 100644 --- a/product/clark/include/clark_core.h +++ b/product/clark/include/clark_core.h @@ -8,10 +8,30 @@ #ifndef CLARK_CORE_H #define CLARK_CORE_H +#include + #define CLARK_CORE_PER_CLUSTER_MAX 8 -unsigned int clark_core_get_core_per_cluster_count(unsigned int cluster); -unsigned int clark_core_get_core_count(void); -unsigned int clark_core_get_cluster_count(void); +/* Clark only has one configuration, hence the constant values */ +#define CORES_PER_CLUSTER 4 +#define NUMBER_OF_CLUSTERS 2 + +static inline unsigned int clark_core_get_cluster_count(void) +{ + return NUMBER_OF_CLUSTERS; +} + +static inline unsigned int clark_core_get_core_per_cluster_count( + unsigned int cluster) +{ + fwk_assert(cluster < clark_core_get_cluster_count()); + + return CORES_PER_CLUSTER; +} + +static inline unsigned int clark_core_get_core_count(void) +{ + return NUMBER_OF_CLUSTERS * CORES_PER_CLUSTER; +} #endif /* CLARK_CORE_H */ diff --git a/product/clark/scp_ramfw/firmware.mk b/product/clark/scp_ramfw/firmware.mk index 8a678bbe05980025d26484b8943eced7d28ae8a1..25bc3109a1847785d47ea9ebc32b3ab67917edba 100644 --- a/product/clark/scp_ramfw/firmware.mk +++ b/product/clark/scp_ramfw/firmware.mk @@ -50,7 +50,6 @@ BS_FIRMWARE_SOURCES := \ config_system_power.c \ config_sid.c \ rtx_config.c \ - clark_core.c \ config_armv7m_mpu.c \ config_log.c \ config_power_domain.c \ diff --git a/product/clark/src/clark_core.c b/product/clark/src/clark_core.c deleted file mode 100644 index 84cf7b10cf09bcafef0addae1188ada563b8a619..0000000000000000000000000000000000000000 --- a/product/clark/src/clark_core.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Arm SCP/MCP Software - * Copyright (c) 2017-2019, Arm Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -/* Clark only has one configuration, hence the constant values */ - -#define CORES_PER_CLUSTER 4 -#define NUMBER_OF_CLUSTERS 2 - -unsigned int clark_core_get_core_per_cluster_count(unsigned int cluster) -{ - assert(cluster < clark_core_get_cluster_count()); - - return CORES_PER_CLUSTER; -} - -unsigned int clark_core_get_core_count(void) -{ - return NUMBER_OF_CLUSTERS * CORES_PER_CLUSTER; -} - -unsigned int clark_core_get_cluster_count(void) -{ - return NUMBER_OF_CLUSTERS; -}