aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-04-29 20:38:46 +0200
committerBen Hutchings <ben@decadent.org.uk>2015-08-12 16:33:16 +0200
commit5e436e5b521702071b134842fe7463e29aa0ef83 (patch)
treeacb12b91358f222171d980b5c95ae4962f17ad5d /net
parent0eeb094e5a6c3e5150a1d1366e03d55dd9ffa394 (diff)
downloadkernel_samsung_smdk4412-5e436e5b521702071b134842fe7463e29aa0ef83.zip
kernel_samsung_smdk4412-5e436e5b521702071b134842fe7463e29aa0ef83.tar.gz
kernel_samsung_smdk4412-5e436e5b521702071b134842fe7463e29aa0ef83.tar.bz2
watchdog: omap: assert the counter being stopped before reprogramming
commit 530c11d432727c697629ad5f9d00ee8e2864d453 upstream. The omap watchdog has the annoying behaviour that writes to most registers don't have any effect when the watchdog is already running. Quoting the AM335x reference manual: To modify the timer counter value (the WDT_WCRR register), prescaler ratio (the WDT_WCLR[4:2] PTV bit field), delay configuration value (the WDT_WDLY[31:0] DLY_VALUE bit field), or the load value (the WDT_WLDR[31:0] TIMER_LOAD bit field), the watchdog timer must be disabled by using the start/stop sequence (the WDT_WSPR register). Currently the timer is stopped in the .probe callback but still there are possibilities that yield to a situation where omap_wdt_start is entered with the timer running (e.g. when /dev/watchdog is closed without stopping and then reopened). In such a case programming the timeout silently fails! To circumvent this stop the timer before reprogramming. Assuming one of the first things the watchdog user does is setting the timeout explicitly nothing too bad should happen because this explicit setting works fine. Fixes: 7768a13c252a ("[PATCH] OMAP: Add Watchdog driver support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions