Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd8334b2 authored by Srinivas Rao L's avatar Srinivas Rao L
Browse files

cpuidle: lpm-levels: Add API to get low power mode latency



Add API to get latency for a low power mode with particular
affinity level and reset level. Reset level is level at which
only control logic power collpase happen or both control and
memory logic power collapse happen or Retention state.

The API returns the minum latency out of all clusters in the
particular affinity level and reset level if cluster name is
not passed or the latency of the specific cluster for which
the cluster name is passed.

Change-Id: I2facd9a1fa2dba7e7103d65544537799bd8ba518
Signed-off-by: default avatarSrinivas Rao L <lsrao@codeaurora.org>
parent f6a010ea
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -92,6 +92,15 @@ Required properties:
	or not for the drivers to prepare for cluster collapse.
	- qcom,hyp-psci: This property is used to determine if the cpu
        enters the low power mode within hypervisor.
	- qcom,reset-level: This property is used to determine in this
	low power mode only control logic power collapse happens or memory
	logic power collapse aswell happens or retention state.
	The accepted values for this property are:
		"LPM_RESET_LVL_NONE" - No power collapse
		"LPM_RESET_LVL_RET"  - Retention state
		"LPM_RESET_LVL_GDHS" - Only control logic power collapse (GDHS)
		"LPM_RESET_LVL_PC" - Control logic and memory logic
					power collapse (PC)

[Node bindings for qcom,pm-cpu]
qcom,pm-cpu contains the low power modes that a cpu could enter. Currently it
+5 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/msm/pm.h>

&soc {
	qcom,spm@b009000 {
		compatible = "qcom,spm-v2";
@@ -75,6 +77,7 @@
				qcom,time-overhead = <540>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
				qcom,reset-level = <LPM_RESET_LVL_PC>;
			};

			qcom,pm-cpu {
@@ -99,6 +102,7 @@
					qcom,time-overhead = <420>;
					qcom,use-broadcast-timer;
					qcom,is-reset;
					qcom,reset-level = <LPM_RESET_LVL_PC>;
				};

				qcom,pm-cpu-level@2 {
@@ -110,6 +114,7 @@
					qcom,time-overhead = <500>;
					qcom,use-broadcast-timer;
					qcom,is-reset;
					qcom,reset-level = <LPM_RESET_LVL_PC>;
				};
			};
		};
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -10,6 +10,8 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/msm/pm.h>

&soc {
	qcom,spm@b009000 {
		compatible = "qcom,spm-v2";
@@ -68,6 +70,7 @@
				qcom,time-overhead = <7300>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
				qcom,reset-level = <LPM_RESET_LVL_PC>;
			};

			qcom,pm-cpu {
@@ -90,6 +93,7 @@
					qcom,ss-power = <5000>;
					qcom,energy-overhead = <60100000>;
					qcom,time-overhead = <3000>;
					qcom,reset-level = <LPM_RESET_LVL_PC>;
				};

				qcom,pm-cpu-level@2 {
@@ -99,6 +103,7 @@
					qcom,ss-power = <5000>;
					qcom,energy-overhead = <60350000>;
					qcom,time-overhead = <7300>;
					qcom,reset-level = <LPM_RESET_LVL_PC>;
				};
			};
		};
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -10,6 +10,8 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/msm/pm.h>

&soc {
	qcom,spm@b009000 {
		compatible = "qcom,spm-v2";
@@ -79,6 +81,7 @@
				qcom,time-overhead = <7300>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
				qcom,reset-level = <LPM_RESET_LVL_PC>;
			};

			qcom,pm-cpu {
@@ -101,6 +104,7 @@
					qcom,ss-power = <5000>;
					qcom,energy-overhead = <60100000>;
					qcom,time-overhead = <3000>;
					qcom,reset-level = <LPM_RESET_LVL_PC>;
				};

				qcom,pm-cpu-level@2 {
@@ -110,6 +114,7 @@
					qcom,ss-power = <5000>;
					qcom,energy-overhead = <60350000>;
					qcom,time-overhead = <7300>;
					qcom,reset-level = <LPM_RESET_LVL_PC>;
				};
			};
		};
+9 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -10,6 +10,8 @@
 * GNU General Public License for more details.
 */

#include <dt-bindings/msm/pm.h>

&soc {
	qcom,spm@b089000 {
		compatible = "qcom,spm-v2";
@@ -136,6 +138,7 @@
				qcom,energy-overhead = <431578>;
				qcom,time-overhead = <900>;
				qcom,min-child-idx = <1>;
				qcom,reset-level = <LPM_RESET_LVL_GDHS>;
			};

			qcom,pm-cluster-level@2{
@@ -148,6 +151,7 @@
				qcom,time-overhead = <1500>;
				qcom,min-child-idx = <2>;
				qcom,notify-rpm;
				qcom,reset-level = <LPM_RESET_LVL_PC>;
			};


@@ -172,6 +176,8 @@
					qcom,energy-overhead = <202781>;
					qcom,time-overhead = <420>;
					qcom,use-broadcast-timer;
					qcom,reset-level =
						<LPM_RESET_LVL_PC>;
				};

				qcom,pm-cpu-level@2 {
@@ -182,6 +188,8 @@
					qcom,energy-overhead = <250621>;
					qcom,time-overhead = <500>;
					qcom,use-broadcast-timer;
					qcom,reset-level =
						<LPM_RESET_LVL_PC>;
				};
			};
		};
Loading