diff options
author | Tony Lindgren <tony@atomide.com> | 2020-11-22 04:22:00 +0100 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2020-11-22 04:22:00 +0100 |
commit | fd79aebe5f7cc0bdc9656ddf1a52f04da9480cd7 (patch) | |
tree | 08b9338989b738520769653a549d2c3728bd5a7b /drivers/soc | |
parent | soc: ti: knav_qmss: fix reference leak in knav_queue_probe (diff) | |
download | linux-fd79aebe5f7cc0bdc9656ddf1a52f04da9480cd7.tar.xz linux-fd79aebe5f7cc0bdc9656ddf1a52f04da9480cd7.zip |
soc: ti: omap-prm: Do not check rstst bit on deassert if already deasserted
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>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/ti/omap_prm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 980b04c38fd9..4d41dc3cdce1 100644 --- 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); |