forked from luck/tmp_suning_uos_patched
3299b63de3
This patch implements a generic CPU idle driver for ARM64 machines. It relies on the DT idle states infrastructure to initialize idle states count and respective parameters. Current code assumes the driver is managing idle states on all possible CPUs but can be easily generalized to support heterogenous systems and build cpumasks at runtime using MIDRs or DT cpu nodes compatible properties. The driver relies on the arm64 CPU operations to call the idle initialization hook used to parse and save suspend back-end specific idle states information upon probing. Idle state index 0 is always initialized as a simple wfi state, ie always considered present and functional on all ARM64 platforms. Idle state indices higher than 0 trigger idle state entry by calling the cpu_suspend function, that triggers the suspend operation through the CPU operations suspend back-end hook. cpu_suspend passes the idle state index as a parameter so that the CPU operations suspend back-end can retrieve the required idle state data by using the idle state index to execute a look-up on its internal data structures. Reviewed-by: Ashwin Chaugule <ashwin.chaugule@linaro.org> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
15 lines
431 B
Plaintext
15 lines
431 B
Plaintext
#
|
|
# ARM64 CPU Idle drivers
|
|
#
|
|
|
|
config ARM64_CPUIDLE
|
|
bool "Generic ARM64 CPU idle Driver"
|
|
select ARM64_CPU_SUSPEND
|
|
select DT_IDLE_STATES
|
|
help
|
|
Select this to enable generic cpuidle driver for ARM64.
|
|
It provides a generic idle driver whose idle states are configured
|
|
at run-time through DT nodes. The CPUidle suspend backend is
|
|
initialized by calling the CPU operations init idle hook
|
|
provided by architecture code.
|