2022-11-03 23:07:59

by Fabrizio Castro

[permalink] [raw]
Subject: [PATCH 0/3] Add Watchdog support for RZ/V2M EVK v2

Dear All,

This series is to add watchdog support for the RZ/V2M EVK v2.

While testing I have noticed a problem with restarting the
system via the watchdog, therefore this series also contains
a driver fix.

Thanks,
Fab

Fabrizio Castro (3):
watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
arm64: dts: renesas: r9a09g011: Add watchdog node
arm64: dts: renesas: v2mevk2: Enable watchdog

arch/arm64/boot/dts/renesas/r9a09g011-v2mevk2.dts | 4 ++++
arch/arm64/boot/dts/renesas/r9a09g011.dtsi | 13 +++++++++++++
drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
3 files changed, 25 insertions(+), 3 deletions(-)

--
2.34.1



2022-11-03 23:11:31

by Fabrizio Castro

[permalink] [raw]
Subject: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

The setting for the RZ/V2M watchdog cannot be changed once
the watchdog has been enabled, unless the IP gets reset.
The current implementation of the restart callback assumes
that the watchdog is not enabled, but that's not always the
case, and it leads to longer than necessary reboot times if
the watchdog is already running.

Always reset the RZ/V2M watchdog first, so that we can always
restart quickly.

Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
Signed-off-by: Fabrizio Castro <[email protected]>
---
drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
index 974a4194a8fd..00438ceed17a 100644
--- a/drivers/watchdog/rzg2l_wdt.c
+++ b/drivers/watchdog/rzg2l_wdt.c
@@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev,
{
struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);

