From: hl <hl@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 05/12] rockchip: rk3036: Add clock driver
Date: Fri, 23 Oct 2015 08:56:21 +0800 [thread overview]
Message-ID: <562985B5.2030909@rock-chips.com> (raw)
In-Reply-To: <CAPnjgZ1jfg1OdKFUFRGtX45orJD-wxTzVUTr5ssL9nFGTcLo_Q@mail.gmail.com>
Hi Simon,
On 22/10/15 22:07, Simon Glass wrote:
> Hi Lin,
>
> On 20 October 2015 at 20:37, Lin Huang <hl@rock-chips.com> wrote:
>> Add a driver for setting up and modifying the various PLLs, peripheral
>> clocks and mmc clocks on RK3036
>>
>> Signed-off-by: Lin Huang <hl@rock-chips.com>
>> ---
>> Changes in v1:
>> - clean copyright announcement
>>
>> arch/arm/include/asm/arch-rockchip/cru_rk3036.h | 53 +++
>> drivers/clk/Makefile | 1 +
>> drivers/clk/clk_rk3036.c | 522 ++++++++++++++++++++++++
>> 3 files changed, 576 insertions(+)
>> create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3036.h
>> create mode 100644 drivers/clk/clk_rk3036.c
>>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> Please see nit below.
>
>> +static int rkclk_set_pll(struct rk3036_cru *cru, enum rk_clk_id clk_id,
>> + const struct pll_div *div)
>> +{
>> + int pll_id = rk_pll_id(clk_id);
>> + struct rk3036_pll *pll = &cru->pll[pll_id];
>> +
>> + /* All PLLs have same VCO and output frequency range restrictions. */
>> + uint vco_hz = OSC_HZ / 1000 * div->fbdiv / div->refdiv * 1000;
>> + uint output_hz = vco_hz / div->postdiv1 / div->postdiv2;
>> +
>> + debug("PLL at %p: fbdiv=%d, refdiv=%d, postdiv1=%d, postdiv2=%d,\
>> + vco=%u Hz, output=%u Hz\n",
>> + pll, div->fbdiv, div->refdiv, div->postdiv1,
>> + div->postdiv2, vco_hz, output_hz);
>> + assert(vco_hz >= VCO_MIN_HZ && vco_hz <= VCO_MAX_HZ &&
>> + output_hz >= OUTPUT_MIN_HZ && output_hz <= OUTPUT_MAX_HZ);
>> +
>> + /* use interger mode */
> Should that be integer? What does it mean?
In the rk3036 TRM, you can see:
>
>
>
--
Lin Huang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfdecfjf.png
Type: image/png
Size: 64226 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151023/8ec85220/attachment.png>
next prev parent reply other threads:[~2015-10-23 0:56 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 2:37 [U-Boot] [PATCH v1 00/12] Bring up rk3036 uboot Lin Huang
2015-10-21 2:37 ` [U-Boot] [PATCH v1 01/12] rockchip: define SUPPORT_SPL and SPL config in RK3288 config Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-22 16:01 ` Eddie Cai
2015-10-22 16:30 ` Simon Glass
2015-10-23 0:54 ` Eddie Cai
2015-10-23 1:04 ` Simon Glass
2015-10-23 1:21 ` hl
2015-10-26 4:12 ` Simon Glass
2015-10-27 0:27 ` hl
2015-10-27 19:03 ` Simon Glass
2015-10-23 0:50 ` hl
2015-10-23 0:54 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 02/12] rockchip: implement rockchip timer init function Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 03/12] rockchip: serial driver support rk3036 Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-23 0:51 ` hl
2015-10-21 2:37 ` [U-Boot] [PATCH v1 04/12] rockchip: Bring in RK3036 device tree file includes and bindings Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 05/12] rockchip: rk3036: Add clock driver Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-23 0:56 ` hl [this message]
2015-10-21 2:37 ` [U-Boot] [PATCH v1 06/12] rockchip: rk3036: Add header files for GRF Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 07/12] rockchip: rk3036: Add Soc reset driver Lin Huang
2015-10-22 14:07 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 08/12] rockchip: rk3036: Add a simple syscon driver Lin Huang
2015-10-22 14:08 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 09/12] rockchip: rk3036: Add pinctrl driver Lin Huang
2015-10-22 14:08 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 10/12] rockchip: Add an rk3036 MMC driver Lin Huang
2015-10-22 14:08 ` Simon Glass
2015-10-23 1:03 ` hl
2015-10-21 2:37 ` [U-Boot] [PATCH v1 11/12] rockchip: rk3036: Add core Soc start-up code Lin Huang
2015-10-22 14:08 ` Simon Glass
2015-10-21 2:37 ` [U-Boot] [PATCH v1 12/12] rockchip: Add basic support for evb-rk3036 board Lin Huang
2015-10-22 14:08 ` Simon Glass
2015-10-23 1:27 ` hl
2015-10-23 1:34 ` Simon Glass
2015-10-23 2:50 ` hl
2015-10-23 2:53 ` Simon Glass
-- strict thread matches above, loose matches on Subject: below --
2015-10-21 5:37 [U-Boot] [PATCH v1 00/12] Bring up rk3036 uboot Lin Huang
2015-10-21 5:37 ` [U-Boot] [PATCH v1 05/12] rockchip: rk3036: Add clock driver Lin Huang
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=562985B5.2030909@rock-chips.com \
--to=hl@rock-chips.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.