diff options
| author | Bastien Curutchet <[email protected]> | 2026-07-08 10:38:10 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-07-15 13:53:46 -0600 |
| commit | d23b9d4f6ac76223d1354c7241790fb1b6d21fa5 (patch) | |
| tree | 317a8d98a2d975e4286d4865fb660212897f2f1c /scripts/cleanpatch | |
| parent | 8dbe57ba648648c4897717cebbc4505a8e0a8c23 (diff) | |
clk: ti: Use CPU ticks to count timeout
readl_relaxed_poll_timeout() relies on timers. On the beaglebone black,
the timer used by readl_relaxed_poll_timeout() depends on this clock
driver. So we have a sort of circular dependency [enable_clock ->
timer_init -> enable_clock -> timer_init]. It leads to a
division-per-zero during the second timer_init() and the beaglebone
fails to boot with following message:
| CPU : AM335X-GP rev 2.1
| Model: TI AM335x BeagleBone Black
| DRAM: 512 MiB
| ### ERROR ### Please RESET the board ###
Replace readl_relaxed_poll_timeout() with a simple loop that uses CPU
ticks to countdown the timeout. This loop and the value of LDELAY are
inspired from what's done in arch/arm/mach-omap2/am33xx/clock.c
Also, arch/arm/mach-omap2/am33xx/clock.c doesn't return an error on
timeout, it only logs it, so let's stick with it.
Fixes: de2e3f00f2fa ("clk: ti: Remove AM33xx dependency")
Signed-off-by: Bastien Curutchet <[email protected]>
Reported-by: Tom Rini <[email protected]>
Tested-by: Tom Rini <[email protected]>
Diffstat (limited to 'scripts/cleanpatch')
0 files changed, 0 insertions, 0 deletions
