Re: [PATCH] clk: renesas: mstp: Add genpd OF provider at postcore_initcall()
From: Geert Uytterhoeven
Date: Wed Aug 13 2025 - 07:26:58 EST
Hi Ulf,
On Wed, 13 Aug 2025 at 13:18, Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote:
> On Wed, 13 Aug 2025 at 10:20, Geert Uytterhoeven
> <geert+renesas@xxxxxxxxx> wrote:
> > Genpd OF providers must now be registered after genpd bus registration.
> > However, cpg_mstp_add_clk_domain() is only called from CLK_OF_DECLARE(),
> > which is too early. Hence on R-Car M1A, R-Car H1, and RZ/A1, the
> > CPG/MSTP Clock Domain fails to register, and any devices residing in
> > that clock domain fail to probe.
> >
> > Fix this by splitting initialization into two steps:
> > - The first part keeps on registering the PM domain with genpd at
> > CLK_OF_DECLARE(),
> > - The second and new part moves the registration of the genpd OF
> > provider to a postcore_initcall().
> >
> > See also commit c5ae5a0c61120d0c ("pmdomain: renesas: rcar-sysc: Add
> > genpd OF provider at postcore_initcall").
> >
> > Fixes: 18a3a510ecfd0e50 ("pmdomain: core: Add the genpd->dev to the genpd provider bus")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> I assume there is a good reason to have one early part and one later
> part for the OF provider registration, otherwise we might as well do
> all the genpd registration at postcore_initcall, right?
Doing that requires migrating all clock drivers that provide a clock
domain from CLK_OF_DECLARE() to postcore_initcall() and/or platform
drivers.
> In any case, please add:
> Reviewed-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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