- clk_prepare_enable(priv->pclk);
- clk_prepare_enable(priv->osc_clk);
-
if (priv->devtype == WDT_RZG2L) {
+ clk_prepare_enable(priv->pclk);
+ clk_prepare_enable(priv->osc_clk);
+
/* Generate Reset (WDTRSTB) Signal on parity error */
rzg2l_wdt_write(priv, 0, PECR);

@@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev,
} else {
/* RZ/V2M doesn't have parity error registers */

+ reset_control_reset(priv->rstc);
+
+ clk_prepare_enable(priv->pclk);
+ clk_prepare_enable(priv->osc_clk);
+
wdev->timeout = 0;

/* Initialize time out */
--
2.34.1


2022-11-14 15:02:37

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

On Thu, Nov 3, 2022 at 11:40 PM Fabrizio Castro
<[email protected]> wrote:
> The setting for the RZ/V2M watchdog cannot be changed once
> the watchdog has been enabled, unless the IP gets reset.
> The current implementation of the restart callback assumes
> that the watchdog is not enabled, but that's not always the
> case, and it leads to longer than necessary reboot times if
> the watchdog is already running.
>
> Always reset the RZ/V2M watchdog first, so that we can always
> restart quickly.
>
> Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> Signed-off-by: Fabrizio Castro <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2022-11-15 13:45:27

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> The setting for the RZ/V2M watchdog cannot be changed once
> the watchdog has been enabled, unless the IP gets reset.
> The current implementation of the restart callback assumes
> that the watchdog is not enabled, but that's not always the
> case, and it leads to longer than necessary reboot times if
> the watchdog is already running.
>
> Always reset the RZ/V2M watchdog first, so that we can always
> restart quickly.
>
> Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> Signed-off-by: Fabrizio Castro <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
> drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
> index 974a4194a8fd..00438ceed17a 100644
> --- a/drivers/watchdog/rzg2l_wdt.c
> +++ b/drivers/watchdog/rzg2l_wdt.c
> @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev,
> {
> struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
>
> - clk_prepare_enable(priv->pclk);
> - clk_prepare_enable(priv->osc_clk);
> -
> if (priv->devtype == WDT_RZG2L) {
> + clk_prepare_enable(priv->pclk);
> + clk_prepare_enable(priv->osc_clk);
> +
> /* Generate Reset (WDTRSTB) Signal on parity error */
> rzg2l_wdt_write(priv, 0, PECR);
>
> @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev,
> } else {
> /* RZ/V2M doesn't have parity error registers */
>
> + reset_control_reset(priv->rstc);
> +
> + clk_prepare_enable(priv->pclk);
> + clk_prepare_enable(priv->osc_clk);
> +
> wdev->timeout = 0;
>
> /* Initialize time out */
> --
> 2.34.1
>

2022-11-17 11:52:26

by Fabrizio Castro

[permalink] [raw]
Subject: RE: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

Hi Geert and Guenter,

Thank you for your reviews!

As it turns out, the rzg2l_wdt driver has some reset related issues
(currently not addressed by the driver) for the RZ/V2M and RZ/Five
SoCs. More specifically to this patch, there is a better way to fix
the restart callback by addressing the way the reset is handled
for the watchdog IP.

I am dropping this patch, and I'll send out a series to address
the above concerns (which will tackle the issues with the restart
callback in a better way).


Thanks,
Fab


> From: Guenter Roeck <[email protected]> On Behalf Of Guenter Roeck
> Sent: 15 November 2022 13:28
> Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
>
> On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> > The setting for the RZ/V2M watchdog cannot be changed once
> > the watchdog has been enabled, unless the IP gets reset.
> > The current implementation of the restart callback assumes
> > that the watchdog is not enabled, but that's not always the
> > case, and it leads to longer than necessary reboot times if
> > the watchdog is already running.
> >
> > Always reset the RZ/V2M watchdog first, so that we can always
> > restart quickly.
> >
> > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> > Signed-off-by: Fabrizio Castro <[email protected]>
>
> Reviewed-by: Guenter Roeck <[email protected]>
>
> > ---
> > drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
> > index 974a4194a8fd..00438ceed17a 100644
> > --- a/drivers/watchdog/rzg2l_wdt.c
> > +++ b/drivers/watchdog/rzg2l_wdt.c
> > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct
> watchdog_device *wdev,
> > {
> > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
> >
> > - clk_prepare_enable(priv->pclk);
> > - clk_prepare_enable(priv->osc_clk);
> > -
> > if (priv->devtype == WDT_RZG2L) {
> > + clk_prepare_enable(priv->pclk);
> > + clk_prepare_enable(priv->osc_clk);
> > +
> > /* Generate Reset (WDTRSTB) Signal on parity error */
> > rzg2l_wdt_write(priv, 0, PECR);
> >
> > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device
> *wdev,
> > } else {
> > /* RZ/V2M doesn't have parity error registers */
> >
> > + reset_control_reset(priv->rstc);
> > +
> > + clk_prepare_enable(priv->pclk);
> > + clk_prepare_enable(priv->osc_clk);
> > +
> > wdev->timeout = 0;
> >
> > /* Initialize time out */
> > --
> > 2.34.1
> >

2023-05-07 17:41:08

by Wim Van Sebroeck

[permalink] [raw]
Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

Hi Fabrizio,

Based on below e-mail I excluded this patch from the merge window.
I saw that Guenter still has it in his branch.
So can we have an update on this please?

Thanks in advance,
Wim.

> Hi Geert and Guenter,
>
> Thank you for your reviews!
>
> As it turns out, the rzg2l_wdt driver has some reset related issues
> (currently not addressed by the driver) for the RZ/V2M and RZ/Five
> SoCs. More specifically to this patch, there is a better way to fix
> the restart callback by addressing the way the reset is handled
> for the watchdog IP.
>
> I am dropping this patch, and I'll send out a series to address
> the above concerns (which will tackle the issues with the restart
> callback in a better way).
>
>
> Thanks,
> Fab
>
>
> > From: Guenter Roeck <[email protected]> On Behalf Of Guenter Roeck
> > Sent: 15 November 2022 13:28
> > Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
> >
> > On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> > > The setting for the RZ/V2M watchdog cannot be changed once
> > > the watchdog has been enabled, unless the IP gets reset.
> > > The current implementation of the restart callback assumes
> > > that the watchdog is not enabled, but that's not always the
> > > case, and it leads to longer than necessary reboot times if
> > > the watchdog is already running.
> > >
> > > Always reset the RZ/V2M watchdog first, so that we can always
> > > restart quickly.
> > >
> > > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> > > Signed-off-by: Fabrizio Castro <[email protected]>
> >
> > Reviewed-by: Guenter Roeck <[email protected]>
> >
> > > ---
> > > drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> > > 1 file changed, 8 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
> > > index 974a4194a8fd..00438ceed17a 100644
> > > --- a/drivers/watchdog/rzg2l_wdt.c
> > > +++ b/drivers/watchdog/rzg2l_wdt.c
> > > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct
> > watchdog_device *wdev,
> > > {
> > > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
> > >
> > > - clk_prepare_enable(priv->pclk);
> > > - clk_prepare_enable(priv->osc_clk);
> > > -
> > > if (priv->devtype == WDT_RZG2L) {
> > > + clk_prepare_enable(priv->pclk);
> > > + clk_prepare_enable(priv->osc_clk);
> > > +
> > > /* Generate Reset (WDTRSTB) Signal on parity error */
> > > rzg2l_wdt_write(priv, 0, PECR);
> > >
> > > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device
> > *wdev,
> > > } else {
> > > /* RZ/V2M doesn't have parity error registers */
> > >
> > > + reset_control_reset(priv->rstc);
> > > +
> > > + clk_prepare_enable(priv->pclk);
> > > + clk_prepare_enable(priv->osc_clk);
> > > +
> > > wdev->timeout = 0;
> > >
> > > /* Initialize time out */
> > > --
> > > 2.34.1
> > >

2023-05-08 13:37:53

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

On Sun, May 07, 2023 at 05:36:25PM +0200, Wim Van Sebroeck wrote:
> Hi Fabrizio,
>
> Based on below e-mail I excluded this patch from the merge window.
> I saw that Guenter still has it in his branch.

Thanks for the note. I'll drop it.

Guenter

> So can we have an update on this please?
>
> Thanks in advance,
> Wim.
>
> > Hi Geert and Guenter,
> >
> > Thank you for your reviews!
> >
> > As it turns out, the rzg2l_wdt driver has some reset related issues
> > (currently not addressed by the driver) for the RZ/V2M and RZ/Five
> > SoCs. More specifically to this patch, there is a better way to fix
> > the restart callback by addressing the way the reset is handled
> > for the watchdog IP.
> >
> > I am dropping this patch, and I'll send out a series to address
> > the above concerns (which will tackle the issues with the restart
> > callback in a better way).
> >
> >
> > Thanks,
> > Fab
> >
> >
> > > From: Guenter Roeck <[email protected]> On Behalf Of Guenter Roeck
> > > Sent: 15 November 2022 13:28
> > > Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
> > >
> > > On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> > > > The setting for the RZ/V2M watchdog cannot be changed once
> > > > the watchdog has been enabled, unless the IP gets reset.
> > > > The current implementation of the restart callback assumes
> > > > that the watchdog is not enabled, but that's not always the
> > > > case, and it leads to longer than necessary reboot times if
> > > > the watchdog is already running.
> > > >
> > > > Always reset the RZ/V2M watchdog first, so that we can always
> > > > restart quickly.
> > > >
> > > > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> > > > Signed-off-by: Fabrizio Castro <[email protected]>
> > >
> > > Reviewed-by: Guenter Roeck <[email protected]>
> > >
> > > > ---
> > > > drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> > > > 1 file changed, 8 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/drivers/watchdog/rzg2l_wdt.c b/drivers/watchdog/rzg2l_wdt.c
> > > > index 974a4194a8fd..00438ceed17a 100644
> > > > --- a/drivers/watchdog/rzg2l_wdt.c
> > > > +++ b/drivers/watchdog/rzg2l_wdt.c
> > > > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct
> > > watchdog_device *wdev,
> > > > {
> > > > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
> > > >
> > > > - clk_prepare_enable(priv->pclk);
> > > > - clk_prepare_enable(priv->osc_clk);
> > > > -
> > > > if (priv->devtype == WDT_RZG2L) {
> > > > + clk_prepare_enable(priv->pclk);
> > > > + clk_prepare_enable(priv->osc_clk);
> > > > +
> > > > /* Generate Reset (WDTRSTB) Signal on parity error */
> > > > rzg2l_wdt_write(priv, 0, PECR);
> > > >
> > > > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct watchdog_device
> > > *wdev,
> > > > } else {
> > > > /* RZ/V2M doesn't have parity error registers */
> > > >
> > > > + reset_control_reset(priv->rstc);
> > > > +
> > > > + clk_prepare_enable(priv->pclk);
> > > > + clk_prepare_enable(priv->osc_clk);
> > > > +
> > > > wdev->timeout = 0;
> > > >
> > > > /* Initialize time out */
> > > > --
> > > > 2.34.1
> > > >

2023-05-09 08:22:25

by Fabrizio Castro

[permalink] [raw]
Subject: RE: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

Hi Wim,

Thanks for checking on this.

This patch was superseded by:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f769f97917c1e756e12ff042a93f6e3167254b5b

Therefore, the right thing to do is to get rid of this patch.

Thanks,
Fab

> From: Wim Van Sebroeck <[email protected]>
> Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
>
> Hi Fabrizio,
>
> Based on below e-mail I excluded this patch from the merge window.
> I saw that Guenter still has it in his branch.
> So can we have an update on this please?
>
> Thanks in advance,
> Wim.
>
> > Hi Geert and Guenter,
> >
> > Thank you for your reviews!
> >
> > As it turns out, the rzg2l_wdt driver has some reset related issues
> > (currently not addressed by the driver) for the RZ/V2M and RZ/Five
> > SoCs. More specifically to this patch, there is a better way to fix
> > the restart callback by addressing the way the reset is handled
> > for the watchdog IP.
> >
> > I am dropping this patch, and I'll send out a series to address
> > the above concerns (which will tackle the issues with the restart
> > callback in a better way).
> >
> >
> > Thanks,
> > Fab
> >
> >
> > > From: Guenter Roeck <[email protected]> On Behalf Of Guenter Roeck
> > > Sent: 15 November 2022 13:28
> > > Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for
> RZ/V2M
> > >
> > > On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> > > > The setting for the RZ/V2M watchdog cannot be changed once
> > > > the watchdog has been enabled, unless the IP gets reset.
> > > > The current implementation of the restart callback assumes
> > > > that the watchdog is not enabled, but that's not always the
> > > > case, and it leads to longer than necessary reboot times if
> > > > the watchdog is already running.
> > > >
> > > > Always reset the RZ/V2M watchdog first, so that we can always
> > > > restart quickly.
> > > >
> > > > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> > > > Signed-off-by: Fabrizio Castro <[email protected]>
> > >
> > > Reviewed-by: Guenter Roeck <[email protected]>
> > >
> > > > ---
> > > > drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> > > > 1 file changed, 8 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/drivers/watchdog/rzg2l_wdt.c
> b/drivers/watchdog/rzg2l_wdt.c
> > > > index 974a4194a8fd..00438ceed17a 100644
> > > > --- a/drivers/watchdog/rzg2l_wdt.c
> > > > +++ b/drivers/watchdog/rzg2l_wdt.c
> > > > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct
> > > watchdog_device *wdev,
> > > > {
> > > > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
> > > >
> > > > - clk_prepare_enable(priv->pclk);
> > > > - clk_prepare_enable(priv->osc_clk);
> > > > -
> > > > if (priv->devtype == WDT_RZG2L) {
> > > > + clk_prepare_enable(priv->pclk);
> > > > + clk_prepare_enable(priv->osc_clk);
> > > > +
> > > > /* Generate Reset (WDTRSTB) Signal on parity error */
> > > > rzg2l_wdt_write(priv, 0, PECR);
> > > >
> > > > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct
> watchdog_device
> > > *wdev,
> > > > } else {
> > > > /* RZ/V2M doesn't have parity error registers */
> > > >
> > > > + reset_control_reset(priv->rstc);
> > > > +
> > > > + clk_prepare_enable(priv->pclk);
> > > > + clk_prepare_enable(priv->osc_clk);
> > > > +
> > > > wdev->timeout = 0;
> > > >
> > > > /* Initialize time out */
> > > > --
> > > > 2.34.1
> > > >

2023-05-09 08:22:58

by Fabrizio Castro

[permalink] [raw]
Subject: RE: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M

Thanks Guenter.

Fab

> From: Guenter Roeck <[email protected]> On Behalf Of Guenter Roeck
> Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for RZ/V2M
>
> On Sun, May 07, 2023 at 05:36:25PM +0200, Wim Van Sebroeck wrote:
> > Hi Fabrizio,
> >
> > Based on below e-mail I excluded this patch from the merge window.
> > I saw that Guenter still has it in his branch.
>
> Thanks for the note. I'll drop it.
>
> Guenter
>
> > So can we have an update on this please?
> >
> > Thanks in advance,
> > Wim.
> >
> > > Hi Geert and Guenter,
> > >
> > > Thank you for your reviews!
> > >
> > > As it turns out, the rzg2l_wdt driver has some reset related
> issues
> > > (currently not addressed by the driver) for the RZ/V2M and RZ/Five
> > > SoCs. More specifically to this patch, there is a better way to
> fix
> > > the restart callback by addressing the way the reset is handled
> > > for the watchdog IP.
> > >
> > > I am dropping this patch, and I'll send out a series to address
> > > the above concerns (which will tackle the issues with the restart
> > > callback in a better way).
> > >
> > >
> > > Thanks,
> > > Fab
> > >
> > >
> > > > From: Guenter Roeck <[email protected]> On Behalf Of Guenter
> Roeck
> > > > Sent: 15 November 2022 13:28
> > > > Subject: Re: [PATCH 1/3] watchdog: rzg2l_wdt: Fix reboot for
> RZ/V2M
> > > >
> > > > On Thu, Nov 03, 2022 at 10:39:54PM +0000, Fabrizio Castro wrote:
> > > > > The setting for the RZ/V2M watchdog cannot be changed once
> > > > > the watchdog has been enabled, unless the IP gets reset.
> > > > > The current implementation of the restart callback assumes
> > > > > that the watchdog is not enabled, but that's not always the
> > > > > case, and it leads to longer than necessary reboot times if
> > > > > the watchdog is already running.
> > > > >
> > > > > Always reset the RZ/V2M watchdog first, so that we can always
> > > > > restart quickly.
> > > > >
> > > > > Fixes: ec122fd94eeb ("watchdog: rzg2l_wdt: Add rzv2m support")
> > > > > Signed-off-by: Fabrizio Castro
> <[email protected]>
> > > >
> > > > Reviewed-by: Guenter Roeck <[email protected]>
> > > >
> > > > > ---
> > > > > drivers/watchdog/rzg2l_wdt.c | 11 ++++++++---
> > > > > 1 file changed, 8 insertions(+), 3 deletions(-)
> > > > >
> > > > > diff --git a/drivers/watchdog/rzg2l_wdt.c
> b/drivers/watchdog/rzg2l_wdt.c
> > > > > index 974a4194a8fd..00438ceed17a 100644
> > > > > --- a/drivers/watchdog/rzg2l_wdt.c
> > > > > +++ b/drivers/watchdog/rzg2l_wdt.c
> > > > > @@ -145,10 +145,10 @@ static int rzg2l_wdt_restart(struct
> > > > watchdog_device *wdev,
> > > > > {
> > > > > struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev);
> > > > >
> > > > > - clk_prepare_enable(priv->pclk);
> > > > > - clk_prepare_enable(priv->osc_clk);
> > > > > -
> > > > > if (priv->devtype == WDT_RZG2L) {
> > > > > + clk_prepare_enable(priv->pclk);
> > > > > + clk_prepare_enable(priv->osc_clk);
> > > > > +
> > > > > /* Generate Reset (WDTRSTB) Signal on parity error */
> > > > > rzg2l_wdt_write(priv, 0, PECR);
> > > > >
> > > > > @@ -157,6 +157,11 @@ static int rzg2l_wdt_restart(struct
> watchdog_device
> > > > *wdev,
> > > > > } else {
> > > > > /* RZ/V2M doesn't have parity error registers */
> > > > >
> > > > > + reset_control_reset(priv->rstc);
> > > > > +
> > > > > + clk_prepare_enable(priv->pclk);
> > > > > + clk_prepare_enable(priv->osc_clk);
> > > > > +
> > > > > wdev->timeout = 0;
> > > > >
> > > > > /* Initialize time out */
> > > > > --
> > > > > 2.34.1
> > > > >