ARM: OMAP3xxx: CPUIdle: optimize __omap3_enter_idle()
authorPaul Walmsley <paul@pwsan.com>
Sat, 26 Jan 2013 07:58:13 +0000 (00:58 -0700)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 14 Apr 2014 00:23:56 +0000 (03:23 +0300)
commita438b5a2cec75996da7628a089b15902b9f54bb8
tree6bc5c1fcc8de56568e34fec19f62a36b5a87ee40
parentea8ba7659d16d45f4fa6ec214c6a6c63eb7cb5e1
ARM: OMAP3xxx: CPUIdle: optimize __omap3_enter_idle()

Avoid programming the MPU and CORE powerdomain next-power-state
registers if those powerdomains will never enter low-power states
(e.g., the state that people refer to as "C1").

To avoid making assumptions about CPUIdle states based on their order
in the list, use a flag to mark CPUIdle states that don't enter
powerdomain low-power states.

Avoid a previous-power-state register read on the MPU powerdomain
unless we know that the MPU was supposed to go OFF during the last
state transition.  Previous-power-state register reads can be very
expensive, so it's worth avoiding these when possible.

Since the CORE_L3 clockdomain can't go inactive unless the MPU is active,
there's little point blocking autoidle on the CORE_L3 clockdomain in "C1"
state, since we've programmed the MPU clockdomain to stay active.
Remove the unnecessary code.

[notasas@gmail.com: 3.2 backport]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Conflicts:

arch/arm/mach-omap2/cpuidle34xx.c
arch/arm/mach-omap2/cpuidle34xx.c