Quoting zhuyinbo (2023-02-21 21:10:14)
If you have a time driver that gets clks, register those early withand, the time driver get clock by CCF that ask loongson2 clock driverokay, I got it.yes, the use of dts doesn't require the use of CLK_OF_DECLARE and canof_clk_init() is there to register clks that are needed for early init,
use platform_driver_register
but my drvier not use platform_driver_register to register clk and use
CLK_OF_DECLARE to match of_clk_init.
i.e. the clockevent/clocksource or the root interrupt controller
(irqchip). Otherwise, it isn't necessary to register clks via
of_clk_init().
use CLK_OF_DECLARE
to match of_clk_init. because the timer_probe is very early and the
timer driver was use TIMER_OF_DECLARE
to match time_probe.
CLK_OF_DECLARE_DRIVER() and then have a platform driver for the rest of
the clk tree that registers clks later.