[PATCH] watchdog: mpc8xxx: Fix timer value

Tom Rini trini at konsulko.com
Sat Jul 6 00:40:22 CEST 2024


On Thu, Jun 27, 2024 at 10:26:08AM +0200, Christophe Leroy wrote:

> Timer value is a 16 bits calculated from the wanted timeout and the
> system clock. On powerpc/8xx, a timeout of 2s gives a value which
> is over U16_MAX so U16_MAX shall be used. But the calculation is
> casted to u16 so at the end the result is 63770 instead of 128906.
> 
> So the timer gets loaded with 63770 instead of 65535. It is not
> a big difference in that case, but lets make the code correct and
> cast to u32 instead of u16.
> 
> Fixes: 26e8ebcd7cb7 ("watchdog: mpc8xxx: Make it generic")
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240705/319d1ba5/attachment.sig>


More information about the U-Boot mailing list