From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org
Subject: Re: [PATCH] watchdog: tegra: Stop watchdog first if restarting
Date: Mon, 16 Nov 2015 11:48:43 +0100 [thread overview]
Message-ID: <20151116104841.GA31033@ulmo.nvidia.com> (raw)
In-Reply-To: <56463F7E.8040008-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
On Fri, Nov 13, 2015 at 11:52:30AM -0800, Guenter Roeck wrote:
> On 11/09/2015 04:11 PM, Andrew Chew wrote:
> >If we need to restart the watchdog due to someone changing the timeout
> >interval, stop the watchdog before restarting it. Otherwise, the new
> >timeout doesn't seem to take.
> >
> >Signed-off-by: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>
> Some feedback from the maintainers would be helpful, though,
> especially if there is some other means to change the timeout
> without stopping the watchdog.
I don't think there is. The TIMER_WDT<w>_COMMAND_0 register has this
description:
"The StartCounter bit enables watchdog counter operation, loads
the watchdog counter, starts the watchdog timer to count down,
resets the expiration count to 0, and clears all flags. Also
used as restart.
..."
The way I read this is that the watchdog period (the field that the
wdd->timeout value gets written to) is latched when the StartCounter
bit transitions from 0 to 1. So this change looks correct to me:
Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Andrew, it might be worthwhile to file an internal bug report to see if
we can get the TRM updated with a more explicit programming sequence or
at least get confirmation from one of the hardware designers whether or
not this is the correct sequence when changing the period.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-11-16 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 0:11 [PATCH] watchdog: tegra: Stop watchdog first if restarting Andrew Chew
[not found] ` <1447114298-5516-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-13 19:52 ` Guenter Roeck
[not found] ` <56463F7E.8040008-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-11-16 10:48 ` Thierry Reding [this message]
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=20151116104841.GA31033@ulmo.nvidia.com \
--to=treding-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=jimmzhang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org \
/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).