diff options
| author | Sudeep Holla <Sudeep.Holla@arm.com> | 2016-07-19 13:52:58 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-07-21 17:29:38 -0400 |
| commit | 5a611ed969b04269512ba4c07466bd5f4eaab8a7 (patch) | |
| tree | ab03b59d7ef952276863848b9a6b761c90b487f7 | |
| parent | c2a25c141f4e80debd8eec3e9a5f9d25daedb54f (diff) | |
arm64: add support for ACPI Low Power Idle(LPI)
This patch adds appropriate callbacks to support ACPI Low Power Idle
(LPI) on ARM64.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | arch/arm64/kernel/cpuidle.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm64/kernel/cpuidle.c b/arch/arm64/kernel/cpuidle.c index 06786fdaadeb..75a0f8acef66 100644 --- a/arch/arm64/kernel/cpuidle.c +++ b/arch/arm64/kernel/cpuidle.c | |||
| @@ -9,6 +9,9 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/acpi.h> | ||
| 13 | #include <linux/cpuidle.h> | ||
| 14 | #include <linux/cpu_pm.h> | ||
| 12 | #include <linux/of.h> | 15 | #include <linux/of.h> |
| 13 | #include <linux/of_device.h> | 16 | #include <linux/of_device.h> |
| 14 | 17 | ||
| @@ -39,3 +42,18 @@ int arm_cpuidle_suspend(int index) | |||
| 39 | 42 | ||
| 40 | return cpu_ops[cpu]->cpu_suspend(index); | 43 | return cpu_ops[cpu]->cpu_suspend(index); |
| 41 | } | 44 | } |
| 45 | |||
| 46 | #ifdef CONFIG_ACPI | ||
| 47 | |||
| 48 | #include <acpi/processor.h> | ||
| 49 | |||
| 50 | int acpi_processor_ffh_lpi_probe(unsigned int cpu) | ||
| 51 | { | ||
| 52 | return arm_cpuidle_init(cpu); | ||
| 53 | } | ||
| 54 | |||
| 55 | int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi) | ||
| 56 | { | ||
| 57 | return CPU_PM_CPU_IDLE_ENTER(arm_cpuidle_suspend, lpi->index); | ||
| 58 | } | ||
| 59 | #endif | ||
