]> git.dujemihanovic.xyz Git - u-boot.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)
commit817e153fe546c2da9df8e8affc94d12036815659
tree2e8f45d9b573cc1ee197d795c6bfb5255fadbd6c
parent65066773a3e4c3f1dfc5eac8400ca7a7268e4fb7
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