Linux-Watchdog Archive on
 help / color / Atom feed
From: Geert Uytterhoeven <>
To: Wolfram Sang <>
Cc: Linux Watchdog Mailing List <>,
	Linux-Renesas <>
Subject: Re: [RFC PATCH] watchdog: renesas_wdt: support handover from bootloader
Date: Thu, 9 May 2019 09:38:16 +0200
Message-ID: <> (raw)
In-Reply-To: <>

Hi Wolfram,

On Mon, Apr 15, 2019 at 12:52 PM Wolfram Sang
<> wrote:
> Support an already running watchdog by checking its enable bit and set
> up the status accordingly before registering the device.
> Signed-off-by: Wolfram Sang <>
> ---
> This patch was tested using a Renesas Salvator XS board (R-Car M3N). It works.
> However, there is a small window where the watchdog clock is disabled, namely
> after the MSSR clock driver initializes it until RuntimePM of the watchdog
> driver takes over. If the system hangs in this window, bad luck. So, I'd think
> it makes sense to have this clock either always-on or to keep the state which
> came from the firmware. Geert, what do you think?

The MSSR clock driver does not disable the clock. The clock's core
clk_disable_unused() does, which is a late initcall.
So if the handover code calls rwdt_start() before that (i.e. no deferred
probing happens), the clock would never be disabled.

Note that pm_runtime_put() in rwdt_probe() queues a power down request,
but as it is not the _sync variant, it is delayed by some time, so
probably it would never happen if rwdt_start() is called by the handover
code in probe.

Now, if we would mark the clock always-on (CLK_IS_CRITICAL),
we can never disable it, even if the wdt is not used or the driver is
not compiled-in.

I don't think there's a way to mark a clock as "keep the state which
came from the firmware", CLK_IS_CRITICAL enables the clock in



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 10:52 Wolfram Sang
2019-04-17 18:05 ` Guenter Roeck
2019-04-17 19:01   ` Wolfram Sang
2019-05-09  7:38 ` Geert Uytterhoeven [this message]
2019-05-24 13:52 ` Wolfram Sang
2019-06-07 20:41   ` Guenter Roeck
2019-06-07 20:55     ` Wolfram Sang

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Watchdog Archive on

Archives are clonable:
	git clone --mirror linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ \
	public-inbox-index linux-watchdog

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox