From: Simon Horman <horms@verge.net.au> To: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 01/20] clk: shmobile: r8a7779: Add clocks support Date: Wed, 26 Feb 2014 08:59:21 +0000 [thread overview] Message-ID: <20140226085921.GD7720@verge.net.au> (raw) In-Reply-To: <CAMuHMdUy6uj5vJ125Edp8g5NNxcWbG5wmD-j_gp=GgzXYAUAEw@mail.gmail.com> On Wed, Feb 26, 2014 at 09:05:05AM +0100, Geert Uytterhoeven wrote: > On Wed, Feb 26, 2014 at 8:33 AM, Simon Horman > <horms+renesas@verge.net.au> wrote: > > +++ b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt > > @@ -0,0 +1,26 @@ > > +* Renesas R8A7779 Clock Pulse Generator (CPG) > > + > > +The CPG generates core clocks for the R8A7779. It includes one PLL and > > +and several fixed ratio dividers > > Double "and" > > > +++ b/drivers/clk/shmobile/clk-r8a7779.c > > > +/* > > + * MD1 = 1 MD1 = 0 > > + * (PLLA = 1500) (PLLA = 1600) > > + * (MHz) (MHz) > > + *------------------------------------------------+-------------------- > > + * clkz 1000 (2/3) 800 (1/2) > > + * clkzs 250 (1/6) 200 (1/8) > > + * clki 750 (1/2) 800 (1/2) > > + * clks 250 (1/6) 200 (1/8) > > + * clks1 125 (1/12) 100 (1/16) > > + * clks3 187.5 (1/8) 200 (1/8) > > + * clks4 93.7 (1/16) 100 (1/16) > > + * clkp 62.5 (1/24) 50 (1/32) > > + * clkg 62.5 (1/24) 66.6 (1/24) > > + * clkb, CLKOUT > > + * (MD2 = 0) 62.5 (1/24) 66.6 (1/24) > > + * (MD2 = 1) 41.6 (1/36) 50 (1/32) > > + */ > > + > > +#define CPG_CLK_CONFIG_INDEX(md) (((md) & (BIT(1)|BIT(2))) >> 1) > > + > > +struct cpg_clk_config { > > + unsigned int z_mult; > > + unsigned int z_div; > > + unsigned int zs_and_s_div; > > + unsigned int s1_div; > > + unsigned int p_div; > > + unsigned int out_div; > > +}; > > + > > +static const struct cpg_clk_config cpg_clk_configs[4] __initconst = { > > + { 1, 2, 8, 16, 32, 24 }, > > + { 1, 2, 8, 16, 32, 24 }, > > + { 2, 3, 6, 12, 24, 36 }, > > + { 2, 3, 6, 12, 24, 32 }, > > +}; > > Shouldn't this be > > +static const struct cpg_clk_config cpg_clk_configs[4] __initconst = { > + { 1, 2, 8, 16, 32, 24 }, > + { 2, 3, 6, 12, 24, 24 }, > + { 1, 2, 8, 16, 32, 32 }, > + { 2, 3, 6, 12, 24, 36 }, > +}; > > ? > > I think you got confused by writing the bitmask as "BIT(1)|BIT(2)" instead > of "BIT(2)|BIT(1)". Probably, thanks for noticing. > > +/* > > + * MD PLLA Ratio > > + * 12 11 > > + *------------------------ > > + * 0 0 x42 > > + * 0 1 x48 > > + * 1 0 x56 > > + * 1 1 x64 > > + */ > > +#define CPG_PLL_CONFIG_INDEX(md) ((((md) & BIT(14)) >> 12) | \ > > + (((md) & BIT(13)) >> 12) | \ > > + (((md) & BIT(19)) >> 19)) > > +struct cpg_pll_config { > > + unsigned int extal_div; > > + unsigned int pll1_mult; > > + unsigned int pll3_mult; > > +}; > > CPG_PLL_CONFIG_INDEX() and struct cpg_pll_config are unused, and > disrupt the reading experience for the casual reviewer, as they split the > section about MD12 and M11 in two. > > > + > > +#define CPG_PLLA_MULT_INDEX(md) (((md) & (BIT(12)|BIT(11))) >> 11) Thanks, I will remove them.
WARNING: multiple messages have this Message-ID (diff)
From: horms@verge.net.au (Simon Horman) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 01/20] clk: shmobile: r8a7779: Add clocks support Date: Wed, 26 Feb 2014 17:59:21 +0900 [thread overview] Message-ID: <20140226085921.GD7720@verge.net.au> (raw) In-Reply-To: <CAMuHMdUy6uj5vJ125Edp8g5NNxcWbG5wmD-j_gp=GgzXYAUAEw@mail.gmail.com> On Wed, Feb 26, 2014 at 09:05:05AM +0100, Geert Uytterhoeven wrote: > On Wed, Feb 26, 2014 at 8:33 AM, Simon Horman > <horms+renesas@verge.net.au> wrote: > > +++ b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt > > @@ -0,0 +1,26 @@ > > +* Renesas R8A7779 Clock Pulse Generator (CPG) > > + > > +The CPG generates core clocks for the R8A7779. It includes one PLL and > > +and several fixed ratio dividers > > Double "and" > > > +++ b/drivers/clk/shmobile/clk-r8a7779.c > > > +/* > > + * MD1 = 1 MD1 = 0 > > + * (PLLA = 1500) (PLLA = 1600) > > + * (MHz) (MHz) > > + *------------------------------------------------+-------------------- > > + * clkz 1000 (2/3) 800 (1/2) > > + * clkzs 250 (1/6) 200 (1/8) > > + * clki 750 (1/2) 800 (1/2) > > + * clks 250 (1/6) 200 (1/8) > > + * clks1 125 (1/12) 100 (1/16) > > + * clks3 187.5 (1/8) 200 (1/8) > > + * clks4 93.7 (1/16) 100 (1/16) > > + * clkp 62.5 (1/24) 50 (1/32) > > + * clkg 62.5 (1/24) 66.6 (1/24) > > + * clkb, CLKOUT > > + * (MD2 = 0) 62.5 (1/24) 66.6 (1/24) > > + * (MD2 = 1) 41.6 (1/36) 50 (1/32) > > + */ > > + > > +#define CPG_CLK_CONFIG_INDEX(md) (((md) & (BIT(1)|BIT(2))) >> 1) > > + > > +struct cpg_clk_config { > > + unsigned int z_mult; > > + unsigned int z_div; > > + unsigned int zs_and_s_div; > > + unsigned int s1_div; > > + unsigned int p_div; > > + unsigned int out_div; > > +}; > > + > > +static const struct cpg_clk_config cpg_clk_configs[4] __initconst = { > > + { 1, 2, 8, 16, 32, 24 }, > > + { 1, 2, 8, 16, 32, 24 }, > > + { 2, 3, 6, 12, 24, 36 }, > > + { 2, 3, 6, 12, 24, 32 }, > > +}; > > Shouldn't this be > > +static const struct cpg_clk_config cpg_clk_configs[4] __initconst = { > + { 1, 2, 8, 16, 32, 24 }, > + { 2, 3, 6, 12, 24, 24 }, > + { 1, 2, 8, 16, 32, 32 }, > + { 2, 3, 6, 12, 24, 36 }, > +}; > > ? > > I think you got confused by writing the bitmask as "BIT(1)|BIT(2)" instead > of "BIT(2)|BIT(1)". Probably, thanks for noticing. > > +/* > > + * MD PLLA Ratio > > + * 12 11 > > + *------------------------ > > + * 0 0 x42 > > + * 0 1 x48 > > + * 1 0 x56 > > + * 1 1 x64 > > + */ > > +#define CPG_PLL_CONFIG_INDEX(md) ((((md) & BIT(14)) >> 12) | \ > > + (((md) & BIT(13)) >> 12) | \ > > + (((md) & BIT(19)) >> 19)) > > +struct cpg_pll_config { > > + unsigned int extal_div; > > + unsigned int pll1_mult; > > + unsigned int pll3_mult; > > +}; > > CPG_PLL_CONFIG_INDEX() and struct cpg_pll_config are unused, and > disrupt the reading experience for the casual reviewer, as they split the > section about MD12 and M11 in two. > > > + > > +#define CPG_PLLA_MULT_INDEX(md) (((md) & (BIT(12)|BIT(11))) >> 11) Thanks, I will remove them.
next prev parent reply other threads:[~2014-02-26 8:59 UTC|newest] Thread overview: 118+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-02-26 7:33 [PATCH v3 00/20] ARM: shmobile: r8a7779, marzen: CCF and multiplatform Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 01/20] clk: shmobile: r8a7779: Add clocks support Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 8:05 ` Geert Uytterhoeven 2014-02-26 8:05 ` Geert Uytterhoeven 2014-02-26 8:59 ` Simon Horman [this message] 2014-02-26 8:59 ` Simon Horman 2014-02-26 9:06 ` Geert Uytterhoeven 2014-02-26 9:06 ` Geert Uytterhoeven 2014-02-28 1:35 ` Simon Horman 2014-02-28 1:35 ` Simon Horman 2014-02-26 12:53 ` Laurent Pinchart 2014-02-26 12:53 ` Laurent Pinchart 2014-02-26 13:02 ` Laurent Pinchart 2014-02-26 13:02 ` Laurent Pinchart 2014-03-12 7:55 ` Simon Horman 2014-03-12 7:55 ` Simon Horman 2014-03-12 10:12 ` Laurent Pinchart 2014-03-12 10:12 ` Laurent Pinchart 2014-03-13 2:22 ` Simon Horman 2014-03-13 2:22 ` Simon Horman 2014-03-13 9:07 ` Laurent Pinchart 2014-03-13 9:07 ` Laurent Pinchart 2014-03-14 0:38 ` Simon Horman 2014-03-14 0:38 ` Simon Horman 2014-03-01 13:50 ` Wolfram Sang 2014-03-01 13:50 ` Wolfram Sang 2014-03-01 17:33 ` Geert Uytterhoeven 2014-03-01 17:33 ` Geert Uytterhoeven 2014-03-02 11:35 ` Laurent Pinchart 2014-03-02 11:35 ` Laurent Pinchart 2014-03-02 11:51 ` Geert Uytterhoeven 2014-03-02 11:51 ` Geert Uytterhoeven 2014-03-02 11:59 ` Wolfram Sang 2014-03-02 11:59 ` Wolfram Sang 2014-02-26 7:33 ` [PATCH v3 02/20] clk: shmobile: r8a7779: Add MSTP clock support Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 12:53 ` Laurent Pinchart 2014-02-26 12:53 ` Laurent Pinchart 2014-02-26 7:33 ` [PATCH v3 03/20] ARM: shmobile: r8a7779: Add clock index macros for DT sources Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 12:56 ` Laurent Pinchart 2014-02-26 12:56 ` Laurent Pinchart 2014-02-26 7:33 ` [PATCH v3 04/20] ARM: shmobile: r8a7779: Add clocks Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 8:13 ` Geert Uytterhoeven 2014-02-26 8:13 ` Geert Uytterhoeven 2014-02-26 8:55 ` Simon Horman 2014-02-26 8:55 ` Simon Horman 2014-02-26 13:15 ` Laurent Pinchart 2014-02-26 13:15 ` Laurent Pinchart 2014-03-12 8:40 ` Simon Horman 2014-03-12 8:40 ` Simon Horman 2014-02-26 14:45 ` Laurent Pinchart 2014-02-26 14:45 ` Laurent Pinchart 2014-03-12 8:43 ` Simon Horman 2014-03-12 8:43 ` Simon Horman 2014-03-01 14:29 ` Wolfram Sang 2014-03-01 14:29 ` Wolfram Sang 2014-02-26 7:33 ` [PATCH v3 05/20] ARM: shmobile: Sync Marzen DTS with Marzen reference DTS Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 13:17 ` Laurent Pinchart 2014-02-26 13:17 ` Laurent Pinchart 2014-02-26 7:33 ` [PATCH v3 06/20] ARM: shmobile: marzen: Specify external clock frequency in DT Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 13:19 ` Laurent Pinchart 2014-02-26 13:19 ` Laurent Pinchart 2014-02-26 7:33 ` [PATCH v3 07/20] ARM: shmobile: marzen: Reference clocks Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 13:20 ` Laurent Pinchart 2014-02-26 13:20 ` Laurent Pinchart 2014-02-26 14:23 ` Sergei Shtylyov 2014-02-26 15:23 ` Sergei Shtylyov 2014-03-13 0:09 ` Simon Horman 2014-03-13 0:09 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 08/20] ARM: shmobile: r8a7779: " Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 13:21 ` Laurent Pinchart 2014-02-26 13:21 ` Laurent Pinchart 2014-02-26 7:33 ` [PATCH v3 09/20] ARM: shmobile: r8a7779: Add helper to read mode pins Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 10/20] ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 11/20] ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board Simon Horman 2014-02-26 7:33 ` [PATCH v3 11/20] ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board code Simon Horman 2014-02-26 7:33 ` [PATCH v3 12/20] ARM: shmobile: r8a7779: Do not include sh_clk.h in r8a7779.h Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 13/20] ARM: shmobile: r8a7779: Initial multiplatform support Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 14/20] ARM: shmobile: marzen-reference: Initialize CPG device Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 13:22 ` Laurent Pinchart 2014-02-26 13:22 ` Laurent Pinchart 2014-02-26 7:33 ` [PATCH v3 15/20] ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and TMU Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 8:29 ` Geert Uytterhoeven 2014-02-26 8:29 ` Geert Uytterhoeven 2014-02-26 8:56 ` Simon Horman 2014-02-26 8:56 ` Simon Horman 2014-02-26 13:24 ` Laurent Pinchart 2014-02-26 13:24 ` Laurent Pinchart 2014-03-13 0:03 ` Simon Horman 2014-03-13 0:03 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 16/20] ARM: shmobile: marzen: Add to shmobile defconfig Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 17/20] ARM: shmobile: Remove non-multiplatform Marzen reference support Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 18/20] ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 19/20] ARM: shmobile: Remove Marzen reference DTS Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 7:33 ` [PATCH v3 20/20] ARM: shmobile: marzen-reference: Remove legacy clock support Simon Horman 2014-02-26 7:33 ` Simon Horman 2014-02-26 8:33 ` Geert Uytterhoeven 2014-02-26 8:33 ` Geert Uytterhoeven 2014-02-26 8:57 ` Simon Horman 2014-02-26 8:57 ` Simon Horman
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=20140226085921.GD7720@verge.net.au \ --to=horms@verge.net.au \ --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: linkBe 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.