linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted
@ 2020-11-10 11:04 Tony Lindgren
  0 siblings, 0 replies; only message in thread
From: Tony Lindgren @ 2020-11-10 11:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Dave Gerlach, Faiz Abbas, Santosh Shilimkar, Suman Anna,
	Tero Kristo, linux-kernel, linux-arm-kernel

If a rstctrl reset bit is already deasserted, we can just bail out early
not wait for rstst to clear. Otherwise we can have deassert fail for
already deasserted resets.

Fixes: c5117a78dd88 ("soc: ti: omap-prm: poll for reset complete during de-assert")
Signed-off-by: Tony Lindgren <tony@atomide.com>
---

I found this with the genpd conversion, probably can wait for the merge
window and be merged together with the other pending omap_prm.c changes
I have posted.

---
 drivers/soc/ti/omap_prm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c
--- a/drivers/soc/ti/omap_prm.c
+++ b/drivers/soc/ti/omap_prm.c
@@ -484,6 +484,10 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev,
 	struct ti_prm_platform_data *pdata = dev_get_platdata(reset->dev);
 	int ret = 0;
 
+	/* Nothing to do if the reset is already deasserted */
+	if (!omap_reset_status(rcdev, id))
+		return 0;
+
 	has_rstst = reset->prm->data->rstst ||
 		(reset->prm->data->flags & OMAP_PRM_HAS_RSTST);
 
-- 
2.29.2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-10 11:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 11:04 [PATCH] soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).