Received: by 10.223.185.111 with SMTP id b44csp796836wrg; Fri, 9 Mar 2018 14:00:30 -0800 (PST) X-Google-Smtp-Source: AG47ELsgOM6+hKm/3PFP4MhxCJ20J5VUqgBfB9hGFbew/VhX4y+b300nbh1m8/z0UYziYuNeXl2N X-Received: by 2002:a17:902:b697:: with SMTP id c23-v6mr29206957pls.328.1520632830683; Fri, 09 Mar 2018 14:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520632830; cv=none; d=google.com; s=arc-20160816; b=tFwjeG3CUewzSG99tYZvkqWpBlZZf2A4C/QDn43LaWe/tz2gv9pOxxpIbXt1frxW2a uYOhsLdWDqH2NQOz5VB/+4h/WZYsUj/Jlk01Ao2FnNKDaNg4AgQY6ueoMK61cE8PxNby y2w/BUh3b4fKBkdF0QMALsL+jOpkWKPhQJwo0LIjsMHzQwWYEEaqR9yJcorau77PGiWQ 4F6HmNmAJ5jh+bxENEQDm/scDvuFxxLPvX/ktB7seyYza557D+xd4e5hq2iC9/pYsmi3 m4e2g88j7I5Hg44yc3/Ddj0mpLGHrOVLU9UxRrqXnTb98EV+b9HsQ5RPxTpkny5WEeKS /u1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=egj5eJFxhVo1mZD+x/s/xVf4o7gS5rXiGwjuQXDpXJs=; b=S7r0tDwYCAmZgMRcLbARjQnrC4DsNT/6SmEAQbaoJLQjyVgfEbRwEGbFeg8cbb08q5 fqZMBdvzMLSXU6r/VIceY8TWHbvzn6Y+x0QiPJsvK8pAuaanjlKYv3TgB3RsKS89kLnu RbCHXAwNHl+AM0xjjW3Y0MtQh870L5nxQFY6lAiOJwH3S5m/ChpexqSiNla/5k+QOn0c sk1E2YsdkxntQonio96TL9LDjPLibRmyv/swRBWUCEeLTLwdgy1U13/dIpwFFzMaxiYj FnxC+U6Ntc2E+Cup2LdiYqSG0rZNEO81Ty76knrz6aFt6puNni6oOH+2m/N4T6j+xk4I Xfag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si1563518pfz.172.2018.03.09.14.00.15; Fri, 09 Mar 2018 14:00:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932717AbeCIV6w (ORCPT + 99 others); Fri, 9 Mar 2018 16:58:52 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50722 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932371AbeCIV62 (ORCPT ); Fri, 9 Mar 2018 16:58:28 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w29Lv2bx027654 for ; Fri, 9 Mar 2018 16:58:28 -0500 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gkyv75uyx-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 09 Mar 2018 16:58:27 -0500 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Mar 2018 16:58:27 -0500 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 9 Mar 2018 16:58:24 -0500 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w29LwOYM58130664; Fri, 9 Mar 2018 21:58:24 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B281C124037; Fri, 9 Mar 2018 18:00:36 -0500 (EST) Received: from talon7.ibm.com (unknown [9.41.241.240]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id 2605D12403F; Fri, 9 Mar 2018 18:00:35 -0500 (EST) From: Eddie James To: linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org, joel@jms.id.au, wim@linux-watchdog.org, linux@roeck-us.net, Milton Miller , Eddie James Subject: [PATCH 1/2] watchdog: aspeed: Fix translation of reset mode to ctrl register Date: Fri, 9 Mar 2018 15:58:19 -0600 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520632700-25800-1-git-send-email-eajames@linux.vnet.ibm.com> References: <1520632700-25800-1-git-send-email-eajames@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18030921-0008-0000-0000-000002E2C9BB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008643; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000701; UDB=6.00509032; IPR=6.00780031; MB=3.00019945; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-09 21:58:26 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030921-0009-0000-0000-000038837DEE Message-Id: <1520632700-25800-2-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-09_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803090259 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Milton Miller Assert RESET_SYSTEM bit for any reset and set MODE field from reset type. The watchdog control register has a RESET_SYSTEM bit that is really closer to activate a reset, and RESET_SYSTEM_MODE field that chooses how much to reset. Before this patch, a node without these optional property would do a SOC reset, but a node with properties requesting a cpu or SOC reset would do nothing and a node requesting a system reset would do a SOC reset. Fixes: b7f0b8ad25f3 ("drivers/watchdog: ASPEED reference dev tree properties for config") Signed-off-by: Milton Miller Signed-off-by: Eddie James --- drivers/watchdog/aspeed_wdt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index ca5b91e..d1987d6 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -232,11 +232,14 @@ static int aspeed_wdt_probe(struct platform_device *pdev) 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; + wdt->ctrl |= WDT_CTRL_RESET_MODE_ARM_CPU | + WDT_CTRL_RESET_SYSTEM; else if (!strcmp(reset_type, "soc")) - wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC; + wdt->ctrl |= WDT_CTRL_RESET_MODE_SOC | + WDT_CTRL_RESET_SYSTEM; else if (!strcmp(reset_type, "system")) - wdt->ctrl |= WDT_CTRL_RESET_SYSTEM; + wdt->ctrl |= WDT_CTRL_RESET_MODE_FULL_CHIP | + WDT_CTRL_RESET_SYSTEM; else if (strcmp(reset_type, "none")) return -EINVAL; } -- 1.8.3.1