From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 04/11] ARM i.MX6q: Add audio/video PLL post dividers for i.MX6q rev 1.1
Date: Thu, 28 Mar 2013 16:22:18 +0100 [thread overview]
Message-ID: <1364484138.4018.65.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <20130328144258.GB699@S2101-09.ap.freescale.net>
Am Donnerstag, den 28.03.2013, 22:43 +0800 schrieb Shawn Guo:
> On Thu, Mar 28, 2013 at 10:58:00AM +0100, Philipp Zabel wrote:
> > In the loops in _get_table_maxdiv(), _get_table_div(), and
> > _get_table_val(), in drivers/clk/clk-divider.c the exit condition
> > is .div == 0, so there needs to be a sentinel with .div = 0 at the end
> > of each clk_div_table. It's also documented in the kerneldoc comment for
> > clk_register_divider_table.
>
> Ah, I do not know that. So clk_enet_ref_table is actually buggy?
Yes. For some reason I thought that for 2 bit dividers, the code would
stop after four entries, but that is not true. The clk_enet_ref_table is
missing the final { .div = 0 } entry.
> > I can write that as "{ }", like this:
> >
> > static struct clk_div_table test_div_table[] = {
> > { .val = 2, .div = 1 },
> > { .val = 1, .div = 2 },
> > { .val = 0, .div = 4 },
> > { }
> > };
> >
> Yes, that's much better for reading. But to be consistent with
> clk_enet_ref_table, please also put a comma after .div.
I'll do that.
> > static struct clk_div_table control3_table[] = {
> > { .val = 0, .div = 1 },
> > { .val = 1, .div = 2 },
> > { .val = 3, .div = 4 },
> > { }
> > };
> >
> Per Reference Manual, we should have one more entry below?
>
> { .val = 2, .div = 1, }
Ok. The clock code will always choose val=0, but in the unlikely case
that some boot code writes val=2 before starting Linux, at least we can
detect it correctly.
> ...
>
> > Because I didn't realize that the names were fixed in the final
> > documentation. I'll rename pll[45]_test_div to pll[45]_post_div.
> > pll5_control3 should be renamed to pll5_video_div, I guess.
>
> Yea, that's much easier for users to map code and document.
regards
Philipp
next prev parent reply other threads:[~2013-03-28 15:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 17:30 [PATCH v2 0/11] LVDS Display Bridge support for i.MX Philipp Zabel
2013-03-27 17:30 ` [PATCH v2 01/11] staging: drm/imx: Add LDB support Philipp Zabel
2013-03-27 18:40 ` Martin Fuzzey
2013-03-28 10:06 ` Philipp Zabel
2013-03-28 6:08 ` Shawn Guo
2013-03-28 9:58 ` Philipp Zabel
2013-03-27 17:30 ` [PATCH v2 02/11] ARM i.MX5: Move IPU clock lookups into device tree Philipp Zabel
2013-03-28 7:04 ` Shawn Guo
2013-03-27 17:30 ` [PATCH v2 03/11] ARM i.MX6q: export imx6q_revision Philipp Zabel
2013-03-28 7:04 ` Shawn Guo
2013-03-27 17:30 ` [PATCH v2 04/11] ARM i.MX6q: Add audio/video PLL post dividers for i.MX6q rev 1.1 Philipp Zabel
2013-03-28 7:20 ` Shawn Guo
2013-03-28 9:58 ` Philipp Zabel
2013-03-28 14:43 ` Shawn Guo
2013-03-28 15:22 ` Philipp Zabel [this message]
2013-03-27 17:30 ` [PATCH v2 05/11] ARM i.MX6q: set the LDB serial clock parent to the video PLL Philipp Zabel
2013-03-27 17:30 ` [PATCH v2 06/11] ARM i.MX: Add imx_clk_divider_flags and imx_clk_mux_flags Philipp Zabel
2013-03-28 7:39 ` Shawn Guo
2013-03-27 17:30 ` [PATCH v2 07/11] ARM i.MX53: fix ldb di divider and selector clocks Philipp Zabel
2013-03-28 7:40 ` Shawn Guo
2013-03-27 17:30 ` [PATCH v2 08/11] ARM i.MX6q: " Philipp Zabel
2013-03-28 7:40 ` Shawn Guo
2013-03-27 17:30 ` [PATCH v2 09/11] ARM i.MX53: Add IOMUXC GPR to device tree Philipp Zabel
2013-03-27 17:30 ` [PATCH v2 10/11] ARM i.MX53: Add LDB device " Philipp Zabel
2013-03-27 18:43 ` Martin Fuzzey
2013-03-28 7:32 ` Shawn Guo
2013-03-28 8:41 ` Martin Fuzzey
2013-03-28 9:58 ` Philipp Zabel
2013-03-27 17:30 ` [PATCH v2 11/11] ARM i.MX6q: " Philipp Zabel
2013-03-28 7:51 ` Shawn Guo
2013-03-28 9:58 ` Philipp Zabel
2013-03-28 14:50 ` Shawn Guo
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=1364484138.4018.65.camel@pizza.hi.pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).