[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_fyvYse83Fj1IIK@tom-desktop>
Date: Thu, 10 Apr 2025 18:33:01 +0200
From: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: tomm.merciai@...il.com, linux-renesas-soc@...r.kernel.org,
biju.das.jz@...renesas.com, Pavel Machek <pavel@...x.de>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Magnus Damm <magnus.damm@...il.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>,
linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] clk: renesas: rzv2h: Simplify
rzv2h_cpg_assert()/rzv2h_cpg_deassert()
Hi Geert,
Thanks for your review.
On Thu, Apr 10, 2025 at 06:25:13PM +0200, Geert Uytterhoeven wrote:
> Hi Tommaso,
>
> On Mon, 17 Mar 2025 at 09:33, Tommaso Merciai
> <tommaso.merciai.xr@...renesas.com> wrote:
> > rzv2h_cpg_assert() and rzv2h_cpg_deassert() functions are similar. Share
> > this code via __rzv2h_cpg_assert(). This avoid code duplication.
> >
> > Reported-by: Pavel Machek <pavel@...x.de>
> > Closes: https://lore.kernel.org/cip-dev/Z9QA9rwuXCuVbOXp@duo.ucw.cz/
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@...renesas.com>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
> i.e. will queue in renesas-clk for v6.16.
>
> > --- a/drivers/clk/renesas/rzv2h-cpg.c
> > +++ b/drivers/clk/renesas/rzv2h-cpg.c
> > @@ -652,16 +652,17 @@ rzv2h_cpg_register_mod_clk(const struct rzv2h_mod_clk *mod,
> > mod->name, PTR_ERR(clk));
> > }
> >
> > -static int rzv2h_cpg_assert(struct reset_controller_dev *rcdev,
> > - unsigned long id)
> > +static int __rzv2h_cpg_assert(struct reset_controller_dev *rcdev,
> > + unsigned long id, bool assert)
> > {
> > struct rzv2h_cpg_priv *priv = rcdev_to_priv(rcdev);
> > unsigned int reg = GET_RST_OFFSET(priv->resets[id].reset_index);
> > u32 mask = BIT(priv->resets[id].reset_bit);
> > u8 monbit = priv->resets[id].mon_bit;
> > - u32 value = mask << 16;
> > + u32 value = assert ? (mask << 16) : ((mask << 16) | mask);
>
> Do you mind if I change this to
>
> u32 value = mask << 16;
>
> if (!assert)
> value |= mask;
>
> while applying?
Fine to me, thanks.
Regards,
Tommaso
>
> >
> > - dev_dbg(rcdev->dev, "assert id:%ld offset:0x%x\n", id, reg);
> > + dev_dbg(rcdev->dev, "%s id:%ld offset:0x%x\n",
> > + assert ? "assert" : "deassert", id, reg);
> >
> > writel(value, priv->base + reg);
> >
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists