ARM: tegra: Disable cpuidle if PSCI is available
authorThierry Reding <treding@nvidia.com>
Mon, 23 Feb 2015 14:24:11 +0000 (15:24 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Aug 2015 14:51:28 +0000 (16:51 +0200)
This is only relevant on Tegra114 and Tegra124, because earlier Tegra
generations used Cortex-A9 without secure extensions.

Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/mach-tegra/cpuidle-tegra114.c

index 155807fa6fdd0f5a3078064391ac5bb310ba3f53..bc00dd4a6fb22b8c38a2f688e1c479aece966e1d 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/cpuidle.h>
 #include <asm/smp_plat.h>
 #include <asm/suspend.h>
+#include <asm/psci.h>
 
 #include "pm.h"
 #include "sleep.h"
@@ -84,5 +85,8 @@ static struct cpuidle_driver tegra_idle_driver = {
 
 int __init tegra114_cpuidle_init(void)
 {
-       return cpuidle_register(&tegra_idle_driver, NULL);
+       if (!psci_smp_available())
+               return cpuidle_register(&tegra_idle_driver, NULL);
+
+       return 0;
 }