aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-03-20 17:35:13 -0400
committerOlof Johansson <olof@lixom.net>2014-03-20 17:35:13 -0400
commit5d4089a4ad06980c67c8e5a2527f73e085d02423 (patch)
tree15fab8a00860e5ca5277e09f7fdb45daf08b13c2 /arch/arm/include/asm
parent6df5132aeeae041038ed2396697df5ff558a4291 (diff)
parent338f2aadca7ed4e30e5937fdebc3ff72fda210b6 (diff)
Merge tag 'tegra-for-3.15-tf' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/soc
Merge "ARM: tegra: Trusted Foundations work for 3.15" from Stephen Warren: This pull request contains a number of cleanups and enhancements for the Trusted Foundations firmware used on production Tegra SoCs. The changes allow kernels without TF support to run on HW that uses TF, albeit with reduced functionality, and also fix the cpuidle feature. * tag 'tegra-for-3.15-tf' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: cpuidle: use firmware for power down ARM: trusted_foundations: implement prepare_idle() ARM: firmware: add prepare_idle() operation ARM: firmware: enable Trusted Foundations by default ARM: trusted_foundations: fallback when TF support is missing ARM: trusted_foundations: fix vendor prefix typos Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/firmware.h4
-rw-r--r--arch/arm/include/asm/trusted_foundations.h13
2 files changed, 13 insertions, 4 deletions
diff --git a/arch/arm/include/asm/firmware.h b/arch/arm/include/asm/firmware.h
index 15631300c238..2c9f10df7568 100644
--- a/arch/arm/include/asm/firmware.h
+++ b/arch/arm/include/asm/firmware.h
@@ -22,6 +22,10 @@
22 */ 22 */
23struct firmware_ops { 23struct firmware_ops {
24 /* 24 /*
25 * Inform the firmware we intend to enter CPU idle mode
26 */
27 int (*prepare_idle)(void);
28 /*
25 * Enters CPU idle mode 29 * Enters CPU idle mode
26 */ 30 */
27 int (*do_idle)(void); 31 int (*do_idle)(void);
diff --git a/arch/arm/include/asm/trusted_foundations.h b/arch/arm/include/asm/trusted_foundations.h
index 3bd36e2c5f2e..b5f7705abcb0 100644
--- a/arch/arm/include/asm/trusted_foundations.h
+++ b/arch/arm/include/asm/trusted_foundations.h
@@ -30,6 +30,8 @@
30#include <linux/printk.h> 30#include <linux/printk.h>
31#include <linux/bug.h> 31#include <linux/bug.h>
32#include <linux/of.h> 32#include <linux/of.h>
33#include <linux/cpu.h>
34#include <linux/smp.h>
33 35
34struct trusted_foundations_platform_data { 36struct trusted_foundations_platform_data {
35 unsigned int version_major; 37 unsigned int version_major;
@@ -47,10 +49,13 @@ static inline void register_trusted_foundations(
47 struct trusted_foundations_platform_data *pd) 49 struct trusted_foundations_platform_data *pd)
48{ 50{
49 /* 51 /*
50 * If we try to register TF, this means the system needs it to continue. 52 * If the system requires TF and we cannot provide it, continue booting
51 * Its absence if thus a fatal error. 53 * but disable features that cannot be provided.
52 */ 54 */
53 panic("No support for Trusted Foundations, stopping...\n"); 55 pr_err("No support for Trusted Foundations, continuing in degraded mode.\n");
56 pr_err("Secondary processors as well as CPU PM will be disabled.\n");
57 setup_max_cpus = 0;
58 cpu_idle_poll_ctrl(true);
54} 59}
55 60
56static inline void of_register_trusted_foundations(void) 61static inline void of_register_trusted_foundations(void)
@@ -59,7 +64,7 @@ static inline void of_register_trusted_foundations(void)
59 * If we find the target should enable TF but does not support it, 64 * If we find the target should enable TF but does not support it,
60 * fail as the system won't be able to do much anyway 65 * fail as the system won't be able to do much anyway
61 */ 66 */
62 if (of_find_compatible_node(NULL, NULL, "tl,trusted-foundations")) 67 if (of_find_compatible_node(NULL, NULL, "tlm,trusted-foundations"))
63 register_trusted_foundations(NULL); 68 register_trusted_foundations(NULL);
64} 69}
65#endif /* CONFIG_TRUSTED_FOUNDATIONS */ 70#endif /* CONFIG_TRUSTED_FOUNDATIONS */