]> git.baikalelectronics.ru Git - uboot.git/commit
watchdog: rti_wdt: Add 10% safety margin to clock frequency
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 8 Mar 2022 06:25:50 +0000 (07:25 +0100)
committerStefan Roese <sr@denx.de>
Tue, 8 Mar 2022 08:08:09 +0000 (09:08 +0100)
commit4f4db4fa5a98eef5f4d257b302de1f7d153d683e
tree2e8f45d9b573cc1ee197d795c6bfb5255fadbd6c
parentaee82fe7b788722d79493b1360468e9f4fbea3bd
watchdog: rti_wdt: Add 10% safety margin to clock frequency

When running against RC_OSC_32k, the watchdog may suffer from running
faster than expected, expiring earlier. The Linux kernel adds a 10%
margin to the timeout calculation by slowing down the read clock rate
accordingly. Do the same here, also to have comparable preset values
for both drivers.

Along this, fix the name of the local var holding to frequency - in Hz,
not kHz.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/watchdog/rti_wdt.c