From c24a26eb3845f8f86a3db9b1237aecf62f42ff98 Mon Sep 17 00:00:00 2001
From: Chen Liang <cl@rock-chips.com>
Date: Tue, 13 Oct 2015 14:37:23 +0800
Subject: [PATCH] rk312x: add psci support

This is just add psci code into kernel, if you want to enable psci, you must
add psci=enable in the Command Line.

Change-Id: I3a6a24e455a4f684d543938257dc2771c5c267e2
Signed-off-by: Chen Liang <cl@rock-chips.com>
---
 arch/arm/boot/dts/rk312x.dtsi       | 9 +++++++++
 arch/arm/configs/rockchip_defconfig | 1 +
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/rk312x.dtsi b/arch/arm/boot/dts/rk312x.dtsi
index 33938f579375..1324e24a8ccd 100755
--- a/arch/arm/boot/dts/rk312x.dtsi
+++ b/arch/arm/boot/dts/rk312x.dtsi
@@ -51,6 +51,15 @@
 		};
 	};
 
+	psci {
+		compatible      = "arm,psci";
+		method          = "smc";
+		cpu_suspend     = <0x84000001>;
+		cpu_off         = <0x84000002>;
+		cpu_on          = <0x84000003>;
+		migrate         = <0x84000005>;
+	};
+
 	gic: interrupt-controller@10139000 {
 		compatible = "arm,cortex-a15-gic";
 		interrupt-controller;
diff --git a/arch/arm/configs/rockchip_defconfig b/arch/arm/configs/rockchip_defconfig
index 89877e9a7552..096d5d321000 100755
--- a/arch/arm/configs/rockchip_defconfig
+++ b/arch/arm/configs/rockchip_defconfig
@@ -43,6 +43,7 @@ CONFIG_PL310_ERRATA_753970=y
 CONFIG_ARM_ERRATA_754322=y
 CONFIG_SMP=y
 CONFIG_SCHED_MC=y
+CONFIG_ARM_PSCI=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 # CONFIG_OABI_COMPAT is not set
-- 
2.34.1