Re: [PATCH 1/6] clk: renesas: r9a06g032: Enable the watchdog reset sources

From: Jean-Jacques Hiblot
Date: Wed Feb 09 2022 - 13:24:57 EST


Hi Geert,

On 08/02/2022 11:35, Geert Uytterhoeven wrote:
Hi Jean-Jacques,

On Tue, Feb 8, 2022 at 11:25 AM Jean-Jacques Hiblot
<jjhiblot@xxxxxxxxxxxxxxx> wrote:
On 07/02/2022 16:34, Geert Uytterhoeven wrote:
On Fri, Feb 4, 2022 at 5:18 PM Jean-Jacques Hiblot
<jjhiblot@xxxxxxxxxxxxxxx> wrote:
The watchdog reset sources are not enabled by default.
Enabling them here to make sure that the system resets when the watchdog
timers expire.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@xxxxxxxxxxxxxxx>
Thanks for your patch!

R-Car Gen3 and RZ/G2 SoCs have a similar mechanism.
On these SoCs, the boot loader takes care of the configuration, as this
is a system policy that goes beyond the Linux realm.
Perhaps the RZ/N1 boot loader can do the same?

Gr{oetje,eeting}s,
Thanks for you reviews and comments.

I'm not conformable with the idea that the safety induced by the
watchdog is removed because the bootloader didn't set the register.
What if the CM33 is the master, and the CM33 just wants to receive an
interrupt when one of the CA7 watchdog timers times out?

In the next version of the patch I removed the part that enables the reset source.

However I kept the part that disables the reset source when the system is halted

because the system would otherwise reboot when a watchdog expires. Do you

see a scenario where this could be a problem ?

JJ


I'd rather that the kernel is able to enable the watchdog reset source.
If it is acceptable, we could use a new DTS entry to force the policy.
DT describes hardware. not software policy.
Although I agree e.g. the watchdog timeout value is software policy.


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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