[PATCH linux 3/3] watchdog/aspeed_wdt: Set system reset mode to 'full chip'

OpenBMC Patches patches at stwcx.xyz
Fri Oct 23 04:59:39 AEDT 2015


From: Jeremy Kerr <jk at ozlabs.org>

Currently, the watchdog timer does nothing on expiry - the 'SoC system'
reset type doesn't seem to have any effect.

This change uses the 'full chip' reset type instead.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
 drivers/watchdog/aspeed_wdt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index 57503be..9b82420 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -37,6 +37,7 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table);
 #define WDT_RELOAD_VALUE	0x04
 #define WDT_RESTART		0x08
 #define WDT_CTRL		0x0C
+#define   WDT_CTRL_RESET_MODE_FULL_CHIP	(0x01 << 5)
 #define   WDT_CTRL_RESET_SYSTEM		(0x1  << 1)
 #define   WDT_CTRL_ENABLE		(0x1  << 0)
 
@@ -44,7 +45,8 @@ MODULE_DEVICE_TABLE(of, aspeed_wdt_of_table);
 
 static void aspeed_wdt_enable(struct aspeed_wdt *wdt, int count)
 {
-	u32 ctrl = WDT_CTRL_RESET_SYSTEM | WDT_CTRL_ENABLE;
+	u32 ctrl = WDT_CTRL_RESET_MODE_FULL_CHIP | WDT_CTRL_RESET_SYSTEM |
+		WDT_CTRL_ENABLE;
 
 	writel(0, wdt->base + WDT_CTRL);
 	writel(count, wdt->base + WDT_RELOAD_VALUE);
-- 
2.6.0




More information about the openbmc mailing list