linux/drivers/watchdog
Ivan Khoronzhuk f48f3ceabf watchdog: davinci: change driver to use WDT core
To reduce code duplicate and increase code readability use WDT core
code to handle WDT interface.

Remove io_lock as the WDT core uses mutex to lock each wdt device.
Remove wdt_state as the WDT core tracks state with its own variable.

The watchdog_init_timeout() can read timeout value from timeout-sec
property if the passed value is out of bounds. The heartbeat is
initialized in next way. If heartbeat is not set thought module
parameter, try to read it's value from WDT node timeout-sec property.
If node has no one, use default value.

The heartbeat is hold in wdd->timeout by WDT core, so use it in
order to set timeout period.

Davinci WDT can't be stopped and once it's expired - it can be
rearmed only after hardware reset, that's why nowayout feature
is enforced.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2014-01-28 21:19:52 +01:00
..
acquirewdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
advantechwdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
alim1535_wdt.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
alim7101_wdt.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
ar7_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
at32ap700x_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
at91rm9200_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
at91sam9_wdt.c
at91sam9_wdt.h
ath79_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
bcm47xx_wdt.c
bcm63xx_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
bcm2835_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
bcm_kona_wdt.c watchdog: bcm281xx: Debugfs support 2014-01-28 21:17:53 +01:00
bfin_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
booke_wdt.c
coh901327_wdt.c
cpu5wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
cpwd.c
da9052_wdt.c
da9055_wdt.c
davinci_wdt.c watchdog: davinci: change driver to use WDT core 2014-01-28 21:19:52 +01:00
dw_wdt.c watchdog: dw: Enable OF support for DW watchdog timer 2013-11-17 19:38:26 +01:00
ep93xx_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
eurotechwdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
f71808e_wdt.c
gef_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
geodewdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
hpwdt.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
i6300esb.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
ib700wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
ibmasr.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
ie6xx_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
imx2_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
indydog.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
intel_scu_watchdog.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
intel_scu_watchdog.h
iop_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
it87_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
it8712f_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
iTCO_vendor.h
iTCO_vendor_support.c
iTCO_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
ixp4xx_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
jz4740_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
Kconfig watchdog: davinci: change driver to use WDT core 2014-01-28 21:19:52 +01:00
kempld_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
ks8695_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
lantiq_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
m54xx_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
machzwd.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
Makefile watchdog: bcm281xx: Watchdog Driver 2014-01-28 21:13:50 +01:00
max63xx_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
mena21_wdt.c
mixcomwd.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
moxart_wdt.c watchdog: Add MOXA ART watchdog driver 2013-11-17 19:34:49 +01:00
mpc8xxx_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
mtx-1_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
mv64x60_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
nuc900_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
nv_tco.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
nv_tco.h
octeon-wdt-main.c
octeon-wdt-nmi.S
of_xilinx_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
omap_wdt.c watchdog: omap_wdt: raw read and write endian fix 2013-11-17 19:42:38 +01:00
omap_wdt.h
orion_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
pc87413_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
pcwd.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
pcwd_pci.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
pcwd_usb.c Watchdog: pcwd_usb: remove CONFIG_USB_DEBUG usage 2014-01-07 16:15:39 -08:00
pika_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
pnx833x_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
pnx4008_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
rc32434_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
rdc321x_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
retu_wdt.c
riowd.c
rt2880_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
s3c2410_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sa1100_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sb_wdog.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sbc60xxwdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sbc7240_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sbc8360.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sbc_epx_c3.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sbc_fitpc2_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sc520_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
sc1200wdt.c sc1200_wdt: Fix oops 2013-12-10 08:48:15 +01:00
sch311x_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
scx200_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
shwdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
sirfsoc_wdt.c watchdog: sirf: don't depend on dummy value of CLOCK_TICK_RATE 2013-11-17 19:42:31 +01:00
smsc37b787_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
softdog.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
sp805_wdt.c watchdog: sp805_wdt: Remove unnecessary amba_set_drvdata() 2013-11-17 19:37:31 +01:00
sp5100_tco.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
sp5100_tco.h
stmp3xxx_rtc_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
sunxi_wdt.c watchdog: Remove redundant of_match_ptr 2013-11-17 19:37:11 +01:00
ts72xx_wdt.c watchdog: ts72xx_wdt: Propagate return value from timeout_to_regval 2013-11-17 19:38:02 +01:00
twl4030_wdt.c
txx9wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
ux500_wdt.c watchdog: Drop unnecessary include of miscdevice.h 2013-12-10 08:48:09 +01:00
via_wdt.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
w83627hf_wdt.c watchdog: w83627hf: Use helper functions to access superio registers 2013-11-18 21:34:19 +01:00
w83697hf_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
w83697ug_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
w83877f_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
w83977f_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
wafer5823wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
watchdog_core.c watchdog: core: Make dt "timeout-sec" property work on drivers w/out min/max 2014-01-28 19:07:56 +01:00
watchdog_core.h
watchdog_dev.c
wd501p.h
wdrtas.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
wdt285.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
wdt977.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00
wdt_pci.c watchdog: remove DEFINE_PCI_DEVICE_TABLE macro 2014-01-28 19:07:07 +01:00
wm831x_wdt.c watchdog: use dev_get_platdata() 2013-11-17 19:34:20 +01:00
wm8350_wdt.c
xen_wdt.c watchdog: Get rid of MODULE_ALIAS_MISCDEV statements 2013-11-17 19:38:13 +01:00