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

Commit c2eb6b61 authored by Catalin Marinas's avatar Catalin Marinas
Browse files

Merge arm64 CPU suspend branch

* cpuidle:
  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 e3672649 18910ab0
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
+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);
+13 −0
Original line number Diff line number Diff line
#ifndef __ASM_CPUIDLE_H
#define __ASM_CPUIDLE_H

#ifdef CONFIG_CPU_IDLE
extern int cpu_init_idle(unsigned int cpu);
#else
static inline int cpu_init_idle(unsigned int cpu)
{
	return -EOPNOTSUPP;
}
#endif

#endif
Loading