]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: sama5d4: fix race condition
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 2 Mar 2017 17:31:12 +0000 (18:31 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 18 May 2017 16:51:24 +0000 (18:51 +0200)
commite7dd5955a12151ada0aa5cee7891735527e259d5
tree3841ccf38b20b4e0b3adbb3aa12c801cff69450e
parent6dfeca0baae232323e8bbbc81926eaf386f61129
watchdog: sama5d4: fix race condition

WDT_MR and WDT_CR must not updated within three slow clock periods after
the last ping (write to WDT_CR or WDT_MR). Ensure enough time has elapsed
before writing those registers.
wdt_write() waits for 4 periods to ensure at least 3 edges are seen by the
IP.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Wenyou.Yang <wenyou.yang@microchip.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/sama5d4_wdt.c