[linux,dev-4.10,2/5] watchdog: aspeed: update ASPEED reference dev tree properties for config

Message ID 1516996404-25133-3-git-send-email-eajames@linux.vnet.ibm.com
State Not Applicable, archived
Headers show
Series
  • aspeed: watchdog and devicetree updates
Related show

Commit Message

Eddie James Jan. 26, 2018, 7:53 p.m.
From: Milton Miller <miltonm@us.ibm.com>

Update the dev-4.10 branch from the v4 upstream propsal to the v5 version
before proposing further changes.

v4: http://patchwork.ozlabs.org/patch/785315/
v5: http://patchwork.ozlabs.org/patch/789692/

Signed-off-by: Milton Miller <miltonm@us.ibm.com>
---
 drivers/watchdog/aspeed_wdt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index ba9b938..9d40802 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -194,7 +194,7 @@  static int aspeed_wdt_probe(struct platform_device *pdev)
 	np = pdev->dev.of_node;
 	ret = of_property_read_string(np, "aspeed,reset-type", &reset_type);
 	if (ret) {
-		wdt->ctrl |= WDT_CTRL_RESET_SYSTEM;
+		wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC | WDT_CTRL_RESET_SYSTEM;
 	} else {
 		if (!strcmp(reset_type, "cpu"))
 			wdt->ctrl |= WDT_CTRL_RESET_MODE_ARM_CPU;
@@ -202,6 +202,8 @@  static int aspeed_wdt_probe(struct platform_device *pdev)
 			wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC;
 		else if (!strcmp(reset_type, "system"))
 			wdt->ctrl |= WDT_CTRL_RESET_SYSTEM;
+		else if (strcmp(reset_type, "none"))
+			return -EINVAL;
 	}
 	if (of_property_read_bool(np, "aspeed,external-signal"))
 		wdt->ctrl |= WDT_CTRL_WDT_EXT;