public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
	Lukasz Majewski <lukma@denx.de>, Tom Rini <trini@konsulko.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH 2/2] clk: renesas: Do not disable realtime modules on R8A77995 D3
Date: Sun, 28 Dec 2025 09:13:08 +0100	[thread overview]
Message-ID: <20251228081308.GC1315338@ragnatech.se> (raw)
In-Reply-To: <a0c985d7-9a8e-4820-89d1-5f491247869e@mailbox.org>

On 2025-12-28 03:04:35 +0100, Marek Vasut wrote:
> On 12/28/25 2:03 AM, Niklas Söderlund wrote:
> > Later versions of the datasheet makes it clear D3 do not have any
> > realtime module stop control registers (RMSTPCRx). Remove the
> > manipulation of them from the module clock table to match this.
> > 
> > Suggested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> >   drivers/clk/renesas/r8a77995-cpg-mssr.c | 24 ++++++++++++------------
> >   1 file changed, 12 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/clk/renesas/r8a77995-cpg-mssr.c b/drivers/clk/renesas/r8a77995-cpg-mssr.c
> > index 0a59a19cb227..736812e04d0b 100644
> > --- a/drivers/clk/renesas/r8a77995-cpg-mssr.c
> > +++ b/drivers/clk/renesas/r8a77995-cpg-mssr.c
> > @@ -216,18 +216,18 @@ static const struct rcar_gen3_cpg_pll_config cpg_pll_configs[2] __initconst = {
> >   };
> >   static const struct mstp_stop_table r8a77995_mstp_table[] = {
> > -	{ 0x00210000, 0x0, 0x00210000, 0 },
> > -	{ 0x03e01000, 0x0, 0x03e01000, 0 },
> > -	{ 0x000e2fdc, 0x2000, 0x000e2fd8, 0 },
> > -	{ 0xc00014df, 0x400, 0xc00014df, 0 },
> > -	{ 0x80000004, 0x0, 0x80000004, 0 },
> > -	{ 0x40d20004, 0x0, 0x40d20004, 0 },
> > -	{ 0x08c0008c, 0x0, 0x08c0008c, 0 },
> > -	{ 0x09941c18, 0x0, 0x09941c18, 0 },
> > -	{ 0x00801087, 0x0, 0x00801087, 0 },
> > -	{ 0xf143dfc0, 0x0, 0xf143dfc0, 0 },
> > -	{ 0x063e1820, 0x0, 0x063e1820, 0 },
> > -	{ 0x00000000, 0x0, 0x00000000, 0 },
> > +	{ 0x00210000, 0x0, 0, 0 },
> > +	{ 0x03e01000, 0x0, 0, 0 },
> > +	{ 0x000e2fdc, 0x2000, 0, 0 },
> > +	{ 0xc00014df, 0x400, 0, 0 },
> > +	{ 0x80000004, 0x0, 0, 0 },
> > +	{ 0x40d20004, 0x0, 0, 0 },
> > +	{ 0x08c0008c, 0x0, 0, 0 },
> > +	{ 0x09941c18, 0x0, 0, 0 },
> > +	{ 0x00801087, 0x0, 0, 0 },
> > +	{ 0xf143dfc0, 0x0, 0, 0 },
> > +	{ 0x063e1820, 0x0, 0, 0 },
> > +	{ 0x00000000, 0x0, 0, 0 },
> >   };
> >   static const void *r8a77995_get_pll_config(const u32 cpg_mode)
> 
> You likely also need this part to avoid any RMSTPCR access:

Indeed, thanks! I will respin when we agree about the bits in 1/2.

> 
> diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c
> b/drivers/clk/renesas/renesas-cpg-mssr.c
> index 39ff4541c1e..4b07dbb3277 100644
> --- a/drivers/clk/renesas/renesas-cpg-mssr.c
> +++ b/drivers/clk/renesas/renesas-cpg-mssr.c
> @@ -127,7 +127,8 @@ int renesas_clk_remove(void __iomem *base, struct
> cpg_mssr_info *info)
>                                 info->mstp_table[i].sdis,
>                                 info->mstp_table[i].sen);
> 
> -               if (info->reg_layout == CLK_REG_LAYOUT_RCAR_GEN4)
> +               if (info->reg_layout == CLK_REG_LAYOUT_RCAR_GEN4 ||
> +                   renesas_get_cpu_type() == RENESAS_CPU_TYPE_R8A77995)
>                         continue;
> 
>                 clrsetbits_le32(base + RMSTPCR(i),

-- 
Kind Regards,
Niklas Söderlund

      reply	other threads:[~2025-12-28 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28  1:03 [PATCH 0/2] clk: renesas: Fix booting Linux on R8A77995 D3 Niklas Söderlund
2025-12-28  1:03 ` [PATCH 1/2] clk: renesas: Do not enable MSTP4 modules " Niklas Söderlund
2025-12-28  2:03   ` Marek Vasut
2025-12-28  8:12     ` Niklas Söderlund
2025-12-28 20:01       ` Marek Vasut
2025-12-28  1:03 ` [PATCH 2/2] clk: renesas: Do not disable realtime " Niklas Söderlund
2025-12-28  2:04   ` Marek Vasut
2025-12-28  8:13     ` Niklas Söderlund [this message]

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=20251228081308.GC1315338@ragnatech.se \
    --to=niklas.soderlund+renesas@ragnatech.se \
    --cc=iwamatsu@nigauri.org \
    --cc=lukma@denx.de \
    --cc=marek.vasut@mailbox.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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