android_kernel_samsung_msm8976/drivers
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
..
accessibility
acpi ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-08-03 09:29:46 -07:00
amba
ata libata: force disable trim for SuperSSpeed S238 2015-08-03 09:29:45 -07:00
atm
auxdisplay
base regmap: Fix regmap_bulk_read in BE mode 2015-08-03 09:29:41 -07:00
bcma
block rbd: end I/O the entire obj_request on error 2015-05-13 05:15:41 -07:00
bluetooth Bluetooth: btusb: Fix memory leak in Intel setup routine 2015-08-03 09:29:42 -07:00
bus bus: mvebu: pass the coherency availability information at init time 2015-07-03 19:48:09 -07:00
cdrom
char vTPM: set virtual device before passing to ibmvtpm_reset_crq 2015-08-03 09:29:45 -07:00
clk clk: sunxi: Support factor clocks with N factor starting not from 0 2015-03-18 13:22:34 +01:00
clocksource clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write 2015-01-29 17:40:56 -08:00
connector
cpufreq cpufreq: speedstep-smi: enable interrupts when waiting 2015-03-06 14:40:48 -08:00
cpuidle cpuidle / menu: Return (-1) if there are no suitable states 2015-08-03 09:29:41 -07:00
crypto Revert "crypto: talitos - convert to use be16_add_cpu()" 2015-07-10 10:40:21 -07:00
dca
devfreq
dio
dma dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup 2015-08-03 09:29:46 -07:00
edac sb_edac: Fix erroneous bytes->gigabytes conversion 2015-07-03 19:48:08 -07:00
eisa
extcon extcon: max77693: Fix two NULL pointer exceptions on missing pdata 2014-07-06 18:54:15 -07:00
firewire firewire: cdev: prevent kernel stack leaking into ioctl arguments 2014-11-21 09:22:53 -08:00
firmware efi-pstore: Make efi-pstore return a unique id 2015-02-05 22:35:40 -08:00
gpio gpio: sysfs: fix memory leaks and device hotplug 2015-05-17 09:51:32 -07:00
gpu drm: add a check for x/y in drm_mode_setcrtc 2015-08-03 09:29:45 -07:00
hid HID: fixup the conflicting keyboard mappings quirk 2015-03-18 13:22:35 +01:00
hsi
hv Drivers: hv: vmbus: Don't wait after requesting offers 2015-05-13 05:15:43 -07:00
hwmon hwmon: (mcp3021) Fix broken output scaling 2015-08-03 09:29:46 -07:00
hwspinlock
i2c i2c: at91: fix a race condition when using the DMA controller 2015-08-03 09:29:43 -07:00
ide
idle
iio iio: DAC: ad5624r_spi: fix bit shift of output data value 2015-08-03 09:29:43 -07:00
infiniband iser-target: release stale iser connections 2015-08-03 09:29:46 -07:00
input Input: elantech - fix detection of touchpads where the revision matches a known rate 2015-06-22 16:55:52 -07:00
iommu iommu/vt-d: Fix an off-by-one bug in __domain_mapping() 2015-01-16 06:59:01 -08:00
ipack
irqchip irqchip: gic: Fix core ID calculation when topology is read from DT 2014-07-28 08:00:06 -07:00
isdn
leds
lguest lguest: fix out-by-one error in address checking. 2015-06-05 23:19:54 -07:00
macintosh
mailbox
md md: fix a build warning 2015-08-03 09:29:46 -07:00
media cx24116: fix a buffer overflow when checking userspace params 2015-08-03 09:29:44 -07:00
memory
memstick memstick: mspro_block: add missing curly braces 2015-05-06 21:56:28 +02:00
message mptfusion: enable no_write_same for vmware scsi disks 2014-10-30 09:35:10 -07:00
mfd mfd: tc6393xb: Fail ohci suspend if full state restore is required 2015-01-08 09:58:15 -08:00
misc mei: bus: fix possible boundaries violation 2014-11-21 09:22:55 -08:00
mmc mmc: card: Fixup request missing in mmc_blk_issue_rw_rq 2015-08-03 09:29:46 -07:00
mtd mtd: dc21285: use raw spinlock functions for nw_gpio_lock 2015-08-03 09:29:41 -07:00
net ath9k: fix DMA stop sequence for AR9003+ 2015-08-03 09:29:42 -07:00
nfc NFC: microread: Potential overflows in microread_target_discovered() 2014-10-05 14:54:12 -07:00
ntb
nubus
of of/base: Fix PowerPC address parsing hack 2014-12-06 15:05:47 -08:00
oprofile
parisc
parport drivers: parport: Kconfig: exclude arm64 for PARPORT_PC 2015-05-06 21:56:26 +02:00
pci PCI: Fix infinite loop with ROM image of size 0 2015-03-06 14:40:48 -08:00
pcmcia Disable write buffering on Toshiba ToPIC95 2015-08-03 09:29:41 -07:00
pinctrl pinctrl: mvebu: armada-xp: fix functions of MPP48 2015-08-03 09:29:42 -07:00
platform hp_accel: Add support for HP ZBook 15 2015-01-27 07:52:31 -08:00
pnp
power power_supply: lp8788-charger: Fix leaked power supply on probe fail 2015-05-06 21:56:21 +02:00
pps
ps3
ptp
pwm
rapidio rapidio/tsi721_dma: fix failure to obtain transaction descriptor 2014-08-07 14:30:25 -07:00
regulator regulator: core: fix constraints output buffer 2015-08-03 09:29:41 -07:00
remoteproc
reset
rpmsg
rtc
s390 crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:57 -08:00
sbus bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000 2014-08-14 09:24:16 +08:00
scsi ipr: Increase default adapter init stage change timeout 2015-08-03 09:29:41 -07:00
sfi
sh
sn
spi spi: spidev: fix possible arithmetic overflow for multi-transfer message 2015-05-06 21:56:21 +02:00
ssb
ssbi
staging staging: rtl8712: prevent buffer overrun in recvbuf2recvframe 2015-08-03 09:29:42 -07:00
target iscsi-target: Convert iscsi_thread_set usage to kthread.h 2015-08-03 09:29:46 -07:00
tc
thermal
tty xen/console: Update console event channel on resume 2015-05-17 09:51:32 -07:00
uio
usb USB: usbfs: allow URBs to be reaped after disconnection 2015-08-03 09:29:47 -07:00
uwb
vfio vfio-pci: Fix the check on pci device type in vfio_pci_probe() 2015-01-27 07:52:32 -08:00
vhost vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion 2015-02-05 22:35:40 -08:00
video video: vgacon: Don't build on arm64 2015-05-06 21:56:25 +02:00
virt
virtio virtio_pci: fix virtio spec compliance on restore 2014-11-14 08:47:55 -08:00
vlynq
vme
w1
watchdog watchdog: omap: assert the counter being stopped before reprogramming 2015-08-03 09:29:47 -07:00
xen xen-pciback: limit guest control of command register 2015-03-26 15:00:59 +01:00
zorro
Kconfig
Makefile