Skip to content

Commit

Permalink
core: scmi-server: Add support for conditional options for SCMI-Perf
Browse files Browse the repository at this point in the history
SCMI-Server is built upon the SCP-firmware source tree and
a recent change [1] being proposed is moving functionalities
into side source files.

This patch adds support to fetch those additional files based
on two options:
CFG_SCPFW_SCMI_PERF_FAST_CHANNELS (existing)
CFG_SCPFW_SCMI_PERF_PROTOCOL_OPS (new)

[1] ARM-software/SCP-firmware#812

Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
  • Loading branch information
nicola-mazzucato-arm committed Aug 8, 2023
1 parent ae138df commit 2c826f5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions core/lib/scmi-server/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ cppflags-lib-$(CFG_SCPFW_CLOCK_TREE_MGMT) += -DBUILD_HAS_CLOCK_TREE_MGMT

cppflags-lib-$(CFG_SCPFW_SCMI_PERF_FAST_CHANNELS) += -DBUILD_HAS_SCMI_PERF_FAST_CHANNELS

cppflags-lib-$(CFG_SCPFW_SCMI_PERF_PROTOCOL_OPS) \
+= -DBUILD_HAS_SCMI_PERF_PROTOCOL_OPS

cppflags-lib-$(CFG_SCPFW_SCMI_SENSOR_EVENTS) += -DBUILD_HAS_SCMI_SENSOR_EVENTS
cppflags-lib-$(CFG_SCPFW_SCMI_SENSOR_V2) += -DBUILD_HAS_SCMI_SENSOR_V2 \
-DBUILD_HAS_SENSOR_TIMESTAMP \
Expand Down Expand Up @@ -148,6 +151,21 @@ ifneq (,$$(wildcard $(scpfw-path)/$3/$2/include/*))
incdirs_ext-y += $(scpfw-path)/$3/$2/include
endif
srcs-$(CFG_SCPFW_MOD_$4) += $(scpfw-path)/$3/$2/src/mod_$1.c

# SCMI_Perf in SCP-firmware has components that can be added conditionally at
# build time.
ifeq ($(1), scmi_perf)

ifeq ($(CFG_SCPFW_SCMI_PERF_PROTOCOL_OPS),y)
srcs-$(CFG_SCPFW_MOD_SCMI_PERF) += $(scpfw-path)/$3/$2/src/scmi_perf_protocol_ops.c
endif

ifeq ($(CFG_SCPFW_SCMI_PERF_FAST_CHANNELS),y)
srcs-$(CFG_SCPFW_MOD_SCMI_PERF) += $(scpfw-path)/$3/$2/src/scmi_perf_fastchannels.c
endif

endif

cflags-lib-$(CFG_SCPFW_MOD_$4) += -DBUILD_HAS_MOD_$4
endef

Expand Down

0 comments on commit 2c826f5

Please sign in to comment.