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

Eddie James eajames at linux.vnet.ibm.com
Sat Jan 27 06:53:21 AEDT 2018


From: Milton Miller <miltonm at 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 at us.ibm.com>
---
 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 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;
-- 
1.8.3.1



More information about the openbmc mailing list