Received: by 10.213.65.68 with SMTP id h4csp29008imn; Mon, 26 Mar 2018 14:18:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELuhPgwjwVX08vtfNkjZsVomvTUXew504R3036pKsyX0ba7pGNy6pNsQsBqrElwIfxJHNCKL X-Received: by 10.99.3.144 with SMTP id 138mr29799179pgd.364.1522099118595; Mon, 26 Mar 2018 14:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522099118; cv=none; d=google.com; s=arc-20160816; b=ta5oJmKVgUDchxptkqI7WnQImJ1Lf6QqThbnUsCnImBbzkX/+IBVsqE+qG7+7JJ/18 wca2guBU1HsEnGCD0qFNqVKCfDN4amIWBad7K6Ntvnwow0BnntB6V9p/0Yz0DX3obB7v MQmRIcknWqOhl4CBlB6/QnUkBiWJX+Hx4g6+jsfhyLaDjvMs6rQhM3wZt/agA40+Jmby P1gMbvRl6MQfovWYCED74Mle4siove1JPK2HMfLQXwoFdYBHNQym6ibUfv7iqijnFC2p QWkl52fc4bvr0qz7KphnssFGBJfAqT2oL9H+DT1WVqVn+HYEGX15qFuaPdhHQ/N3JLjQ G5Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tgDk/TyEA4xfivvO+6j5+hOHQoh1WMF6MZbZFOn7Wjc=; b=c/JEtHC4aPEOP7mZSTMEw9EXYdiW1kp5sJZcixDfVf1Fvh7qc6c0OCxclDSy0VsC/W kMJtBATBJ0q/Q0UL2SHAusICqzVR51V0WtrIE3SkjChGqjG/SraZyflB8su7yTz69Nug 3oIWlCx0TLyCKW02dkY+LYGHhoc9qzmnbcRyKL+049InpwlB/+eGDFYPYaeAqsqtL+DG 0xtv+DyoSbNqyFxfe4E5yuQJONOGD/iuJxJvYGxbhWly7IC2LT919y6PLkF55EHwDCWh XlK4hiuclbw46QjSf1RCCbCMr+U0iaR1PQucCJD1Bt3CQagtr4uyyMqYOKRzJjLNg5cS TT3Q== 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 16si991829pfh.354.2018.03.26.14.18.22; Mon, 26 Mar 2018 14:18:38 -0700 (PDT) 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 S1751964AbeCZVRS (ORCPT + 99 others); Mon, 26 Mar 2018 17:17:18 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39428 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751614AbeCZVRR (ORCPT ); Mon, 26 Mar 2018 17:17:17 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2QLH6oI111467 for ; Mon, 26 Mar 2018 17:17:16 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gy5u7esf4-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 26 Mar 2018 17:17:16 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Mar 2018 17:17:15 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 26 Mar 2018 17:17:11 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2QLHBZu58196196; Mon, 26 Mar 2018 21:17:11 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96AB62803A; Mon, 26 Mar 2018 17:16:34 -0400 (EDT) Received: from talon7.ibm.com (unknown [9.85.181.180]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id EF9E42803D; Mon, 26 Mar 2018 17:16:33 -0400 (EDT) From: Eddie James To: linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux@roeck-us.net, wim@linux-watchdog.org, joel@jms.id.au, openbmc@lists.ozlabs.org, Eddie James Subject: [PATCH] aspeed: watchdog: Add status function Date: Mon, 26 Mar 2018 16:17:08 -0500 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 18032621-0056-0000-0000-000004332A0A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008749; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000255; SDB=6.01008834; UDB=6.00513863; IPR=6.00788116; MB=3.00020256; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-26 21:17:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032621-0057-0000-0000-0000087535E9 Message-Id: <1522099028-20347-1-git-send-email-eajames@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-26_10:,, 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-1803260214 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Populate the status watchdog operation to return the "timeout status" register of the ASPEED watchdog. Signed-off-by: Eddie James --- drivers/watchdog/aspeed_wdt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c index a5b8eb2..d6dd5c9 100644 --- a/drivers/watchdog/aspeed_wdt.c +++ b/drivers/watchdog/aspeed_wdt.c @@ -55,6 +55,7 @@ struct aspeed_wdt_config { #define WDT_CTRL_WDT_INTR BIT(2) #define WDT_CTRL_RESET_SYSTEM BIT(1) #define WDT_CTRL_ENABLE BIT(0) +#define WDT_TIMEOUT_STATUS 0x10 /* * WDT_RESET_WIDTH controls the characteristics of the external pulse (if @@ -138,6 +139,13 @@ static int aspeed_wdt_ping(struct watchdog_device *wdd) return 0; } +static unsigned int aspeed_wdt_status(struct watchdog_device *wdd) +{ + struct aspeed_wdt *wdt = to_aspeed_wdt(wdd); + + return readl(wdt->base + WDT_TIMEOUT_STATUS); +} + static int aspeed_wdt_set_timeout(struct watchdog_device *wdd, unsigned int timeout) { @@ -171,6 +179,7 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd, .start = aspeed_wdt_start, .stop = aspeed_wdt_stop, .ping = aspeed_wdt_ping, + .status = aspeed_wdt_status, .set_timeout = aspeed_wdt_set_timeout, .restart = aspeed_wdt_restart, .owner = THIS_MODULE, -- 1.8.3.1