Skip to contentSkip to conversation

watchdog: Convert ep93xx driver to watchdog core

PATCH H Hartley Sweeten 2 participants 2 messages Mar 14, 2012 – Mar 18, 2012 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

Convert the ep93xx_wdt driver to the watchdog framework API.

Also, use the dev_<fmt> functions instead of pr_<fmt> for logging.

Cc Wim Van Sebroeck <[email protected]>
Cc Ryan Mallon <[email protected]>
Cc Mika Westerberg <[email protected]>

---

drivers/watchdog/Kconfig +1 -0
index ee27f57..5ea4685 100644
@@ -217,6 +217,7 @@ config MPCORE_WATCHDOG
 config EP93XX_WATCHDOG
 	tristate "EP93xx Watchdog"
 	depends on ARCH_EP93XX
+	select WATCHDOG_CORE
 	help
 	  Say Y here if to include support for the watchdog timer
 	  embedded in the Cirrus Logic EP93xx family of devices.
drivers/watchdog/ep93xx_wdt.c +54 -149

290 lines not on this page · raw message

Reviewed-by Tested-by
#1 lore raw
Quoted 8 lines · H Hartley Sweeten

Convert the ep93xx_wdt driver to the watchdog framework API.

Also, use the dev_<fmt> functions instead of pr_<fmt> for logging.

Cc Wim Van Sebroeck <[email protected]>
Cc Ryan Mallon <[email protected]>
Cc Mika Westerberg <[email protected]>

While testing this I noticed that you missed to set the initial timeout of the wdt device. Otherwise doing WDIOC_GETTIMEOUT fails.

With that fixed,

drivers/watchdog/ep93xx_wdt.c +1 -0
index 414ce8f..29575f8 100644
@@ -139,6 +139,7 @@ static int __devinit ep93xx_wdt_probe(struct platform_device *pdev)
 
 	val = readl(mmio_base + EP93XX_WATCHDOG);
 	ep93xx_wdt_wdd.bootstatus = (val & 0x01) ? WDIOF_CARDRESET : 0;
+	ep93xx_wdt_wdd.timeout = timeout;
 
 	watchdog_set_nowayout(&ep93xx_wdt_wdd, nowayout);