[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19ce51bd94685e2bed6cbc20467e5705.sboyd@kernel.org>
Date: Fri, 24 Feb 2023 11:10:14 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Huacai Chen <chenhuacai@...nel.org>,
Jianmin Lv <lvjianmin@...ngson.cn>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
Rob Herring <robh+dt@...nel.org>,
WANG Xuerui <kernel@...0n.name>,
Yang Li <yang.lee@...ux.alibaba.com>,
devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, liupeibao@...ngson.cn,
loongarch@...ts.linux.dev, wanghongliang@...ngson.cn,
zhuyinbo <zhuyinbo@...ngson.cn>
Subject: Re: [PATCH v10 2/4] clk: clk-loongson2: add clock controller driver support
Quoting zhuyinbo (2023-02-22 18:16:49)
>
> 在 2023/2/23 上午5:00, Stephen Boyd 写道:
> > Quoting zhuyinbo (2023-02-21 21:10:14)
> >>>>> yes, the use of dts doesn't require the use of CLK_OF_DECLARE and can
> >>>>> 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.
> >>>> of_clk_init() is there to register clks that are needed for early init,
> >>>> i.e. the clockevent/clocksource or the root interrupt controller
> >>>> (irqchip). Otherwise, it isn't necessary to register clks via
> >>>> of_clk_init().
> >>> okay, I got it.
> >> and, the time driver get clock by CCF that ask loongson2 clock driver
> >> 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.
> >>
> > If you have a time driver that gets clks, register those early with
> > CLK_OF_DECLARE_DRIVER() and then have a platform driver for the rest of
> > the clk tree that registers clks later.
>
> okay, I got it. and this series patch I will use platform driver.
> later, if the loongson2 time driver use the
>
> CLK_OF_DECLARE style I will make a alone time clk driver for it that
> use CLK_OF_DECLARE_DRIVER()
>
It can be the same file if you want. But then it can't be a module. Up
to you what you want to do there.
Powered by blists - more mailing lists