Received: by 10.213.65.68 with SMTP id h4csp55819imn; Mon, 26 Mar 2018 15:02:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELtKFYsNjVON1NFyvJ7qPEBUWwP9uvgmncmKg1+q3Fr0CR+ok2IKTGpWd8lXMwZ3geP43tKv X-Received: by 10.101.91.3 with SMTP id y3mr28871754pgq.299.1522101723794; Mon, 26 Mar 2018 15:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522101723; cv=none; d=google.com; s=arc-20160816; b=hvNveQjSoFhFX+PYjMFVjtuADYk5tW6APcql+sx37YYk9FvA1UhN2vQyUrXVPnRlyH EyKqLxVyA5twOjBdHjvR8McMv6cBF/9C4PxODQ6p5qKfpFSat+0cEocFtc4LGiaBBFVN qxHcKgIB/bxmd6mncbtqqi0zxkMUfJGl3xzHtyxturfyrWjA4drb3AzJJQhtdL6jcjGw 4q4vCgGr+gEd+nHWNEzDiE2Fzq9Z5lvHnAa4KXiNtf/GvAVyFfAdoq3u1WjPszb9Iutj nUwmWzeT7BTOgncSBBPQyCQxS0av+wCqgGP5mxB5lZ1j/f/LrS9+H1ruQwtMjAQi3qMt Y6jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=DC9JGXbXUY380nnOMvVMzGEbuczW8XdletjNQ1/qPqc=; b=VcVFIuoIGWy/8OqwrSIFudNBz0Pei+oKnlZDBfTS/JIbTzYqNLpAAnYpNpLhirSxd9 dl0bCzQvtyd/70LLEN+bMcQ2mhn4t/xs2I/PrKjhawyIYsTY9UbhM2lchVZLNMvGgEFD Rk6VszuUFIl1NAIY5RkyqGS7G8ldo48NulwiXyev2E1UW8XakCzzgiY5IdtibOo08f9R 7nvRoyLQUaOh3Mmmf1dY831zeOVo+PCVdCmLw2QVbxxeyB+EsPMhth3TvxOaEoWRmuhH F70BXqr6WjR3Dp4+XkZ79Kbijtva87oA0d4yYF4yR6OigS6R85WVJjCTX6Zo0hzF7pl8 KTbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FI9yKqHt; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x65si1175239pfi.65.2018.03.26.15.01.48; Mon, 26 Mar 2018 15:02:03 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=FI9yKqHt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752206AbeCZWAR (ORCPT + 99 others); Mon, 26 Mar 2018 18:00:17 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:40543 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbeCZWAQ (ORCPT ); Mon, 26 Mar 2018 18:00:16 -0400 Received: by mail-pf0-f196.google.com with SMTP id v66so5592286pfv.7; Mon, 26 Mar 2018 15:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DC9JGXbXUY380nnOMvVMzGEbuczW8XdletjNQ1/qPqc=; b=FI9yKqHtQ/ZSbQ9c47suSlRZp0ukAUfJQC3xkHk6pt9kX4A7/Kj9dN19h/q+xzJjZC GOSj38GEl7rzNf2JCGcjHYS3BmdJjvPBoJHPJSjNjEHTkqtkXiiCQOwxxQKc1GM3UYnD 1mi+qFugwHW3Hjh0PsZKksHIagLEKWDjUkASU3bRHyzDLiuJDGnSzHvo5SxtjrE5KGry kWR6mJDzRK94PM8MODiIdIfqFtzMY7VVvVmS2qFm4RIhOrzsoKlBnz+2MS6RGqUCzrNb DuZgW32xNcAmbqouxnbXX3GC42M5U+4GxrgPwk0WyUW8/bULLtutN9b52BQoBFwAIWIF SCqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DC9JGXbXUY380nnOMvVMzGEbuczW8XdletjNQ1/qPqc=; b=NzPR06Xqkg3c//YGG7cozxQZAt2RdTypCOFWxnxH71eX/yStAEHyCAGrY3zZnJ3FQ6 iY7fMA3R9Yt6B07LWvaKC5vjTrMYBn5KDaksMDTjQ+MQMIkX1G8E7nG19c5kbz4DyD9i md00Aq/whA7cX76aV6k+BD8H11mNU3rYE9KKfdFJhnPBJMdAAYs8pShNWxSDckR3b5iS us80HhaMfdW4WIvQBEiIf+ETZPrCWrWP9Bgv1LFAUwnLV6VxeScymsLZnHcYf+JpTdBJ A2HpJrhKXgsUr50fYeiRgoMDDJ8EVhj1oQghuBVtwNbG+vLF4TdAoLT7kaag/7U6LOxx ujxA== X-Gm-Message-State: AElRT7FCH5eVCXFSZTpTcexQtgPh4Buxirwr+v7MuYs+QZ466EDMEHN7 GepTGmSaH08rRfPyxmO+pK8= X-Received: by 10.99.112.92 with SMTP id a28mr29039225pgn.17.1522101615514; Mon, 26 Mar 2018 15:00:15 -0700 (PDT) Received: from server.roeck-us.net (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id p86sm34788638pfi.55.2018.03.26.15.00.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Mar 2018 15:00:14 -0700 (PDT) Subject: Re: [PATCH] aspeed: watchdog: Add status function To: Eddie James , linux-watchdog@vger.kernel.org Cc: linux-kernel@vger.kernel.org, wim@linux-watchdog.org, joel@jms.id.au, openbmc@lists.ozlabs.org References: <1522099028-20347-1-git-send-email-eajames@linux.vnet.ibm.com> From: Guenter Roeck Message-ID: Date: Mon, 26 Mar 2018 15:00:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1522099028-20347-1-git-send-email-eajames@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/26/2018 02:17 PM, Eddie James wrote: > 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); > +} Does the register report WDIOF_* status flags/bits as defined in the API ? This seems more than unlikely. Guenter > + > 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, >