Skip to content

Commit

Permalink
soc: ti: omap-prm: Do not check rstst bit on deassert if already deas…
Browse files Browse the repository at this point in the history
…serted

[ Upstream commit c1995e5 ]

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: c5117a7 ("soc: ti: omap-prm: poll for reset complete during de-assert")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tmlind authored and gregkh committed Dec 30, 2020
1 parent d5f81cb commit 53cb44e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/soc/ti/omap_prm.c
Expand Up @@ -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);

Expand Down

0 comments on commit 53cb44e

Please sign in to comment.