Messages in this thread | | | Subject | Re: [PATCH v3] clk: starfive: jh7100: Use clk_hw for external input clocks | From | Stephen Boyd <> | Date | Sun, 07 Apr 2024 19:45:01 -0700 |
| |
Quoting Geert Uytterhoeven (2024-03-29 05:16:58) > The Starfive JH7100 clock driver does not use the DT "clocks" property > to find the external main input clock, but instead relies on the name of > the actual clock provider ("osc_sys"). This is fragile, and caused > breakage when sanitizing clock node names in DTS. > > Fix this by obtaining the external main input clock using > devm_clk_get(), and passing the returned clk_hw object to > devm_clk_hw_register_fixed_factor_parent_hw(). > > While name-based look-up of the other external input clocks works as-is, > convert them to a similar clk_hw-based scheme to increase uniformity, > and to decrease the number of (multiple identical) name-based look-ups.
Why can't we use index based lookups and clk_parent_data? We don't want clk providers to call clk consumer APIs.
> > Fixes: f03606470886 ("riscv: dts: starfive: replace underscores in node names") > Fixes: 4210be668a09ee20 ("clk: starfive: Add JH7100 clock generator driver") > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > Reviewed-by: Samuel Holland <samuel.holland@sifive.com> > --- > After this is applied, the workaround in commit 7921e231f85a349d > ("riscv: dts: starfive: jh7100: fix root clock names") can be reverted. >
| |