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 <[email protected]> --- Changes in v4: - No changes 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 4ef046942d8..6ad05998758 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -50,6 +50,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 */ @@ -73,6 +76,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

