]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: dw_wdt: initialise TOP_INIT in dw_wdt_set_top()
authorJisheng Zhang <jszhang@marvell.com>
Tue, 23 Sep 2014 07:42:11 +0000 (15:42 +0800)
committerWim Van Sebroeck <wim@iguana.be>
Mon, 20 Oct 2014 18:50:28 +0000 (20:50 +0200)
commite4cc4b879cfeee552e1d9ba9f5cdf7e0067e8c70
treee968ed1a94cc71d8e97abe72914a2b4112ba0983
parentfa0c3f4d871ae6b2f8139cd1d1db704ed441735b
watchdog: dw_wdt: initialise TOP_INIT in dw_wdt_set_top()

The TOP_INIT, ie bit 4-7 of the WDOG_TIMEOUT_RANGE_REG_OFFSET register
may be zero, so the timeout period may be very short after initialization
is done, thus the system may be reset soon after enabling. We fix this
problem by also initialising the TOP_INIT when setting TOP in function
dw_wdt_set_top().

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/dw_wdt.c