Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80d2518d authored by Tero Kristo's avatar Tero Kristo Committed by Paul Walmsley
Browse files

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: default avatarTero Kristo <t-kristo@ti.com>
Tested-by: default avatarCarlos Hernandez <ceh@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 0717103e
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1692,15 +1692,14 @@ 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);
	}