All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Gregory Oakes <gregory.oakes@amd.com>
Cc: linux-watchdog@vger.kernel.org, terry.bowman@amd.com
Subject: Re: [PATCH v2] watchdog: sp5100_tco: Immediately trigger upon starting.
Date: Thu, 16 Mar 2023 16:08:35 -0700	[thread overview]
Message-ID: <b05cdf9b-38bd-4942-8a4b-f37ffeb14004@roeck-us.net> (raw)
In-Reply-To: <20230316201312.17538-1-gregory.oakes@amd.com>

On Thu, Mar 16, 2023 at 03:13:12PM -0500, Gregory Oakes wrote:
> The watchdog countdown is supposed to begin when the device file is
> opened. Instead, it would begin countdown upon the first write to or
> close of the device file. Now, the ping operation is called within the
> start operation which ensures the countdown begins. From experimenation,
> it does not appear possible to do this with a single write including
> both the start bit and the trigger bit. So, it is done as two distinct
> writes.
> 
> Signed-off-by: Gregory Oakes <gregory.oakes@amd.com>

In the future, please remember to provide change logs.
Fortunately I still remember v1, so

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>  drivers/watchdog/sp5100_tco.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
> index fb426b7d81da..14f8d8d90920 100644
> --- a/drivers/watchdog/sp5100_tco.c
> +++ b/drivers/watchdog/sp5100_tco.c
> @@ -115,6 +115,10 @@ static int tco_timer_start(struct watchdog_device *wdd)
>  	val |= SP5100_WDT_START_STOP_BIT;
>  	writel(val, SP5100_WDT_CONTROL(tco->tcobase));
>  
> +	/* This must be a distinct write. */
> +	val |= SP5100_WDT_TRIGGER_BIT;
> +	writel(val, SP5100_WDT_CONTROL(tco->tcobase));
> +
>  	return 0;
>  }
>  
> -- 
> 2.39.1
> 

      reply	other threads:[~2023-03-16 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 20:13 [PATCH v2] watchdog: sp5100_tco: Immediately trigger upon starting Gregory Oakes
2023-03-16 23:08 ` Guenter Roeck [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=b05cdf9b-38bd-4942-8a4b-f37ffeb14004@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=gregory.oakes@amd.com \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=terry.bowman@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.