summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorJulien Panis <jpanis@baylibre.com>2023-08-21 17:24:18 +0300
committerTony Lindgren <tony@atomide.com>2023-09-11 06:04:17 +0300
commitd929b2b7464f95ec01e47f560b1e687482ba8929 (patch)
tree181c0a986f948b0512e0e1c131cb2cf96a9fd41b /drivers/bus
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff)
downloadlinux-d929b2b7464f95ec01e47f560b1e687482ba8929.tar.xz
bus: ti-sysc: Use fsleep() instead of usleep_range() in sysc_reset()
The am335x-evm started producing boot errors because of subtle timing changes: Unhandled fault: external abort on non-linefetch (0x1008) at 0xf03c1010 ... sysc_reset from sysc_probe+0xf60/0x1514 sysc_probe from platform_probe+0x5c/0xbc ... The fix consists in using the appropriate sleep function in sysc reset. For flexible sleeping, fsleep is recommended. Here, sysc delay parameter can take any value in [0 - 255] us range. As a result, fsleep() should be used, calling udelay() for a sysc delay lower than 10 us. Signed-off-by: Julien Panis <jpanis@baylibre.com> Fixes: e709ed70d122 ("bus: ti-sysc: Fix missing reset delay handling") Message-ID: <20230821-fix-ti-sysc-reset-v1-1-5a0a5d8fae55@baylibre.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/ti-sysc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index eb4e7bee1e20..cf09b6b88cf7 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -2150,8 +2150,7 @@ static int sysc_reset(struct sysc *ddata)
}
if (ddata->cfg.srst_udelay)
- usleep_range(ddata->cfg.srst_udelay,
- ddata->cfg.srst_udelay * 2);
+ fsleep(ddata->cfg.srst_udelay);
if (ddata->post_reset_quirk)
ddata->post_reset_quirk(ddata);