android_kernel_samsung_msm8976/drivers/watchdog
Uwe Kleine-König 6afa955908 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: 7768a13c25 ("[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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 09:29:47 -07:00
..
acquirewdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
advantechwdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
alim1535_wdt.c
alim7101_wdt.c
ar7_wdt.c watchdog: Convert to devm_ioremap_resource() 2013-01-25 12:21:48 -08:00
at32ap700x_wdt.c watchdog: convert drivers/watchdog/* to use module_platform_driver_probe 2013-01-17 17:39:33 -08:00
at91rm9200_wdt.c watchdog: at91rm9200: add DT support 2013-03-01 12:55:27 +01:00
at91sam9_wdt.c watchdog: add timeout-sec property binding 2013-03-01 12:53:45 +01:00
at91sam9_wdt.h
ath79_wdt.c watchdog: ath79_wdt: avoid spurious restarts on AR934x 2014-07-06 18:54:14 -07:00
bcm47xx_wdt.c watchdog: bcm47xx_wdt.c: add hard timer 2013-03-01 12:47:31 +01:00
bcm63xx_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
bfin_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
booke_wdt.c watchdog: Convert BookE watchdog driver to watchdog infrastructure 2013-03-01 12:46:28 +01:00
coh901327_wdt.c watchdog: convert drivers/watchdog/* to use module_platform_driver_probe 2013-01-17 17:39:33 -08:00
cpu5wdt.c watchdog: cpu5wdt.c: add missing del_timer call 2012-12-19 22:24:41 +01:00
cpwd.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
da9052_wdt.c watchdog: da9052: Fix invalid free of devm_ allocated data 2012-12-19 22:25:07 +01:00
da9055_wdt.c watchdog: da9055: Don't update wdt_dev->timeout in da9055_wdt_set_timeout error path 2013-01-02 12:06:49 +01:00
davinci_wdt.c drivers/watchdog: don't check resource with devm_ioremap_resource 2013-05-18 11:58:04 +02:00
dw_wdt.c watchdog: Convert to devm_ioremap_resource() 2013-01-25 12:21:48 -08:00
ep93xx_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
eurotechwdt.c
f71808e_wdt.c watchdog: f71808e_wdt: Add support for Jetway JNF99 motherboard 2012-07-23 12:46:38 +02:00
gef_wdt.c watchdog: gef_wdt.c: add missing remove callback 2013-03-01 12:18:33 +01:00
geodewdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
hpwdt.c watchdog: hpwdt.c: Increase version string 2012-12-19 22:24:40 +01:00
i6300esb.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
ib700wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
ibmasr.c
ie6xx_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
imx2_wdt.c drivers/watchdog: don't check resource with devm_ioremap_resource 2013-05-18 11:58:04 +02:00
indydog.c
intel_scu_watchdog.c
intel_scu_watchdog.h
iop_wdt.c
it87_wdt.c watchdog: it87_wdt: Add support for IT8728F watchdog. 2012-05-23 16:24:43 +02:00
it8712f_wdt.c
iTCO_vendor.h
iTCO_vendor_support.c
iTCO_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
ixp4xx_wdt.c
jz4740_wdt.c watchdog: Convert to devm_ioremap_resource() 2013-01-25 12:21:48 -08:00
Kconfig watchdog: Revert the AT91RM9200_WATCHDOG dependency 2013-04-14 09:09:10 +02:00
ks8695_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
lantiq_wdt.c watchdog: Convert to devm_ioremap_resource() 2013-01-25 12:21:48 -08:00
m54xx_wdt.c m68knommu: clean up ColdFire 54xx General Timer definitions 2012-09-27 23:34:03 +10:00
machzwd.c
Makefile watchdog: remove old STMP3xxx driver 2013-03-01 12:44:40 +01:00
max63xx_wdt.c watchdog: Convert to devm_ioremap_resource() 2013-01-25 12:21:48 -08:00
mixcomwd.c watchdog: remove use of __devinitdata 2012-11-28 12:00:24 -08:00
mpc8xxx_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
mpcore_wdt.c watchdog: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-12-19 22:25:06 +01:00
mtx-1_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
mv64x60_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
nuc900_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
nv_tco.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
nv_tco.h
octeon-wdt-main.c
octeon-wdt-nmi.S
of_xilinx_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
omap_wdt.c watchdog: omap: assert the counter being stopped before reprogramming 2015-08-03 09:29:47 -07:00
omap_wdt.h
orion_wdt.c watchdog: add timeout-sec property binding 2013-03-01 12:53:45 +01:00
pc87413_wdt.c
pcwd.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
pcwd_pci.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
pcwd_usb.c
pika_wdt.c
pnx833x_wdt.c
pnx4008_wdt.c watchdog: add timeout-sec property binding 2013-03-01 12:53:45 +01:00
rc32434_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
rdc321x_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
retu_wdt.c watchdog: introduce retu_wdt driver 2013-03-01 12:31:14 +01:00
riowd.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
s3c2410_wdt.c watchdog: Convert to devm_ioremap_resource() 2013-05-09 08:12:00 +02:00
sa1100_wdt.c ARM: sa11x0/pxa: convert OS timer registers to IOMEM 2012-07-09 17:37:35 +01:00
sb_wdog.c
sbc60xxwdt.c
sbc7240_wdt.c
sbc8360.c
sbc_epx_c3.c
sbc_fitpc2_wdt.c
sc520_wdt.c
sc1200wdt.c sc1200_wdt: Fix oops 2013-12-20 07:45:11 -08:00
sch311x_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
scx200_wdt.c
shwdt.c watchdog: Convert to devm_ioremap_resource() 2013-05-09 08:12:00 +02:00
smsc37b787_wdt.c
softdog.c
sp805_wdt.c watchdog: sp805: Set watchdog_device->timeout from ->set_timeout() 2014-07-06 18:54:14 -07:00
sp5100_tco.c watchdog: sp5100_tco: Remove code that may cause a boot failure 2013-03-22 23:21:47 +01:00
sp5100_tco.h watchdog: sp5100_tco: Set the AcpiMmioSel bitmask value to 1 instead of 2 2013-03-22 23:21:55 +01:00
stmp3xxx_rtc_wdt.c watchdog: add new driver for STMP3xxx and i.MX23/28 2013-03-01 12:44:34 +01:00
ts72xx_wdt.c watchdog: ts72xx_wdt: locking bug in ioctl 2013-10-18 07:45:45 -07:00
twl4030_wdt.c watchdog: twl4030_wdt: add DT support 2013-01-02 12:07:05 +01:00
txx9wdt.c watchdog: Convert to devm_ioremap_resource() 2013-01-25 12:21:48 -08:00
ux500_wdt.c watchdog: Add support for ux500_wdt watchdog 2013-02-14 00:22:53 +01:00
via_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
w83627hf_wdt.c
w83697hf_wdt.c
w83697ug_wdt.c
w83877f_wdt.c
w83977f_wdt.c
wafer5823wdt.c
watchdog_core.c watchdog: core: dt: add support for the timeout-sec dt property 2013-03-01 12:48:36 +01:00
watchdog_core.h watchdog: Add multiple device support 2012-05-30 07:54:25 +02:00
watchdog_dev.c watchdog: Fix race condition in registration code 2013-05-09 08:13:41 +02:00
wd501p.h
wdrtas.c
wdt.c
wdt285.c
wdt977.c
wdt_pci.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
wm831x_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
wm8350_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00
xen_wdt.c watchdog: remove use of __devexit 2012-11-28 12:00:24 -08:00