Merge branch 'async-scsi-resume' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / arch / arm / include / asm / trusted_foundations.h
index 3bd36e2c5f2e29ec68048bd32391b323089f675d..b5f7705abcb024bb21c41ce34c6f7e95ddfb9bb8 100644 (file)
@@ -30,6 +30,8 @@
 #include <linux/printk.h>
 #include <linux/bug.h>
 #include <linux/of.h>
+#include <linux/cpu.h>
+#include <linux/smp.h>
 
 struct trusted_foundations_platform_data {
        unsigned int version_major;
@@ -47,10 +49,13 @@ static inline void register_trusted_foundations(
                                   struct trusted_foundations_platform_data *pd)
 {
        /*
-        * If we try to register TF, this means the system needs it to continue.
-        * Its absence if thus a fatal error.
+        * If the system requires TF and we cannot provide it, continue booting
+        * but disable features that cannot be provided.
         */
-       panic("No support for Trusted Foundations, stopping...\n");
+       pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
+       pr_err("Secondary processors as well as CPU PM will be disabled.\n");
+       setup_max_cpus = 0;
+       cpu_idle_poll_ctrl(true);
 }
 
 static inline void of_register_trusted_foundations(void)
@@ -59,7 +64,7 @@ static inline void of_register_trusted_foundations(void)
         * If we find the target should enable TF but does not support it,
         * fail as the system won't be able to do much anyway
         */
-       if (of_find_compatible_node(NULL, NULL, "tl,trusted-foundations"))
+       if (of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations"))
                register_trusted_foundations(NULL);
 }
 #endif /* CONFIG_TRUSTED_FOUNDATIONS */