};
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 */
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);