All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [Patch v2 1/2] clk: zynq: Add clock wizard driver
Date: Fri, 7 May 2021 10:18:50 +0200	[thread overview]
Message-ID: <98efa6ba-7ff2-fe4a-f07d-1ea1e2077254@xilinx.com> (raw)
In-Reply-To: <OF0A3A8B77.97A13E3B-ON482586CE.000FB70C-482586CE.002CA8B4@mxic.com.tw>

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.

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.

> 
> Thanks,
> Zhengxun
> 
> 
> CONFIDENTIALITY NOTE:
> 
> This e-mail and any attachments may contain confidential information 
> and/or personal data, which is protected by applicable laws. Please be 
> reminded that duplication, disclosure, distribution, or use of this e-mail 
> (and/or its attachments) or any part thereof is prohibited. If you receive 
> this e-mail in error, please notify us immediately and delete this mail as 
> well as its attachment(s) from your system. In addition, please be 
> informed that collection, processing, and/or use of personal data is 
> prohibited unless expressly permitted by personal data protection laws. 
> Thank you for your attention and cooperation.
> 
> Macronix International Co., Ltd.
> 
> =====================================================================
> 
> 
> 
> ============================================================================
> 
> CONFIDENTIALITY NOTE:
> 
> This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as its attachment(s) from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation.
> 
> Macronix International Co., Ltd.
> 
> =====================================================================

And get rid of these. Next time I won't reply to this email. Sorry.

Thanks,
Michal

  reply	other threads:[~2021-05-07  8:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98efa6ba-7ff2-fe4a-f07d-1ea1e2077254@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.