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:07 +0000 (11:05 +0100)
This patch allows the vexpress 'rtsm' 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>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
arch/arm/mach-vexpress/dcscb.c

index 16d57a8a9d5a63824250f71241c1490f8f57e1ea..948aec0890f50716581eeb5544103946471388b9 100644 (file)
@@ -23,6 +23,7 @@
 #include <asm/cacheflush.h>
 #include <asm/cputype.h>
 #include <asm/cp15.h>
+#include <asm/psci.h>
 
 
 #define RST_HOLD0      0x0
@@ -217,6 +218,12 @@ static int __init dcscb_init(void)
        unsigned int cfg;
        int ret;
 
+       ret = psci_probe();
+       if (!ret) {
+               pr_debug("psci found. Aborting native init\n");
+               return -ENODEV;
+       }
+
        if (!cci_probed())
                return -ENODEV;