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

Commit be4183c0 authored by Raghavendra Kakarla's avatar Raghavendra Kakarla Committed by Gerrit - the friendly Code Review server
Browse files

drivers: arm: cpuidle: support ARMv7 targets for lpm governor



QCOM's low power mode cpuidle driver support ARM v8 targets primarily.
The initialization of PSCI for ARM v7 targets is done through the
generic ARM cpuidle driver. Since LPM driver replaces the ARM's default
driver for QCOM SoC's including the ARM v7 variants, we now have the
responsibility of initializing the PSCI cpuidle ops.
Also, since QCOM SoCs do not use ARM idle state definitions as suggested
in [1], the initialization of PSCI cpuidle ops would fail. Make the PSCI
cpuidle ops initialization conditional.
[1]. Documentation/devicetree/bindings/arm/idle-states.txt.

Change-Id: I8a372d88b3f2610bfc6036b5420b1886d44fb5f1
Signed-off-by: default avatarRaghavendra Kakarla <rkakarla@codeaurora.org>
parent a20a0ced
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ config ARM
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF
	select ARCH_WANT_IPC_PARSE_VERSION
	select ARM_PSCI_FW if PM
	select BUILDTIME_EXTABLE_SORT if MMU
	select CLONE_BACKWARDS
	select CPU_PM if (SUSPEND || CPU_IDLE)
+6 −1
Original line number Diff line number Diff line
@@ -279,8 +279,9 @@ static int __init psci_features(u32 psci_func_id)
}

#ifdef CONFIG_CPU_IDLE
static DEFINE_PER_CPU_READ_MOSTLY(u32 *, psci_power_state);
static __maybe_unused DEFINE_PER_CPU_READ_MOSTLY(u32 *, psci_power_state);

#ifdef CONFIG_DT_IDLE_STATES
static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
{
	int i, ret, count = 0;
@@ -333,6 +334,10 @@ static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
	kfree(psci_states);
	return ret;
}
#else
static int psci_dt_cpu_init_idle(struct device_node *cpu_node, int cpu)
{ return 0; }
#endif

#ifdef CONFIG_ACPI
#include <acpi/processor.h>