From 6734841f95904e53774c1b289994b1b1a623dcdd Mon Sep 17 00:00:00 2001 From: "zhiqiang.liang" Date: Wed, 12 Sep 2018 17:09:42 +0800 Subject: [PATCH] dts: add the suspend which match ATF1.0 PD#173525: can't enter the suspend state Change-Id: I10a21687e7fb9fb7f71de339c0b03175ee9a90ad Signed-off-by: zhiqiang.liang --- arch/arm64/boot/dts/amlogic/mesongxl.dtsi | 16 +--------------- arch/arm64/boot/dts/amlogic/mesontxl.dtsi | 2 +- include/uapi/linux/psci.h | 5 +++++ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/mesongxl.dtsi b/arch/arm64/boot/dts/amlogic/mesongxl.dtsi index 5cd5dad..e06f4c8 100644 --- a/arch/arm64/boot/dts/amlogic/mesongxl.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesongxl.dtsi @@ -55,7 +55,6 @@ clocks = <&scpi_dvfs 0>; clock-names = "cpu-cluster.0"; cpu-idle-states = <&SYSTEM_SLEEP_0>; - /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/ }; CPU1:cpu@1 { @@ -66,7 +65,6 @@ clocks = <&scpi_dvfs 0>; clock-names = "cpu-cluster.0"; cpu-idle-states = <&SYSTEM_SLEEP_0>; - /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/ }; CPU2:cpu@2 { device_type = "cpu"; @@ -76,7 +74,6 @@ clocks = <&scpi_dvfs 0>; clock-names = "cpu-cluster.0"; cpu-idle-states = <&SYSTEM_SLEEP_0>; - /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/ }; CPU3:cpu@3 { @@ -87,25 +84,14 @@ clocks = <&scpi_dvfs 0>; clock-names = "cpu-cluster.0"; cpu-idle-states = <&SYSTEM_SLEEP_0>; - /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/ }; idle-states { entry-method = "arm,psci"; -/* - CPU_SLEEP_0: cpu-sleep-0 { - compatible = "arm,idle-state"; - arm,psci-suspend-param = <0x0010000>; - local-timer-stop; - entry-latency-us = <3000>; - exit-latency-us = <3000>; - min-residency-us = <8000>; - }; -*/ SYSTEM_SLEEP_0: system-sleep-0 { compatible = "arm,idle-state"; - arm,psci-suspend-param = <0x0010000>; + arm,psci-suspend-param = <0x0020000>; local-timer-stop; entry-latency-us = <0x3fffffff>; exit-latency-us = <0x40000000>; diff --git a/arch/arm64/boot/dts/amlogic/mesontxl.dtsi b/arch/arm64/boot/dts/amlogic/mesontxl.dtsi index 547e774..ba294f2 100644 --- a/arch/arm64/boot/dts/amlogic/mesontxl.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesontxl.dtsi @@ -108,7 +108,7 @@ SYSTEM_SLEEP_0: system-sleep-0 { compatible = "arm,idle-state"; - arm,psci-suspend-param = <0x0010000>; + arm,psci-suspend-param = <0x0020000>; local-timer-stop; entry-latency-us = <0x3fffffff>; exit-latency-us = <0x40000000>; diff --git a/include/uapi/linux/psci.h b/include/uapi/linux/psci.h index 39930ca..8709dcf 100644 --- a/include/uapi/linux/psci.h +++ b/include/uapi/linux/psci.h @@ -55,8 +55,13 @@ #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff #define PSCI_0_2_POWER_STATE_ID_SHIFT 0 #define PSCI_0_2_POWER_STATE_TYPE_SHIFT 16 +#ifdef CONFIG_AMLOGIC_MODIFY +#define PSCI_0_2_POWER_STATE_TYPE_MASK \ + (0x3 << PSCI_0_2_POWER_STATE_TYPE_SHIFT) +#else #define PSCI_0_2_POWER_STATE_TYPE_MASK \ (0x1 << PSCI_0_2_POWER_STATE_TYPE_SHIFT) +#endif #define PSCI_0_2_POWER_STATE_AFFL_SHIFT 24 #define PSCI_0_2_POWER_STATE_AFFL_MASK \ (0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) -- 2.7.4