From: Guenter Roeck <linux@roeck-us.net>
To: Olof Johansson <olof@lixom.net>
Cc: Doug Anderson <dianders@chromium.org>,
Wim Van Sebroeck <wim@iguana.be>,
Leela Krishna Amudala <l.krishna@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>,
Kukjin Kim <kgene.kim@samsung.com>,
Ben Dooks <ben-linux@fluff.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] watchdog: s3c2410_wdt: Report when the watchdog reset the system
Date: Mon, 2 Dec 2013 13:36:54 -0800 [thread overview]
Message-ID: <20131202213654.GA4059@roeck-us.net> (raw)
In-Reply-To: <CAOesGMi-P6LG1-XKVizUS_qX-gfZi_iXBO5r+=6a2nfvBS60mw@mail.gmail.com>
On Mon, Dec 02, 2013 at 12:47:53PM -0800, Olof Johansson wrote:
> On Mon, Dec 2, 2013 at 12:21 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Mon, Dec 02, 2013 at 10:14:41AM -0800, Doug Anderson wrote:
> >> A good watchdog driver is supposed to report when it was responsible
> >> for resetting the system. Implement this for the s3c2410, at least on
> >> exynos5250 and exynos5420 where we already have a pointer to the PMU
> >> registers to read the information.
> >>
> >> Signed-off-by: Doug Anderson <dianders@chromium.org>
> >> ---
> >> This patch is based atop Leela Krishna's recent series that ends with
> >> (ARM: dts: update watchdog device nodes for Exynos5250 and Exynos5420)
> >> AKA <https://patchwork.kernel.org/patch/3251861/>.
> >>
> >> drivers/watchdog/s3c2410_wdt.c | 42 +++++++++++++++++++++++++++++++++++++++---
> >> 1 file changed, 39 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
> >> index 47f4dcf..2c87d37 100644
> >> --- a/drivers/watchdog/s3c2410_wdt.c
> >> +++ b/drivers/watchdog/s3c2410_wdt.c
> >> @@ -62,9 +62,13 @@
> >> #define CONFIG_S3C2410_WATCHDOG_ATBOOT (0)
> >> #define CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME (15)
> >>
> >> +#define RST_STAT_REG_OFFSET 0x0404
> >> #define WDT_DISABLE_REG_OFFSET 0x0408
> >> #define WDT_MASK_RESET_REG_OFFSET 0x040c
> >> #define QUIRK_NEEDS_PMU_CONFIG (1 << 0)
> >> +#define QUIRK_HAS_RST_STAT (1 << 1)
> >> +#define QUIRKS_NEED_PMUREG (QUIRK_NEEDS_PMU_CONFIG | \
> >> + QUIRK_HAS_RST_STAT)
> >>
> > I am not really happy about the NEED (both of them, really) here.
> > How about HAS instead ?
>
> Ah, I just commented on these things on our internal review site too
> on this patch. I don't even think a quirk is needed -- just use the
> presence of a non-0 rst_stat_reg to tell if you need to use regmap.
>
Agreed; same is true for the QUIRK_NEEDS_PMU_CONFIG related registers
as well.
Guenter
next prev parent reply other threads:[~2013-12-02 21:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 18:14 [PATCH] watchdog: s3c2410_wdt: Report when the watchdog reset the system Doug Anderson
2013-12-02 20:21 ` Guenter Roeck
2013-12-02 20:47 ` Olof Johansson
2013-12-02 21:36 ` Guenter Roeck [this message]
2013-12-05 7:57 ` Leela Krishna Amudala
2013-12-05 16:00 ` Guenter Roeck
2013-12-05 16:18 ` Tomasz Figa
2013-12-05 18:16 ` Doug Anderson
2013-12-05 18:15 ` Doug Anderson
2013-12-02 21:16 ` Doug Anderson
2013-12-05 16:21 ` Tomasz Figa
2013-12-05 16:40 ` Guenter Roeck
2013-12-05 16:44 ` Tomasz Figa
2013-12-05 18:16 ` Doug Anderson
2013-12-05 18:16 ` Doug Anderson
2013-12-05 18:15 ` [PATCH v2 1/2] fixup: watchdog: s3c2410_wdt: use syscon regmap interface to configure pmu register Doug Anderson
2013-12-05 18:15 ` [PATCH v2 2/2] watchdog: s3c2410_wdt: Report when the watchdog reset the system Doug Anderson
2013-12-06 19:54 ` Guenter Roeck
2013-12-06 21:08 ` Doug Anderson
2013-12-06 21:08 ` [PATCH v3] " Doug Anderson
2013-12-06 21:28 ` Guenter Roeck
2014-01-13 18:26 ` Wim Van Sebroeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131202213654.GA4059@roeck-us.net \
--to=linux@roeck-us.net \
--cc=ben-linux@fluff.org \
--cc=dianders@chromium.org \
--cc=kgene.kim@samsung.com \
--cc=l.krishna@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=olof@lixom.net \
--cc=tomasz.figa@gmail.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).