summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTero Kristo2015-02-26 17:06:00 +0100
committerPaul Walmsley2015-03-02 00:24:04 +0100
commit80d2518dfd19e9750d0c1203851774bb9732268b (patch)
tree0bea3d5cabe2d3b129289de888ab4be3b3133573 /arch/arm/mach-omap2
parentARM: DRA7: hwmod_data: Fix hwmod data for pcie (diff)
downloadkernel-qcow2-linux-80d2518dfd19e9750d0c1203851774bb9732268b.tar.gz
kernel-qcow2-linux-80d2518dfd19e9750d0c1203851774bb9732268b.tar.xz
kernel-qcow2-linux-80d2518dfd19e9750d0c1203851774bb9732268b.zip
ARM: OMAP2+: hwmod: fix deassert hardreset clkdm usecounting
Deasserting hardreset increases the usecount for the hwmod parent clockdomain always, however usecount is only decreased at end in certain error cases. This causes software supervised clockdomains to remain always on, preventing idle. Fixed by always releasing the hwmods clockdomain parent when exiting the function. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Carlos Hernandez <ceh@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2db380420b6f..355b08936871 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1692,16 +1692,15 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
if (ret == -EBUSY)
pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name);
- if (!ret) {
+ if (oh->clkdm) {
/*
* Set the clockdomain to HW_AUTO, assuming that the
* previous state was HW_AUTO.
*/
- if (oh->clkdm && hwsup)
+ if (hwsup)
clkdm_allow_idle(oh->clkdm);
- } else {
- if (oh->clkdm)
- clkdm_hwmod_disable(oh->clkdm, oh);
+
+ clkdm_hwmod_disable(oh->clkdm, oh);
}
return ret;