"Das U-Boot" Source Tree

firmware: psci: Fix bind_smccc_features psci check

According to PSCI specification DEN0022F, PSCI_FEATURES is used to check
whether the SMCCC is implemented by discovering SMCCC_VERSION.

Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>

authored by

Weizhao Ouyang and committed by
Tom Rini
12ccdcd7 0cff87c9

+10 -1
+4 -1
drivers/firmware/psci.c
··· 135 135 PSCI_VERSION_MAJOR(psci_0_2_get_version()) == 0) 136 136 return 0; 137 137 138 - if (request_psci_features(ARM_SMCCC_ARCH_FEATURES) == 138 + if (request_psci_features(ARM_SMCCC_VERSION) == 139 139 PSCI_RET_NOT_SUPPORTED) 140 + return 0; 141 + 142 + if (invoke_psci_fn(ARM_SMCCC_VERSION, 0, 0, 0) < ARM_SMCCC_VERSION_1_1) 140 143 return 0; 141 144 142 145 if (psci_method == PSCI_METHOD_HVC)
+6
include/linux/arm-smccc.h
··· 55 55 #define ARM_SMCCC_QUIRK_NONE 0 56 56 #define ARM_SMCCC_QUIRK_QCOM_A6 1 /* Save/restore register a6 */ 57 57 58 + #define ARM_SMCCC_VERSION 0x80000000 58 59 #define ARM_SMCCC_ARCH_FEATURES 0x80000001 60 + 61 + #define ARM_SMCCC_VERSION_1_0 0x10000 62 + #define ARM_SMCCC_VERSION_1_1 0x10001 63 + #define ARM_SMCCC_VERSION_1_2 0x10002 64 + #define ARM_SMCCC_VERSION_1_3 0x10003 59 65 60 66 #define ARM_SMCCC_RET_NOT_SUPPORTED ((unsigned long)-1) 61 67