diff options
author | Wim Van Sebroeck <wim@linux-watchdog.org> | 2018-03-24 10:20:26 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2018-03-24 10:20:26 +0100 |
commit | ab17ed70f79abbfdc7f0878836816267df2835a7 (patch) | |
tree | 9b71b32dd667ebf2f01d0f1026fd21fec0ca2740 /drivers/watchdog/aspeed_wdt.c | |
parent | 2e8ebed6ede01f187f8a06bbae3e3b3325bda36c (diff) | |
parent | 2e62c4988bbf2b514aa7672c2ee5252531c7155f (diff) |
Merge branch 'v4.17-rc1'
Diffstat (limited to 'drivers/watchdog/aspeed_wdt.c')
-rw-r--r-- | drivers/watchdog/aspeed_wdt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index d1987d63b37c..a5b8eb21201f 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -46,6 +46,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_BOOT_SECONDARY BIT(7) #define WDT_CTRL_RESET_MODE_SOC (0x00 << 5) #define WDT_CTRL_RESET_MODE_FULL_CHIP (0x01 << 5) #define WDT_CTRL_RESET_MODE_ARM_CPU (0x10 << 5) @@ -158,6 +159,7 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd, { struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); + wdt->ctrl &= ~WDT_CTRL_BOOT_SECONDARY; aspeed_wdt_enable(wdt, 128 * WDT_RATE_1MHZ / 1000); mdelay(1000); @@ -245,6 +247,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev) } if (of_property_read_bool(np, "aspeed,external-signal")) wdt->ctrl |= WDT_CTRL_WDT_EXT; + if (of_property_read_bool(np, "aspeed,alt-boot")) + wdt->ctrl |= WDT_CTRL_BOOT_SECONDARY; if (readl(wdt->base + WDT_CTRL) & WDT_CTRL_ENABLE) { /* |