All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: tomm.merciai@gmail.com, linux-renesas-soc@vger.kernel.org,
	biju.das.jz@bp.renesas.com,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] clk: renesas: rzg2l: Re-assert reset on deassert timeout
Date: Tue, 2 Sep 2025 16:25:56 +0200	[thread overview]
Message-ID: <aLb-dAiVgFk1LsXR@tom-desktop> (raw)
In-Reply-To: <CAMuHMdXUm4c0RSQ=pOz9dC7cuHA2STJaQ_d4ded9-rw3orcyGA@mail.gmail.com>

Hi Geert,

On Tue, Sep 02, 2025 at 04:16:12PM +0200, Geert Uytterhoeven wrote:
> Hi Tommaso,
> 
> On Tue, 2 Sept 2025 at 15:51, Tommaso Merciai
> <tommaso.merciai.xr@bp.renesas.com> wrote:
> > On Tue, Sep 02, 2025 at 02:18:17PM +0200, Geert Uytterhoeven wrote:
> > > On Wed, 20 Aug 2025 at 12:05, Tommaso Merciai
> > > <tommaso.merciai.xr@bp.renesas.com> wrote:
> > > > Prevent issues during reset deassertion by re-asserting the reset if a
> > > > timeout occurs when trying to deassert. This ensures the reset line is in a
> > > > known state and improves reliability for hardware that may not immediately
> > > > clear the reset monitor bit.
> > > >
> > > > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > >
> > > > --- a/drivers/clk/renesas/rzg2l-cpg.c
> > > > +++ b/drivers/clk/renesas/rzg2l-cpg.c
> > > > @@ -1667,9 +1667,16 @@ static int __rzg2l_cpg_assert(struct reset_controller_dev *rcdev,
> > > >                 return 0;
> > > >         }
> > > >
> > > > -       return readl_poll_timeout_atomic(priv->base + reg, value,
> > > > -                                        assert ? (value & mask) : !(value & mask),
> > > > -                                        10, 200);
> > > > +       ret = readl_poll_timeout_atomic(priv->base + reg, value,
> > > > +                                       assert ? (value & mask) : !(value & mask),
> > > > +                                       10, 200);
> > > > +       if (ret && !assert) {
> > > > +               dev_warn(rcdev->dev, "deassert timeout, re-asserting reset id %ld\n", id);
> > > > +               value = mask << 16;
> > > > +               writel(value, priv->base + CLK_RST_R(info->resets[id].off));
> > > > +       }
> > >
> > > Is this an issue you've seen during actual use?
> > > Would it make sense to print warnings on assertion timeouts, too?
> >
> > I haven’t observed any assertion timeout issues during actual use,
> > so maybe printing warnings on assertion may not be necessary.
> > What do you think?
> 
> Have you seen deassertion timeouts?

I haven’t seen any deassertion timeouts either.

> I would rather not print a warning.  The error code would be propagated
> up anyway.

If for you is ok.
I will drop dev_warn() on both:

	- __rzg2l_cpg_assert()
	- __rzv2h_cpg_assert()

in v2.
Please gently le me know.

Thanks & Regards,
Tommaso

> 
> 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
> 

  reply	other threads:[~2025-09-02 14:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 10:04 [PATCH 0/4] dmaengine: sh: rz-dmac: Add runtime PM support Tommaso Merciai
2025-08-20 10:04 ` [PATCH 1/4] clk: renesas: rzg2l: Simplify rzg2l_cpg_assert() and rzg2l_cpg_deassert() Tommaso Merciai
2025-09-02 12:12   ` Geert Uytterhoeven
2025-09-02 13:15     ` Tommaso Merciai
2025-08-20 10:04 ` [PATCH 2/4] clk: renesas: rzg2l: Re-assert reset on deassert timeout Tommaso Merciai
2025-09-02 12:18   ` Geert Uytterhoeven
2025-09-02 13:51     ` Tommaso Merciai
2025-09-02 14:16       ` Geert Uytterhoeven
2025-09-02 14:25         ` Tommaso Merciai [this message]
2025-09-02 17:00           ` Geert Uytterhoeven
2025-08-20 10:04 ` [PATCH 3/4] clk: renesas: rzv2h: " Tommaso Merciai
2025-09-02 12:19   ` Geert Uytterhoeven
2025-09-02 13:54     ` Tommaso Merciai
2025-08-20 10:04 ` [PATCH 4/4] dmaengine: sh: rz-dmac: Add runtime PM support Tommaso Merciai

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=aLb-dAiVgFk1LsXR@tom-desktop \
    --to=tommaso.merciai.xr@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=tomm.merciai@gmail.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.