watchdog: orion: kicked watchdog when running from boot.
Also printed the time remaining before the kick to keep an eye on the margin.
Change-Id: Iab4191836cc8cb2a8722c4c97443d66047c4be1a
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 2d9fb96..14bc1d3 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -237,6 +237,8 @@
{
struct orion_wdt_platform_data *pdata = pdev->dev.platform_data;
int ret;
+ u32 reg;
+ int time;
if (pdata) {
wdt_tclk = pdata->tclk;
@@ -259,6 +261,15 @@
printk(KERN_INFO "Orion Watchdog Timer: Initial timeout %d sec%s\n",
heartbeat, nowayout ? ", nowayout" : "");
+
+ reg = readl(TIMER_CTRL);
+ if (reg & WDT_EN) {
+ orion_wdt_get_timeleft(&time);
+ orion_wdt_ping();
+ pr_info("Orion Watchdog Timer: running at boot (%d sec left)"
+ ", resetting", time);
+ }
+
return 0;
}