devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Wim Van Sebroeck <wim@iguana.be>,
	Russell King <linux@armlinux.org.uk>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>"linux-arm-kernel@lists.infradead.org"
	<l>
Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
Date: Wed, 31 Jan 2018 06:48:21 -0800	[thread overview]
Message-ID: <007dd1e3-70fd-69ad-fd02-4719e958b41c@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdViQgCjVFbs0kkBObAAoFTzvz8yPFUHPWHrtYzkbnYm_g@mail.gmail.com>

On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
> Hi Fabrizio,
> 
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>> when suspending to RAM we need to explicitly disable the counting by
>>>> clearing TME from RWTCSRA.
>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>> to be restarted, therefore this patch implements the restart callback.
>>>>
>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>>>> ---
>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>> Is its implementation going to break any Gen3 platform?
>>>
>>> The changes clearly are way more than claimed in the subject. Adding
>>> restart handler and PM support may be prerequisites for Gen2, but the
>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>> change" ?
>>
>> The PM implementation should be ok for Gen3 too, without this patch series the kernel
>> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
>> need to explicitly disable the counting to keep the same behaviour in place.
> 
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?
> 
If so, that would be buggy.

>> With respect to the restart callback implementation, that may well have consequences on
>> Gen3, hopefully Wolfram will give us a feedback on this.
>> In particular I would like to know if we should be installing the restart callback only when
>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
>> Gen3 as well.
> 
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
> 

You could just give it lower priority than PSCI.

> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...
> 

Which means the veto is counter-productive and thus meaningless.

Guenter

>> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
>> that's why the restart implementation was merged into this patch.
>> I can split this patch in two, one for PM support and one for restart support for the next
>> version, what do you think about this?
> 
> Splitting in individual logical changes sounds like a good idea to me.
> 
> Gr{oetje,eeting}s,
> 
>                          Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> 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	other threads:[~2018-01-31 14:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 20:22 [RFC v3 00/25] Fix watchdog on Renesas R-Car Gen2 and RZ/G1 Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size Fabrizio Castro
     [not found]   ` <1517343778-27902-4-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:42     ` Geert Uytterhoeven
2018-01-30 20:22 ` [RFC v3 06/25] ARM: dts: r8a7792: " Fabrizio Castro
2018-01-31  8:43   ` Geert Uytterhoeven
2018-01-30 20:22 ` [RFC v3 12/25] ARM: shmobile: rcar-gen2: Add watchdog support Fabrizio Castro
     [not found] ` <1517343778-27902-1-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-30 20:22   ` [RFC v3 01/25] ARM: shmobile: " Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size Fabrizio Castro
     [not found]     ` <1517343778-27902-3-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:42       ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 04/25] ARM: dts: r8a7790: " Fabrizio Castro
     [not found]     ` <1517343778-27902-5-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:43       ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 05/25] ARM: dts: r8a7791: " Fabrizio Castro
     [not found]     ` <1517343778-27902-6-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:43       ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 07/25] ARM: dts: r8a7793: " Fabrizio Castro
     [not found]     ` <1517343778-27902-8-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:43       ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 08/25] ARM: dts: r8a7794: " Fabrizio Castro
2018-01-31  8:44     ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 09/25] soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2 Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support Fabrizio Castro
2018-01-31  8:46     ` Geert Uytterhoeven
     [not found]       ` <CAMuHMdXkHF9R0XfcG++s0RRup+Mdtam5p=FXw26z86wAOJhZfQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-31 10:27         ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 11/25] watchdog: renesas_wdt: " Fabrizio Castro
2018-01-30 22:05     ` Guenter Roeck
     [not found]       ` <20180130220504.GA16709-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2018-01-31 10:47         ` Fabrizio Castro
     [not found]           ` <TY1PR06MB0895ECB2936323F9D281C1EFC0FB0-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-31 12:13             ` Geert Uytterhoeven
2018-01-31 13:58               ` Fabrizio Castro
2018-01-31 14:48               ` Guenter Roeck [this message]
2018-01-31 15:27                 ` Fabrizio Castro
     [not found]                 ` <007dd1e3-70fd-69ad-fd02-4719e958b41c-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2018-01-31 15:37                   ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 13/25] ARM: shmobile: defconfig: Enable CONFIG_RENESAS_WDT Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 14/25] clk: renesas: r8a7743: Add rwdt clock Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 15/25] clk: renesas: r8a7745: " Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 16/25] clk: renesas: r8a7790: " Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 20/25] ARM: dts: r8a7745: Add watchdog support to SoC dtsi Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 21/25] ARM: dts: r8a7790: " Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 17/25] clk: renesas: r8a7791/r8a7793: Add rwdt clock Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 18/25] clk: renesas: r8a7794: " Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 19/25] ARM: dts: r8a7743: Add watchdog support to SoC dtsi Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 22/25] ARM: dts: r8a7791: " Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 23/25] ARM: dts: r8a7794: " Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 24/25] ARM: dts: iwg20m: Add watchdog support to SoM dtsi Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 25/25] ARM: dts: iwg22m: " Fabrizio Castro

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=007dd1e3-70fd-69ad-fd02-4719e958b41c@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=will.deacon@arm.com \
    --cc=wim@iguana.be \
    --cc=wsa+renesas@sang-engineering.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 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).