imx8 regression: cyclic_register for watchdog at 30280000 failed

Rasmus Villemoes rasmus.villemoes at prevas.dk
Fri Oct 28 14:14:59 CEST 2022


On 26/10/2022 21.06, Tim Harvey wrote:

> 29caf9305b6f cyclic: Use schedule() instead of WATCHDOG_RESET()
> ^^^ build issue resolved, boot issue on imx8mm-venice resolved, but
> this is where we now encounter watchdog failures in both the SPL and
> U-Boot:
> 
> SPL:
> cyclic_register for watchdog at 30280000 failed
> WDT:   Failed to start watchdog at 30280000
> 
> The failure here is 'Cyclic IF not ready yet' (which should probably
> be an error print not a debug print). In this case the watchdog gets
> started but never reset via cyclic. This is due to cyclic_init never
> being called in the SPL - where is that supposed to occur?

Actually, the code both in current master and at 29caf9305b6f does

        if (!gd->cyclic->cyclic_ready) {
                pr_debug("Cyclic IF not ready yet\n");
                return NULL;
        }

and when cyclic_init() hasn't been called, that gd->cyclic is NULL.
Unfortunately, on the imx8m platforms, 0 is a perfectly valid address
(that's where the bootrom code lives), so the fact that this even
triggers is mostly random, AFAICT; there might as well have been a
non-zero byte at that offset from address 0. But then things would
probably have exploded in interesting ways when the new cyclic_info
would be added to the garbage gd->cyclic->cyclic_list (maybe the write
to that memory would just result in a reset or hang).

Anyway, the series I just sent removes this check entirely and should
work in SPL as well without the cyclic_init(), but please do test.

Rasmus



More information about the U-Boot mailing list