Skip to content

Commit

Permalink
bus: ti-sysc: Use fsleep() instead of usleep_range() in sysc_reset()
Browse files Browse the repository at this point in the history
[ Upstream commit d929b2b ]

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: e709ed7 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jpanisbl authored and gregkh committed Oct 6, 2023
1 parent e6389d6 commit 771eb7c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/bus/ti-sysc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2166,8 +2166,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);
Expand Down

0 comments on commit 771eb7c

Please sign in to comment.