Re: [PATCH] watchdog: mpc8xxx: Fix timer value

2024-07-05 Thread Tom Rini
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 e

[PATCH] watchdog: mpc8xxx: Fix timer value

2024-06-27 Thread Christophe Leroy
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 63