All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch v2 0/2] Add Xilinx clock wizard driver support
@ 2021-04-29  9:31 Zhengxun Li
  2021-04-29  9:31 ` [Patch v2 1/2] clk: zynq: Add clock wizard driver Zhengxun Li
  2021-04-29  9:31 ` [Patch v2 2/2] board: Add Zynq Mxic picozed development board support Zhengxun Li
  0 siblings, 2 replies; 8+ messages in thread
From: Zhengxun Li @ 2021-04-29  9:31 UTC (permalink / raw)
  To: u-boot

This series add support to enable clock wizard for zynq platform.

Changes in v2:
- naming is aligned with linux
- delete inappropriate description and code

Zhengxun Li (2):
  clk: zynq: Add clock wizard driver
  board: Add Zynq Mxic picozed development board support

 arch/arm/dts/Makefile               |   3 +-
 arch/arm/dts/zynq-mxic-picozed.dts  |  72 +++++++++++++++++
 drivers/clk/Kconfig                 |   9 +++
 drivers/clk/Makefile                |   1 +
 drivers/clk/clk-xlnx-clock-wizard.c | 152 ++++++++++++++++++++++++++++++++++++
 5 files changed, 236 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/zynq-mxic-picozed.dts
 create mode 100644 drivers/clk/clk-xlnx-clock-wizard.c

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [Patch v2 1/2] clk: zynq: Add clock wizard driver
@ 2021-05-07 17:08 Zhengxun Li
  0 siblings, 0 replies; 8+ messages in thread
From: Zhengxun Li @ 2021-05-07 17:08 UTC (permalink / raw)
  To: u-boot

Hi Michal,

> Hi,
>
> snip.
>
>>>> +
>>>> +   priv->base = (void __iomem *)addr;
>>>
>>> But this assignment should be done in probe where you copy data from
>>> plat structures to priv structures.
>>
>> Do you mean priv->base = (void __iomem *)plat->addr?
>
> yes.
>
>
>>>> +
>>>> +   clk_in1 = dev_read_u32_default(dev, "clock-frequency", 0);
>>>
>>> This is not the part of DT binding. You should be able to get that
>>> frequencies via clock framework.
>>
>> Can you provide some hints about this? I am new to clock driver.
>
> You should look at drivers/serial/serial_zynq.c where you can find out
> clk_get_by_index(), clk_get_rate(), clk_enable()
>
> That clk_get_rate() is the function you should use to get that frequency.

Thanks for your help.

> snip.
>
>>
>>>> +   { /* sentinel */ }
>>>> +};
>>>> +
>>>> +U_BOOT_DRIVER(clk_wzrd) = {
>>>> +   .name = "zynq-clk-wizard",
>>>> +   .id = UCLASS_CLK,
>>>> +   .of_match = clk_wzrd_ids,
>>>> +   .ops = &clk_wzrd_ops,
>>>> +   .probe = clk_wzrd_probe,
>>>> +   .of_to_plat = clk_wzrd_of_to_plat,
>>>> +   .priv_auto = sizeof(struct clkwzd),
>>>
>>> you need to get memory for .plat_auto here.
>>
>> Okay.
>>
>> On the other hand, if we want to add set_phase feature to clock wizard,
>> can you make some suggestions? I checked the clk-uclass and it does not
>> seem to be supported.
>
> Then you have to add it to uclass first but don't know content here.

Okay.

I switched my email account, I hope the declarement didn't offend you.

Thanks,
Zhengxun

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-07 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29  9:31 [Patch v2 0/2] Add Xilinx clock wizard driver support Zhengxun Li
2021-04-29  9:31 ` [Patch v2 1/2] clk: zynq: Add clock wizard driver Zhengxun Li
2021-04-29 10:17   ` Michal Simek
2021-05-07  8:07     ` zhengxunli at mxic.com.tw
2021-05-07  8:18       ` Michal Simek
2021-04-29  9:31 ` [Patch v2 2/2] board: Add Zynq Mxic picozed development board support Zhengxun Li
2021-04-29 10:05   ` Michal Simek
2021-05-07 17:08 [Patch v2 1/2] clk: zynq: Add clock wizard driver Zhengxun Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.