summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm.c
diff options
context:
space:
mode:
authorTero Kristo2016-06-30 15:15:02 +0200
committerTony Lindgren2016-07-04 16:15:38 +0200
commit1d9a5425654de6bb141c7ca1d5dde120ee8c5430 (patch)
tree84103ff301ecc87ba48339240b5b06ad1e816c4b /arch/arm/mach-omap2/pm.c
parentARM: OMAP2+: timer: change order of hwmod data handling (diff)
downloadkernel-qcow2-linux-1d9a5425654de6bb141c7ca1d5dde120ee8c5430.tar.gz
kernel-qcow2-linux-1d9a5425654de6bb141c7ca1d5dde120ee8c5430.tar.xz
kernel-qcow2-linux-1d9a5425654de6bb141c7ca1d5dde120ee8c5430.zip
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>
Diffstat (limited to 'arch/arm/mach-omap2/pm.c')
-rw-r--r--arch/arm/mach-omap2/pm.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 2f7b11da7d5d..678d2a31dcb8 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -110,13 +110,7 @@ static void __init omap2_init_processor_devices(void)
int __init omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused)
{
- /* XXX The usecount test is racy */
- if ((clkdm->flags & CLKDM_CAN_ENABLE_AUTO) &&
- !(clkdm->flags & CLKDM_MISSING_IDLE_REPORTING))
- clkdm_allow_idle(clkdm);
- else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
- clkdm->usecount == 0)
- clkdm_sleep(clkdm);
+ clkdm_allow_idle(clkdm);
return 0;
}