drivers: firmware: psci: Decouple checker from generic ARM CPUidle
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 9 Aug 2019 11:03:09 +0000 (12:03 +0100)
committerWill Deacon <will@kernel.org>
Fri, 9 Aug 2019 16:51:39 +0000 (17:51 +0100)
commite76d8b7027d9451cfdcb8cd605148ff5e0a1bf5d
treea57e44f9ff8244cb07546a0e2e53db54d42ab40f
parent6460d7ba488419dd5bc2cbfd989d5d7930ac1f9f
drivers: firmware: psci: Decouple checker from generic ARM CPUidle

The PSCI checker currently relies on the generic ARM CPUidle
infrastructure to enter an idle state, which in turn creates
a dependency that is not really needed.

The PSCI checker code to test PSCI CPU suspend is built on
top of the CPUidle framework and can easily reuse the
struct cpuidle_state.enter() function (previously initialized
by an idle driver, with a PSCI back-end) to trigger an entry
into an idle state, decoupling the PSCI checker from the
generic ARM CPUidle infrastructure and simplyfing the code
in the process.

Convert the PSCI checker suspend entry function to use
the struct cpuidle_state.enter() function callback.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/firmware/psci/psci_checker.c