]> Git Repo - linux.git/blobdiff - drivers/firmware/psci/psci.c
Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart...
[linux.git] / drivers / firmware / psci / psci.c
index 2937d44b5df46ef1fc437b75b134a0f11905cff1..92013ecc2d9ed71c624bf0e09a118164b48e47db 100644 (file)
  * require cooperation with a Trusted OS driver.
  */
 static int resident_cpu = -1;
+struct psci_operations psci_ops;
+static enum arm_smccc_conduit psci_conduit = SMCCC_CONDUIT_NONE;
 
 bool psci_tos_resident_on(int cpu)
 {
        return cpu == resident_cpu;
 }
 
-struct psci_operations psci_ops = {
-       .conduit = SMCCC_CONDUIT_NONE,
-       .smccc_version = SMCCC_VERSION_1_0,
-};
-
-enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void)
-{
-       if (psci_ops.smccc_version < SMCCC_VERSION_1_1)
-               return SMCCC_CONDUIT_NONE;
-
-       return psci_ops.conduit;
-}
-
 typedef unsigned long (psci_fn)(unsigned long, unsigned long,
                                unsigned long, unsigned long);
 static psci_fn *invoke_psci_fn;
@@ -242,7 +231,7 @@ static void set_conduit(enum arm_smccc_conduit conduit)
                WARN(1, "Unexpected PSCI conduit %d\n", conduit);
        }
 
-       psci_ops.conduit = conduit;
+       psci_conduit = conduit;
 }
 
 static int get_set_conduit_method(struct device_node *np)
@@ -411,8 +400,8 @@ static void __init psci_init_smccc(void)
        if (feature != PSCI_RET_NOT_SUPPORTED) {
                u32 ret;
                ret = invoke_psci_fn(ARM_SMCCC_VERSION_FUNC_ID, 0, 0, 0);
-               if (ret == ARM_SMCCC_VERSION_1_1) {
-                       psci_ops.smccc_version = SMCCC_VERSION_1_1;
+               if (ret >= ARM_SMCCC_VERSION_1_1) {
+                       arm_smccc_version_init(ret, psci_conduit);
                        ver = ret;
                }
        }
This page took 0.032669 seconds and 4 git commands to generate.