ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs
authorTero Kristo <t-kristo@ti.com>
Thu, 30 Jun 2016 13:15:02 +0000 (16:15 +0300)
committerTony Lindgren <tony@atomide.com>
Mon, 4 Jul 2016 14:15:38 +0000 (07:15 -0700)
commit1d9a5425654de6bb141c7ca1d5dde120ee8c5430
tree84103ff301ecc87ba48339240b5b06ad1e816c4b
parente98580e880fb88810a1cd2a1a2583371fc0aa19e
ARM: OMAP2+: clockdomain: add usecounting support to autoidle APIs

The previous implementation was racy in many locations, where the current
status of the clockdomain was read out, some operations were executed,
and the previous status info was used afterwards to decide next state
for the clockdomain. Instead, fix the implementation of the allow_idle /
deny_idle APIs to properly have usecounting support. This allows clean
handling internally within the clockdomain core, and simplifies the
usage also within hwmod.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clockdomain.c
arch/arm/mach-omap2/clockdomain.h
arch/arm/mach-omap2/cpuidle44xx.c
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/powerdomain.c