]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: shmobile: Make sh7372 cpuidle handling more straightforward
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 15 Aug 2012 18:58:19 +0000 (20:58 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 17 Aug 2012 17:40:10 +0000 (19:40 +0200)
commit8fad8df018e33f9053d61c27f46a6d454b4ace86
tree31564f6eb82f38c6b76798498de53b4e15df9fb9
parentbb76242e6732d1d7847a84fe6f1481c528b8ef28
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>
arch/arm/mach-shmobile/cpuidle.c
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/pm-sh7372.c