aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Pandey <manish.pandey2@arm.com>2020-02-18 21:54:25 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2020-02-18 21:54:25 +0000
commit9c87e59e8e65ad0b35e11cbab7537b490e82d455 (patch)
tree45bf16417d46fd47749bfcc6c279c7d4c0e21e23
parent8a10c6c274b9c450fb84bb64901d11c47f4e06e1 (diff)
parent9b229b4495d04dff46dea0e8e8fabd7f2c6ba753 (diff)
downloadtrusted-firmware-a-9c87e59e8e65ad0b35e11cbab7537b490e82d455.tar.gz
Merge changes I5ca7a004,Ibcb336a2 into integration
* changes: board/rdn1edge: use CREATE_SEQ helper macro to compare chip count build_macros: add create sequence helper function
-rw-r--r--make_helpers/build_macros.mk11
-rw-r--r--plat/arm/board/rdn1edge/platform.mk5
2 files changed, 14 insertions, 2 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 1fa26cc2b..b6925d3b1 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -67,6 +67,17 @@ $(foreach d,$(0-9),$(eval __numeric := $(subst $(d),,$(__numeric))))
$(if $(__numeric),$(error $(1) must be numeric))
endef
+# CREATE_SEQ is a recursive function to create sequence of numbers from 1 to
+# $(2) and assign the sequence to $(1)
+define CREATE_SEQ
+$(if $(word $(2), $($(1))),\
+ $(eval $(1) += $(words $($(1))))\
+ $(eval $(1) := $(filter-out 0,$($(1)))),\
+ $(eval $(1) += $(words $($(1))))\
+ $(call CREATE_SEQ,$(1),$(2))\
+)
+endef
+
# IMG_LINKERFILE defines the linker script corresponding to a BL stage
# $(1) = BL stage (2, 30, 31, 32, 33)
define IMG_LINKERFILE
diff --git a/plat/arm/board/rdn1edge/platform.mk b/plat/arm/board/rdn1edge/platform.mk
index 99bb71d79..135676d43 100644
--- a/plat/arm/board/rdn1edge/platform.mk
+++ b/plat/arm/board/rdn1edge/platform.mk
@@ -51,8 +51,9 @@ NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb
# Add the NT_FW_CONFIG to FIP and specify the same to certtool
$(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config))
-ifneq ($(CSS_SGI_CHIP_COUNT),$(filter $(CSS_SGI_CHIP_COUNT),1 2))
- $(error "Chip count for RDN1Edge platform should either 1 or 2, currently \
+$(eval $(call CREATE_SEQ,SEQ,2))
+ifneq ($(CSS_SGI_CHIP_COUNT),$(filter $(CSS_SGI_CHIP_COUNT),$(SEQ)))
+ $(error "Chip count for RDN1Edge platform should be one of $(SEQ), currently \
set to ${CSS_SGI_CHIP_COUNT}.")
endif