summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2025-08-25 15:00:32 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-02 13:48:27 +0200
commit8707ccbf686f7d45ed488a808eb5633ef50bb14e (patch)
treec8b60113c73513c6c699b217e2c34a9db097add4 /include/linux
parent5f9587bbb3bb7b14e639db6d579c960a40f45390 (diff)
firmware: imx: Add stub functions for SCMI CPU API
[ Upstream commit 222accf05fc42f68ae02065d9c1542c20315118b ] To ensure successful builds when CONFIG_IMX_SCMI_CPU_DRV is not enabled, this patch adds static inline stub implementations for the following functions: - scmi_imx_cpu_start() - scmi_imx_cpu_started() - scmi_imx_cpu_reset_vector_set() These stubs return -EOPNOTSUPP to indicate that the functionality is not supported in the current configuration. This avoids potential build or link errors in code that conditionally calls these functions based on feature availability. Fixes: 1055faa5d660 ("firmware: imx: Add i.MX95 SCMI CPU driver") Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/firmware/imx/sm.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/firmware/imx/sm.h b/include/linux/firmware/imx/sm.h
index 6e700e455934..1817df9aceac 100644
--- a/include/linux/firmware/imx/sm.h
+++ b/include/linux/firmware/imx/sm.h
@@ -33,10 +33,28 @@ static inline int scmi_imx_misc_ctrl_set(u32 id, u32 val)
}
#endif
+#if IS_ENABLED(CONFIG_IMX_SCMI_CPU_DRV)
int scmi_imx_cpu_start(u32 cpuid, bool start);
int scmi_imx_cpu_started(u32 cpuid, bool *started);
int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start, bool boot,
bool resume);
+#else
+static inline int scmi_imx_cpu_start(u32 cpuid, bool start)
+{
+ return -EOPNOTSUPP;
+}
+
+static inline int scmi_imx_cpu_started(u32 cpuid, bool *started)
+{
+ return -EOPNOTSUPP;
+}
+
+static inline int scmi_imx_cpu_reset_vector_set(u32 cpuid, u64 vector, bool start,
+ bool boot, bool resume)
+{
+ return -EOPNOTSUPP;
+}
+#endif
enum scmi_imx_lmm_op {
SCMI_IMX_LMM_BOOT,