summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-15 18:58:19 (GMT)
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-03 23:45:01 (GMT)
commit5b41147ceae44350f43f9b8124687d22bed2bbb9 (patch)
tree5eb101652ed2aa3c950b90a0d712211696d152c7 /arch/arm/mach-shmobile/include
parent35f2b0bd5911dc0eef3f5352b6acb79c69420111 (diff)
downloadlinux-fsl-qoriq-5b41147ceae44350f43f9b8124687d22bed2bbb9.tar.xz
ARM: shmobile: Make sh7372 cpuidle handling more straightforward
The sh7372 cpuidle code uses the same artificially designed routine shmobile_cpuidle_enter() as the .enter() callback for all of its cpuidle states. However, shmobile_cpuidle_enter() calls a different "enter" function for each state using an array of function pointers populated by the sh7372 PM initialization code. Moreover, the states[] array of the shmobile cpuidle driver is populated by that code as well, although in principle it just might have been filled with static data. All of that complexity goes away if the sh7372 cpuidle code is allowed to define its own cpuidle driver structure that can be passed for registration to the common shmobile cpuidle initialization routine, so modify the code accordingly. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'arch/arm/mach-shmobile/include')
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 9175c18..eb89293 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -14,8 +14,10 @@ extern int shmobile_clk_init(void);
extern void shmobile_handle_irq_intc(struct pt_regs *);
extern struct platform_suspend_ops shmobile_suspend_ops;
struct cpuidle_driver;
-extern void (*shmobile_cpuidle_modes[])(void);
-extern void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv);
+struct cpuidle_device;
+extern int shmobile_enter_wfi(struct cpuidle_device *dev,
+ struct cpuidle_driver *drv, int index);
+extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
extern void sh7367_init_irq(void);
extern void sh7367_map_io(void);