Merge branch 'tracking-armlt-psci' into lsk-3.10-vexpress
authorJon Medhurst <tixy@linaro.org>
Wed, 17 Jul 2013 11:02:02 +0000 (12:02 +0100)
committerJon Medhurst <tixy@linaro.org>
Wed, 17 Jul 2013 11:02:02 +0000 (12:02 +0100)
Conflicts:
arch/arm/kernel/psci.c

1  2 
arch/arm/include/asm/psci.h
arch/arm/kernel/psci.c

index c4ae171850f8326bef2c3b991693771ae2f13d69,a079cbee427575c928a8a9d55962ad2cbe9818b4..f0a8627c9f1c250b63d0569f1b076981175d9f55
@@@ -32,14 -36,13 +36,22 @@@ struct psci_operations 
  };
  
  extern struct psci_operations psci_ops;
 +extern struct smp_operations psci_smp_ops;
 +
 +#ifdef CONFIG_ARM_PSCI
 +void psci_init(void);
 +bool psci_smp_available(void);
 +#else
 +static inline void psci_init(void) { }
 +static inline bool psci_smp_available(void) { return false; }
 +#endif
  
+ #ifdef CONFIG_ARM_PSCI
+ extern int __init psci_probe(void);
+ #else
+ static inline int psci_probe(void)
+ {
+       return -ENODEV;
+ }
+ #endif
  #endif /* __ASM_ARM_PSCI_H */
index 46931880093dc1bb2382b893743a5da4168f87a0,1180801468d894b5ff33c43c9852c7c69e1c638a..0daf4f2522845306424c274594257867a2f545b2
@@@ -164,9 -173,12 +173,12 @@@ void __init psci_init(void
        const char *method;
        u32 id;
  
 -              return 0;
+       if (psci == PSCI_SUP_DISABLED)
++              return;
        np = of_find_matching_node(NULL, psci_of_match);
        if (!np)
 -              return 0;
 +              return;
  
        pr_info("probing function IDs from device-tree\n");
  
  
  out_put_node:
        of_node_put(np);
 -      return 0;
 +      return;
  }
 -early_initcall(psci_init);
+ int __init psci_probe(void)
+ {
+       struct device_node *np;
+       int ret = -ENODEV;
+       if (psci == PSCI_SUP_ENABLED) {
+               np = of_find_matching_node(NULL, psci_of_match);
+               if (np)
+                       ret = 0;
+       }
+       of_node_put(np);
+       return ret;
+ }
+ static int __init early_psci(char *val)
+ {
+       int ret = 0;
+       if (strcmp(val, "enable") == 0)
+               psci = PSCI_SUP_ENABLED;
+       else if (strcmp(val, "disable") == 0)
+               psci = PSCI_SUP_DISABLED;
+       else
+               ret = -EINVAL;
+       return ret;
+ }
+ early_param("psci", early_psci);