Commit Graph

6 Commits

Author SHA1 Message Date
Guenter Roeck 0397c5db1d watchdog: tangox: Use watchdog core to install restart handler
Use the infrastructure provided by the watchdog core to install
the restart handler.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-02-24 14:00:23 -08:00
Guenter Roeck c7ef68c322 watchdog: tangox: Set max_hw_heartbeat_ms instead of max_timeout
Setting max_hw_heartbeat_ms lets the watchdog core provide a virtual
timeout if the timeout requested by user space is larger than the maximum
hardware timeout. Also, it helps the watchdog core to provide heartbeats
if the hardware watchdog is running while closed.

Fixes: a3e376d26a ("watchdog: tangox: Mark running watchdog correctly")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2016-07-18 12:10:21 +02:00
Guenter Roeck a3e376d26a watchdog: tangox: Mark running watchdog correctly
A running watchdog is marked with WDOG_HW_RUNNING, not with WDOG_ACTIVE.
WDOG_ACTIVE indicates that the watchdog device has been opened from user
space.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2016-07-17 21:00:26 +02:00
Wolfram Sang 84b84bcf4f watchdog: tangox_wdt: test clock rate to avoid division by 0
The clk API may return 0 on clk_get_rate, so we should check the result before
using it as a divisor. For this, refactor the code to use a central
error path.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2016-03-16 21:09:16 +01:00
Guenter Roeck 3d29f80813 watchdog: tangox: Print info message using pointer to platform device
The device pointer in struct watchdog_device should not be used by drivers
and may be removed in the near future. Use the platform device pointer for
info messages instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-28 23:04:04 +01:00
Mans Rullgard dca536c433 watchdog: add support for Sigma Designs SMP86xx/SMP87xx
This adds support for the Sigma Designs SMP86xx/SMP87xx family built-in
watchdog.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2015-12-28 23:03:50 +01:00