]> git.baikalelectronics.ru Git - uboot.git/commit
watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start()
authorStefan Roese <sr@denx.de>
Tue, 2 Apr 2019 08:57:19 +0000 (10:57 +0200)
committerEugen Hristev <eugen.hristev@microchip.com>
Tue, 9 Apr 2019 06:28:50 +0000 (09:28 +0300)
commit6eae7695da0e0f4a21c44f097ec1d993bac30497
tree7c1a24906ed3062e5fb370b51cb8092babcaa073
parent85b14f6c93756dd6b7dc0997e4d5a61c55f3641b
watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start()

This patch fixes the timer register setup in at91_wdt_start() to
correctly configure the register again. The input timeout value is
now in milli-seconds instead of seconds with the new watchdog API.
Make sure to take this into account and only use a max timeout
value of 16 seconds as appropriate for this SoC.

Also the check against a lower timeout value than 0 is removed. This
check makes no sense, as the timeout value is unsigned.

Signed-off-by: Stefan Roese <sr@denx.de>
Reported-by: Heiko Schocher <hs@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
drivers/watchdog/at91sam9_wdt.c