ARM: mach-shmobile: CPUIdle support
Magnus Damm
maintainerPATCH 1/1 ARM: mach-shmobile: CPUIdle support
From: Magnus Damm <[email protected]>
This patch adds a shared SH-Mobile ARM specific CPUIdle implementation supporting WFI only at this point. It serves as a common point for late registration of the arch-specific CPUIdle code, and supports adding extra sleep modes using the callback shmobile_cpuidle_setup() together with shmobile_cpuidle_modes[].
Signed-off-by Magnus Damm <[email protected]>
---
arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/cpuidle.c | 92 ++++++++++++++++++++++++++ arch/arm/mach-shmobile/include/mach/common.h | 3 3 files changed, 96 insertions(+)
arch/arm/mach-shmobile/Makefile +1 -0
@@ -32,6 +32,7 @@ obj-$(CONFIG_ARCH_SH73A0) += entry-gic.o # PM objects obj-$(CONFIG_SUSPEND) += suspend.o +obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o # Board objects
arch/arm/mach-shmobile/cpuidle.c new file +92 -0
92 lines not on this page · raw message
arch/arm/mach-shmobile/include/mach/common.h +3 -0
@@ -9,6 +9,9 @@ extern int clk_init(void);extern void shmobile_handle_irq_intc (struct pt_regs *);extern void shmobile_handle_irq_gic (struct pt_regs *);extern struct platform_suspend_ops shmobile_suspend_ops; +struct cpuidle_device ; +extern void (*shmobile_cpuidle_modes[])(void ); +extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev);extern void sh7367_init_irq (void );extern void sh7367_add_early_devices (void );