ARM: vexpress: allow native pm ops backends to probe for psci suppport
authorAchin Gupta <achin.gupta@arm.com>
Mon, 17 Dec 2012 00:15:00 +0000 (00:15 +0000)
committerJon Medhurst <tixy@linaro.org>
Mon, 1 Jul 2013 10:05:15 +0000 (11:05 +0100)
This patch allows the vexpress 'tc2' native backend to probe
the dt for presence of the psci backend. If present then the native
implementation of the 'bL_platform_power_ops' is not used.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
arch/arm/mach-vexpress/tc2_pm.c

index fddea7c3a2a06df3b8631a253a555d5d0902a05f..9c742edb7ae67c8183a03e9ee945a56a0851780e 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/cacheflush.h>
 #include <asm/cputype.h>
 #include <asm/cp15.h>
+#include <asm/psci.h>
 
 #include <mach/motherboard.h>
 #include <mach/tc2.h>
@@ -248,6 +249,12 @@ static int __init tc2_pm_init(void)
 {
        int ret;
 
+       ret = psci_probe();
+       if (!ret) {
+               pr_debug("psci found. Aborting native init\n");
+               return -ENODEV;
+       }
+
        if (!vexpress_spc_check_loaded())
                return -ENODEV;