U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Bastien Curutchet <bastien.curutchet@bootlin.com>
Cc: u-boot@lists.denx.de,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Lukasz Majewski <lukma@denx.de>
Subject: Re: [PATCH] clk: ti: Use CPU ticks to count timeout
Date: Fri, 10 Jul 2026 15:25:11 -0600	[thread overview]
Message-ID: <20260710212511.GP749385@bill-the-cat> (raw)
In-Reply-To: <20260708-fix-beagle-v1-1-c9b5393e6d23@bootlin.com>

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

On Wed, Jul 08, 2026 at 10:38:10AM +0200, Bastien Curutchet wrote:

> 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 <bastien.curutchet@bootlin.com>

Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com>

Thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-07-10 21:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  8:38 [PATCH] clk: ti: Use CPU ticks to count timeout Bastien Curutchet
2026-07-10 21:25 ` Tom Rini [this message]
2026-07-16  1:08 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260710212511.GP749385@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=lukma@denx.de \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox