remoteproc: stm32: fix building without ARM SMCC
Subsystems (2)
PATCH 1/1 remoteproc: stm32: fix building without ARM SMCC
When compile testing this driver without SMCC support enabled, we get a link error:
drivers/remoteproc/stm32_rproc.o: In function `stm32_rproc_start':
stm32_rproc.c:(.text+0x776): undefined reference to __arm_smccc_smc' drivers/remoteproc/stm32_rproc.o: In function stm32_rproc_stop':
stm32_rproc.c:(.text+0x92c): undefined reference to `__arm_smccc_smc'
Make the actual call to arm_smccc_smc conditional on the Kconfig symbol controlling its implementation.
--- drivers/remoteproc/stm32_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/stm32_rproc.c +1 -1
@@ -344,7 +344,7 @@ static int stm32_rproc_set_hold_boot(struct rproc *rproc, bool hold) val = hold ?HOLD_BOOT :RELEASE_BOOT ; -if (ddata->secured_soc) { +if (IS_ENABLED (CONFIG_HAVE_ARM_SMCCC ) && ddata->secured_soc) {arm_smccc_smc (STM32_SMC_RCC ,STM32_SMC_REG_WRITE , hold_boot.reg, val,0 ,0 ,0 ,0 , &smc_res); err = smc_res.a0;
Signature · 1 line
2.20.0
Quoted 8 lines · Arnd Bergmann
When compile testing this driver without SMCC support enabled, we get a link error:
drivers/remoteproc/stm32_rproc.o: In function `stm32_rproc_start':
stm32_rproc.c:(.text+0x776): undefined reference to__arm_smccc_smc' drivers/remoteproc/stm32_rproc.o: In functionstm32_rproc_stop':
stm32_rproc.c:(.text+0x92c): undefined reference to `__arm_smccc_smc'
Quoted 5 lines
Make the actual call to
arm_smccc_smcconditional on theKconfigsymbol controlling its implementation.Fixes 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver")Signed-off-by Arnd Bergmann <[email protected]>
Thanks Arnd, applied
Regards,
Bjorn
Quoted 20 lines
--- drivers/remoteproc/stm32_rproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/remoteproc/stm32_rproc.c +1
-1@@ -344,7 +344,7 @@ static int stm32_rproc_set_hold_boot(struct rproc *rproc, bool hold) val = hold ?HOLD_BOOT :RELEASE_BOOT ; -if (ddata->secured_soc) { +if (IS_ENABLED (CONFIG_HAVE_ARM_SMCCC ) && ddata->secured_soc) {arm_smccc_smc (STM32_SMC_RCC ,STM32_SMC_REG_WRITE , hold_boot.reg, val,0 ,0 ,0 ,0 , &smc_res); err = smc_res.a0;Signature · 1 line
2.20.0