[PATCH RESEND] watchdog: sbsa_gwdt: clamp WOR value to hw max
Stefan Roese
stefan.roese at mailbox.org
Tue Jun 9 12:53:10 CEST 2026
On 5/4/26 12:34, Juuso Rinta wrote:
> The WOR register is 32 bits, so any tick count exceeding U32_MAX is
> truncated by writel(). A large requested timeout can wrap to a small
> value causing the watchdog to fire sooner than requested.
>
> Clamp the calculated value to U32_MAX prior to writing the register so
> over-large requests will be set to the maximum timeout value.
>
> Found by code review.
>
> Signed-off-by: Juuso Rinta <juuso.rinta at nokia.com>
Applied to u-boot-watchdog/next
Thanks,
Stefan
More information about the U-Boot
mailing list