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

Commit eeb1aa5f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'cpuidle/3.18' of https://git.linaro.org/people/daniel.lezcano/linux into pm-cpuidle

Pull ARM cpuidle changes for v3.18 from Daniel Lezcano:

"this pull request contains the following changes:

 * Lorenzo Pieralisi implemented a framework to initialize the ARM
   cpuidle drivers with the DT. As an example, it provided a couple of
   drivers using it: arm64 and big little. The former one is a new
   driver while the latter is a change. There was also a patch for
   Exynos allowing to use this framework but as it depends on a change
   in Samsung's tree, I postponed this patch until the change is visible
   after the merge. The set of changes depends on some other changes
   made in the ARM64 tree, for this reason a shared branch is used. This
   is why there is a merge from arm64 in my pull request. I believe we
   already used this procedure.

 * Kevin Hilman added the compatible string for the exynos 5800 in the DT"

* 'cpuidle/3.18' of https://git.linaro.org/people/daniel.lezcano/linux:
  drivers: cpuidle: initialize big.LITTLE driver through DT
  drivers: cpuidle: CPU idle ARM64 driver
  drivers: cpuidle: implement DT based idle states infrastructure
  cpuidle: big.LITTLE: add Exynos5800 compatible string
  arm64: add PSCI CPU_SUSPEND based cpu_suspend support
  arm64: kernel: introduce cpu_init_idle CPU operation
  arm64: kernel: refactor the CPU suspend API for retention states
  Documentation: arm: define DT idle states bindings
parents 91336640 d2e5c871
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -219,6 +219,12 @@ nodes to be present and contain the properties described below.
		Value type: <phandle>
		Definition: Specifies the ACC[2] node associated with this CPU.

	- cpu-idle-states
		Usage: Optional
		Value type: <prop-encoded-array>
		Definition:
			# List of phandles to idle state nodes supported
			  by this cpu [3].

Example 1 (dual-cluster big.LITTLE system 32-bit):

@@ -415,3 +421,5 @@ cpus {
--
[1] arm/msm/qcom,saw2.txt
[2] arm/msm/qcom,kpss-acc.txt
[3] ARM Linux kernel documentation - idle states bindings
    Documentation/devicetree/bindings/arm/idle-states.txt
+679 −0

File added.

Preview size limit exceeded, changes collapsed.

+13 −1
Original line number Diff line number Diff line
@@ -50,6 +50,16 @@ Main node optional properties:

 - migrate       : Function ID for MIGRATE operation

Device tree nodes that require usage of PSCI CPU_SUSPEND function (ie idle
state nodes, as per bindings in [1]) must specify the following properties:

- arm,psci-suspend-param
		Usage: Required for state nodes[1] if the corresponding
                       idle-states node entry-method property is set
                       to "psci".
		Value type: <u32>
		Definition: power_state parameter to pass to the PSCI
			    suspend call.

Example:

@@ -64,7 +74,6 @@ Case 1: PSCI v0.1 only.
		migrate		= <0x95c10003>;
	};


Case 2: PSCI v0.2 only

	psci {
@@ -88,3 +97,6 @@ Case 3: PSCI v0.2 and PSCI v0.1.

		...
	};

[1] Kernel documentation - ARM idle states bindings
    Documentation/devicetree/bindings/arm/idle-states.txt
+23 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
			compatible = "arm,cortex-a15";
			reg = <0>;
			cci-control-port = <&cci_control1>;
			cpu-idle-states = <&CLUSTER_SLEEP_BIG>;
		};

		cpu1: cpu@1 {
@@ -45,6 +46,7 @@
			compatible = "arm,cortex-a15";
			reg = <1>;
			cci-control-port = <&cci_control1>;
			cpu-idle-states = <&CLUSTER_SLEEP_BIG>;
		};

		cpu2: cpu@2 {
@@ -52,6 +54,7 @@
			compatible = "arm,cortex-a7";
			reg = <0x100>;
			cci-control-port = <&cci_control2>;
			cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>;
		};

		cpu3: cpu@3 {
@@ -59,6 +62,7 @@
			compatible = "arm,cortex-a7";
			reg = <0x101>;
			cci-control-port = <&cci_control2>;
			cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>;
		};

		cpu4: cpu@4 {
@@ -66,6 +70,25 @@
			compatible = "arm,cortex-a7";
			reg = <0x102>;
			cci-control-port = <&cci_control2>;
			cpu-idle-states = <&CLUSTER_SLEEP_LITTLE>;
		};

		idle-states {
			CLUSTER_SLEEP_BIG: cluster-sleep-big {
				compatible = "arm,idle-state";
				local-timer-stop;
				entry-latency-us = <1000>;
				exit-latency-us = <700>;
				min-residency-us = <2000>;
			};

			CLUSTER_SLEEP_LITTLE: cluster-sleep-little {
				compatible = "arm,idle-state";
				local-timer-stop;
				entry-latency-us = <1000>;
				exit-latency-us = <500>;
				min-residency-us = <2500>;
			};
		};
	};

+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ struct device_node;
 *		enable-method property.
 * @cpu_init:	Reads any data necessary for a specific enable-method from the
 *		devicetree, for a given cpu node and proposed logical id.
 * @cpu_init_idle: Reads any data necessary to initialize CPU idle states from
 *		devicetree, for a given cpu node and proposed logical id.
 * @cpu_prepare: Early one-time preparation step for a cpu. If there is a
 *		mechanism for doing so, tests whether it is possible to boot
 *		the given CPU.
@@ -47,6 +49,7 @@ struct device_node;
struct cpu_operations {
	const char	*name;
	int		(*cpu_init)(struct device_node *, unsigned int);
	int		(*cpu_init_idle)(struct device_node *, unsigned int);
	int		(*cpu_prepare)(unsigned int);
	int		(*cpu_boot)(unsigned int);
	void		(*cpu_postboot)(void);
Loading