[PATCH v3 2/6] arm: snapdragon: Guard PSCI functions with CONFIG_ARM_SMCCC
Balaji Selvanathan
balaji.selvanathan at oss.qualcomm.com
Tue Jun 16 11:22:52 CEST 2026
In snagboot mode, U-Boot is loaded directly by XBL without PSCI
firmware support. The functions show_psci_version() and
qcom_psci_fixup() call arm_smccc_smc() which is unavailable when
CONFIG_ARM_SMCCC is disabled, causing build failures.
Hence, added CONFIG_ARM_SMCCC guards to both functions.
Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
---
Changes in v3:
- Added CONFIG_ARM_SMCCC guards
Changes in v2:
- Newly introduced in v2
---
arch/arm/mach-snapdragon/board.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
index 829a0109ac7..0066951a6a2 100644
--- a/arch/arm/mach-snapdragon/board.c
+++ b/arch/arm/mach-snapdragon/board.c
@@ -162,6 +162,9 @@ static void show_psci_version(void)
{
struct arm_smccc_res res;
+ if (!IS_ENABLED(CONFIG_ARM_SMCCC))
+ return;
+
arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res);
/* Some older SoCs like MSM8916 don't always support PSCI */
@@ -185,6 +188,9 @@ static void qcom_psci_fixup(void *fdt)
int offset, ret;
struct arm_smccc_res res;
+ if (!IS_ENABLED(CONFIG_ARM_SMCCC))
+ return;
+
arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res);
if ((int)res.a0 != PSCI_RET_NOT_SUPPORTED)
--
2.34.1
More information about the U-Boot
mailing list