From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v3 4/6] clk: renesas: rzv2h: Switch MSTOP configuration to per-bit basis
Date: Tue, 7 Jan 2025 13:51:17 +0100 [thread overview]
Message-ID: <CAMuHMdWTAipDd1rkRdrDAJdtFQ59E2M_WP+31OfVYJk-eZFsSA@mail.gmail.com> (raw)
In-Reply-To: <CA+V-a8uekQ=_KyTnm4vOg+DVXfXm5q9BrEb4Ms1k+je7a9aiDw@mail.gmail.com>
Hi Prabhakar,
On Tue, Jan 7, 2025 at 1:44 PM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> On Tue, Jan 7, 2025 at 12:38 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > > On Tue, Jan 7, 2025 at 12:25 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > > > > On Tue, Jan 7, 2025 at 11:24 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > > > > > From: Prabhakar <prabhakar.csengg@gmail.com>
> > > > > > > Switch MSTOP handling from group-based to per-bit configuration
> > > > > > > to address issues with shared dependencies between module
> > > > > > > clocks. In the current group-based configuration, multiple
> > > > > > > module clocks may rely on a single MSTOP bit. When both clocks
> > > > > > > are turned ON and one is subsequently turned OFF, the shared
> > > > > > > MSTOP bit will still be set, which is incorrect since the
> > > > > other dependent module clock remains ON.
> > > > > >
> > > > > > I guess this statement is incorrect. Still in group-based, mstop
> > > > > > bit is controlled by usage
> > > > > count(ref_cnt).
> > > > > >
> > > > > It is valid, consider an example say IP-A reuiqres MSTOP bits 8 | 9
> > > > > |
> > > > > 10 and consider IP-B requires MSTOP bits 10 | 11 | 12 (of the same
> > > > > MSTOP register say MSTOP1). Now this will be seperate groups having
> > > > > separate count(ref_cnt). Say you turn ON IP-A module clock and
> > > > > correspondingly clear the MSTOP bits and similarly now lets turn ON
> > > > > module clocks for IP-B and clear the MSTOP bits. Now let's say you
> > > > > want to turn OFF IP-A so you turn OFF module clock and set the MSTOP bits 8 | 9 | 10. In this case
> > > you will now see issues with IP-B as MSTOP BIT(10) has been set when we turned OFF IP-A block. This
> > > case is handled by switching refcount on per mstop bit by this patch.
> > > >
> > > > Consider another use case, index 0, bit 8| index 0, bit9| index0, bit10 and index 0, bit8 | index1,
> > > bit 0 | index1 10 is addressed in current patch series?
> > > >
> > > Can you please elaborate, the above isn't clear to me.
> >
> > I just provide a random example for a future IP, where
> >
> > IP_A requires mstop1 {8,9,10}
> > And
> > IP_B requires mstop1 {8} and mstop2 {9, 10}
> >
> No, this case is not handled by the patch series.
>
> > Note: I haven't seen this scenario in hardware manual.
> >
> Yes, neither do I. For this case we will have to re-work the
> BUS_MSTOP() macro. Let me know if we want this case to be handled.
> I'll create a new patch on top of this series.
-EPROBE_DEFER. I.e. fix it when the need arises (if ever)...
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
next prev parent reply other threads:[~2025-01-07 12:51 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 18:18 [PATCH v3 0/6] Fix MSTOP handling and add SYS/GIC clock entries for RZ/V2H(P) SoC Prabhakar
2025-01-02 18:18 ` [PATCH v3 1/6] clk: renesas: rzv2h: Fix use-after-free in MSTOP refcount handling Prabhakar
2025-01-02 18:18 ` [PATCH v3 2/6] clk: renesas: rzv2h: Relocate MSTOP-related macros to the family driver Prabhakar
2025-01-02 18:18 ` [PATCH v3 3/6] clk: renesas: rzv2h: Simplify BUS_MSTOP macros and field extraction Prabhakar
2025-01-03 2:21 ` kernel test robot
2025-01-03 10:03 ` Lad, Prabhakar
2025-01-03 10:42 ` kernel test robot
2025-01-03 17:07 ` Geert Uytterhoeven
2025-01-04 8:16 ` Lad, Prabhakar
2025-01-02 18:18 ` [PATCH v3 4/6] clk: renesas: rzv2h: Switch MSTOP configuration to per-bit basis Prabhakar
2025-01-03 17:06 ` Geert Uytterhoeven
2025-01-07 11:24 ` Biju Das
2025-01-07 11:45 ` Lad, Prabhakar
2025-01-07 12:25 ` Biju Das
2025-01-07 12:31 ` Lad, Prabhakar
2025-01-07 12:38 ` Biju Das
2025-01-07 12:44 ` Lad, Prabhakar
2025-01-07 12:50 ` Biju Das
2025-01-07 12:51 ` Geert Uytterhoeven [this message]
2025-01-07 12:49 ` Geert Uytterhoeven
2025-01-07 12:51 ` Biju Das
2025-01-02 18:18 ` [PATCH v3 5/6] clk: renesas: r9a09g057: Add reset entry for SYS Prabhakar
2025-01-03 15:57 ` Geert Uytterhoeven
2025-01-02 18:18 ` [PATCH v3 6/6] clk: renesas: r9a09g057: Add clock and reset entries for GIC Prabhakar
2025-01-03 15:58 ` Geert Uytterhoeven
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=CAMuHMdWTAipDd1rkRdrDAJdtFQ59E2M_WP+31OfVYJk-eZFsSA@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=fabrizio.castro.jz@renesas.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=sboyd@kernel.org \
/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