summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-12-12 19:20:10 +0300
committerTony Lindgren <tony@atomide.com>2019-12-12 19:20:10 +0300
commite709ed70d122e94cb426b1e1f905829eae19a009 (patch)
tree138f75ce2df55db4c2d48642c7504158253fd6f0 /drivers/bus
parentc6b16761c6908d3dc167a0a566578b4b0b972905 (diff)
downloadlinux-e709ed70d122e94cb426b1e1f905829eae19a009.tar.xz
bus: ti-sysc: Fix missing reset delay handling
We have dts property for "ti,sysc-delay-us", and we're using it, but the wait after OCP softreset only happens if devices are probed in legacy mode. Let's add a delay after writing the OCP softreset when specified. Fixes: e0db94fe87da ("bus: ti-sysc: Make OCP reset work for sysstatus and sysconfig reset bits") Cc: Keerthy <j-keerthy@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/ti-sysc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 563707779e18..f4d1597df0a2 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1584,6 +1584,10 @@ static int sysc_reset(struct sysc *ddata)
sysc_val |= sysc_mask;
sysc_write(ddata, sysc_offset, sysc_val);
+ if (ddata->cfg.srst_udelay)
+ usleep_range(ddata->cfg.srst_udelay,
+ ddata->cfg.srst_udelay * 2);
+
if (ddata->clk_enable_quirk)
ddata->clk_enable_quirk(ddata);