[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <834da7dc-bb5d-3427-43e5-938e40a2d180@loongson.cn>
Date: Wed, 22 Feb 2023 13:10:14 +0800
From: zhuyinbo <zhuyinbo@...ngson.cn>
To: Stephen Boyd <sboyd@...nel.org>,
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
Subject: Re: [PATCH v10 2/4] clk: clk-loongson2: add clock controller driver
support
在 2023/2/22 上午10:02, zhuyinbo 写道:
>
> 在 2023/2/22 上午7:07, Stephen Boyd 写道:
>> Quoting zhuyinbo (2023-02-19 21:44:51)
>>> 在 2023/2/18 上午6:15, Stephen Boyd 写道:
>>>> Quoting zhuyinbo (2023-02-14 23:35:22)
>>>>> 在 2023/2/11 上午7:42, Stephen Boyd 写道:
>>>>>>> +
>>>>>>> +err:
>>>>>>> + iounmap(loongson2_pll_base);
>>>>>>> +}
>>>>>>> +
>>>>>>> +CLK_OF_DECLARE(loongson2_clk, "loongson,ls2k-clk",
>>>>>>> loongson2_clocks_init);
>>>>>> Any reason this can't be a platform driver?
>>> Your question is that why I don't use the platform_driver_register to
>>> register clk and use CLK_OF_DECLARE ?
>> Yes.
>>
>>> I was consider other clock controllers of Loongson-2 series may be
>>> different with 2k1000 and I can add a line
>>>
>>> CLK_OF_DECLARE() for compatible other platform in the future. eg.
>>>
>>> CLK_OF_DECLARE(loongson2_clk, "loongson,ls2k-clk",
>>> loongson2_clocks_init);
>>>
>>> + CLK_OF_DECLARE(xxx1, xxx2, xxx3); // for other clock
>>> controllers of
>>> Loongson-2 series
>>>
>>>>> For the compatible consideration of other clock controllers of
>>>>> Loongson-2 series in the future, the way of using dts can be
>>>>>
>>>>> better compatible.
>>>>>
>>>> Sorry that sentence doesn't make sense to me. The use of dts doesn't
>>>> require the use of CLK_OF_DECLARE.
>>> 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.
Powered by blists - more mailing lists