From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 21/33] clk: ux500: Add Device Tree support for the PRCC Kernel clock
Date: Tue, 11 Jun 2013 10:10:08 +0100 [thread overview]
Message-ID: <20130611091008.GA9216@laptop> (raw)
In-Reply-To: <CAPDyKFrKBCRficxThnPqTOP5UZp_6-EiJWXqC1MQa14+OdZ4zQ@mail.gmail.com>
> > This patch enables clocks to be specified from Device Tree via phandles
> > to the "prcc-kernel-clock" node.
> >
> > Cc: Mike Turquette <mturquette@linaro.org>
> > Cc: Ulf Hansson <ulf.hansson@linaro.org>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
>
> Could you please fold this patch into a "common PRCC device tree
> support" patch instead. Thus handling both P and K clocks in the same
> patch.
I'm really not a fan of creating massive patches, so I'd really rather
not.
> That would probaby solve the missmatch of the macro definitions as
> well. Like were did the PRCC_KCLK_STORE come from?
I do see your point though, I will move PRCC_KCLK_STORE() into this
patch.
> > ---
> > drivers/clk/ux500/u8500_clk.c | 30 ++++++++++++++++++++++++++++++
> > 1 file changed, 30 insertions(+)
> >
> > diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c
> > index 86de1a7..c3ed09c 100644
> > --- a/drivers/clk/ux500/u8500_clk.c
> > +++ b/drivers/clk/ux500/u8500_clk.c
> > @@ -20,6 +20,7 @@
> >
> > static struct clk *prcmu_clk[PRCMU_NUM_CLKS];
> > static struct clk *prcc_pclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER];
> > +static struct clk *prcc_kclk[(PRCC_NUM_PERIPH_CLUSTERS + 1) * PRCC_PERIPHS_PER_CLUSTER];
> >
> > #define PRCC_SHOW(clk, base, bit) \
> > clk[(base * PRCC_PERIPHS_PER_CLUSTER) + bit]
> > @@ -540,110 +541,136 @@ void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
> > clk = clk_reg_prcc_kclk("p1_uart0_kclk", "uartclk",
> > clkrst1_base, BIT(0), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "uart0");
> > + PRCC_KCLK_STORE(clk, 1, 0);
> >
> > clk = clk_reg_prcc_kclk("p1_uart1_kclk", "uartclk",
> > clkrst1_base, BIT(1), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "uart1");
> > + PRCC_KCLK_STORE(clk, 1, 1);
> >
> > clk = clk_reg_prcc_kclk("p1_i2c1_kclk", "i2cclk",
> > clkrst1_base, BIT(2), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "nmk-i2c.1");
> > + PRCC_KCLK_STORE(clk, 1, 2);
> >
> > clk = clk_reg_prcc_kclk("p1_msp0_kclk", "msp02clk",
> > clkrst1_base, BIT(3), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "msp0");
> > clk_register_clkdev(clk, NULL, "ux500-msp-i2s.0");
> > + PRCC_KCLK_STORE(clk, 1, 3);
> >
> > clk = clk_reg_prcc_kclk("p1_msp1_kclk", "msp1clk",
> > clkrst1_base, BIT(4), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "msp1");
> > clk_register_clkdev(clk, NULL, "ux500-msp-i2s.1");
> > + PRCC_KCLK_STORE(clk, 1, 4);
> >
> > clk = clk_reg_prcc_kclk("p1_sdi0_kclk", "sdmmcclk",
> > clkrst1_base, BIT(5), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "sdi0");
> > + PRCC_KCLK_STORE(clk, 1, 5);
> >
> > clk = clk_reg_prcc_kclk("p1_i2c2_kclk", "i2cclk",
> > clkrst1_base, BIT(6), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "nmk-i2c.2");
> > + PRCC_KCLK_STORE(clk, 1, 6);
> >
> > clk = clk_reg_prcc_kclk("p1_slimbus0_kclk", "slimclk",
> > clkrst1_base, BIT(8), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "slimbus0");
> > + PRCC_KCLK_STORE(clk, 1, 8);
> >
> > clk = clk_reg_prcc_kclk("p1_i2c4_kclk", "i2cclk",
> > clkrst1_base, BIT(9), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "nmk-i2c.4");
> > + PRCC_KCLK_STORE(clk, 1, 9);
> >
> > clk = clk_reg_prcc_kclk("p1_msp3_kclk", "msp1clk",
> > clkrst1_base, BIT(10), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "msp3");
> > clk_register_clkdev(clk, NULL, "ux500-msp-i2s.3");
> > + PRCC_KCLK_STORE(clk, 1, 10);
> >
> > /* Periph2 */
> > clk = clk_reg_prcc_kclk("p2_i2c3_kclk", "i2cclk",
> > clkrst2_base, BIT(0), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "nmk-i2c.3");
> > + PRCC_KCLK_STORE(clk, 2, 0);
> >
> > clk = clk_reg_prcc_kclk("p2_sdi4_kclk", "sdmmcclk",
> > clkrst2_base, BIT(2), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "sdi4");
> > + PRCC_KCLK_STORE(clk, 2, 2);
> >
> > clk = clk_reg_prcc_kclk("p2_msp2_kclk", "msp02clk",
> > clkrst2_base, BIT(3), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "msp2");
> > clk_register_clkdev(clk, NULL, "ux500-msp-i2s.2");
> > + PRCC_KCLK_STORE(clk, 2, 3);
> >
> > clk = clk_reg_prcc_kclk("p2_sdi1_kclk", "sdmmcclk",
> > clkrst2_base, BIT(4), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "sdi1");
> > + PRCC_KCLK_STORE(clk, 2, 4);
> >
> > clk = clk_reg_prcc_kclk("p2_sdi3_kclk", "sdmmcclk",
> > clkrst2_base, BIT(5), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "sdi3");
> > + PRCC_KCLK_STORE(clk, 2, 5);
> >
> > /* Note that rate is received from parent. */
> > clk = clk_reg_prcc_kclk("p2_ssirx_kclk", "hsirxclk",
> > clkrst2_base, BIT(6),
> > CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
> > + PRCC_KCLK_STORE(clk, 2, 6);
> > +
> > clk = clk_reg_prcc_kclk("p2_ssitx_kclk", "hsitxclk",
> > clkrst2_base, BIT(7),
> > CLK_SET_RATE_GATE|CLK_SET_RATE_PARENT);
> > + PRCC_KCLK_STORE(clk, 2, 7);
> >
> > /* Periph3 */
> > clk = clk_reg_prcc_kclk("p3_ssp0_kclk", "sspclk",
> > clkrst3_base, BIT(1), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "ssp0");
> > + PRCC_KCLK_STORE(clk, 3, 1);
> >
> > clk = clk_reg_prcc_kclk("p3_ssp1_kclk", "sspclk",
> > clkrst3_base, BIT(2), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "ssp1");
> > + PRCC_KCLK_STORE(clk, 3, 2);
> >
> > clk = clk_reg_prcc_kclk("p3_i2c0_kclk", "i2cclk",
> > clkrst3_base, BIT(3), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "nmk-i2c.0");
> > + PRCC_KCLK_STORE(clk, 3, 3);
> >
> > clk = clk_reg_prcc_kclk("p3_sdi2_kclk", "sdmmcclk",
> > clkrst3_base, BIT(4), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "sdi2");
> > + PRCC_KCLK_STORE(clk, 3, 4);
> >
> > clk = clk_reg_prcc_kclk("p3_ske_kclk", "rtc32k",
> > clkrst3_base, BIT(5), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "ske");
> > clk_register_clkdev(clk, NULL, "nmk-ske-keypad");
> > + PRCC_KCLK_STORE(clk, 3, 5);
> >
> > clk = clk_reg_prcc_kclk("p3_uart2_kclk", "uartclk",
> > clkrst3_base, BIT(6), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "uart2");
> > + PRCC_KCLK_STORE(clk, 3, 6);
> >
> > clk = clk_reg_prcc_kclk("p3_sdi5_kclk", "sdmmcclk",
> > clkrst3_base, BIT(7), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "sdi5");
> > + PRCC_KCLK_STORE(clk, 3, 7);
> >
> > /* Periph6 */
> > clk = clk_reg_prcc_kclk("p3_rng_kclk", "rngclk",
> > clkrst6_base, BIT(0), CLK_SET_RATE_GATE);
> > clk_register_clkdev(clk, NULL, "rng");
> > + PRCC_KCLK_STORE(clk, 6, 0);
> >
> > if (of_have_populated_dt())
> > np = of_find_matching_node(NULL, u8500_clk_of_match);
> > @@ -660,5 +687,8 @@ void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
> > }
> > if (!of_node_cmp(child->name, "prcc-periph-clock"))
> > of_clk_add_provider(child, ux500_twocell_get, prcc_pclk);
> > +
> > + if (!of_node_cmp(child->name, "prcc-kernel-clock"))
> > + of_clk_add_provider(child, ux500_twocell_get, prcc_kclk);
> > }
> > }
> >
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2013-06-11 9:10 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 12:16 [PATCH 00/32] ARM: ux500: Enable clocks for Device Tree Lee Jones
2013-06-06 12:16 ` [PATCH 01/33] mfd: dbx500-prcmu: Provide PRCMU numerical clock identifiers Lee Jones
2013-06-06 12:16 ` [PATCH 02/33] ARM: ux500: Add PRCMU clock node to DBx500 Device Tree Lee Jones
2013-06-06 12:16 ` [PATCH 03/33] ARM: ux500: Supply the DMA clock lookup to the DBX500 DT Lee Jones
2013-06-06 12:16 ` [PATCH 04/33] ARM: ux500: Add PRCC Peripheral clock node to DBx500 Device Tree Lee Jones
2013-06-06 12:16 ` [PATCH 05/33] ARM: ux500: Supply the GPIO clocks lookup to the DBX500 DT Lee Jones
2013-06-06 12:16 ` [PATCH 06/33] ARM: ux500: Supply the USB clock " Lee Jones
2013-06-06 12:16 ` [PATCH 07/33] ARM: ux500: Supply the Ethernet clock lookup to Snowball's DT Lee Jones
2013-06-06 12:16 ` [PATCH 08/33] ARM: ux500: Add PRCC Kernel clock node to DBx500 Device Tree Lee Jones
2013-06-06 12:16 ` [PATCH 09/33] ARM: ux500: Supply the I2C clocks lookup to the DBX500 DT Lee Jones
2013-08-20 9:11 ` Linus Walleij
2013-08-20 9:30 ` Sascha Hauer
2013-08-22 13:37 ` Mark Rutland
2013-08-22 13:49 ` Lee Jones
2013-08-22 14:19 ` Lee Jones
2013-08-22 15:17 ` Mark Rutland
2013-08-22 15:41 ` Lee Jones
2013-08-22 16:04 ` Mark Rutland
2013-08-22 21:19 ` Sascha Hauer
2013-08-23 7:56 ` Lee Jones
2013-08-23 16:55 ` Mark Rutland
2013-08-27 8:06 ` Lee Jones
2013-08-27 13:46 ` Mark Rutland
2013-08-27 14:08 ` Lee Jones
2013-08-27 15:51 ` Rob Herring
2013-08-27 16:15 ` Pawel Moll
2013-08-21 8:28 ` Lee Jones
2013-08-21 22:44 ` Linus Walleij
2013-08-22 9:23 ` Lee Jones
2013-06-06 12:16 ` [PATCH 10/33] ARM: ux500: Supply the UART " Lee Jones
2013-06-06 12:16 ` [PATCH 11/33] ARM: ux500: Supply the SDI (MMC) " Lee Jones
2013-06-06 12:17 ` [PATCH 12/33] ARM: ux500: Supply the MSP (Audio) " Lee Jones
2013-06-06 12:17 ` [PATCH 13/33] ARM: ux500: Add RTC (fixed-frequency) clock node to DBx500 Device Tree Lee Jones
2013-06-06 12:17 ` [PATCH 14/33] ARM: ux500: Supply the RTC clock lookup to the DBX500 DT Lee Jones
2013-06-06 12:17 ` [PATCH 15/33] ARM: ux500: Add TWD (fixed-factor) clock node to DBx500 Device Tree Lee Jones
2013-06-06 12:17 ` [PATCH 16/33] ARM: ux500: Supply the TWD Timer clock lookup to the DBX500 DT Lee Jones
2013-06-06 12:17 ` [PATCH 17/33] clk: ux500: Provide u8500_clk with skeleton Device Tree support Lee Jones
2013-06-06 12:17 ` [PATCH 18/33] clk: ux500: Add a 2-cell Device Tree parser for obtaining PRCC clocks Lee Jones
2013-06-10 20:54 ` Ulf Hansson
2013-06-11 9:12 ` Lee Jones
2013-06-11 11:07 ` [PATCH 18/33 v2] " Lee Jones
2013-06-06 12:17 ` [PATCH 19/33] clk: ux500: Add Device Tree support for the PRCMU clock Lee Jones
2013-06-10 21:19 ` Ulf Hansson
2013-06-11 11:10 ` Lee Jones
2013-06-11 11:12 ` Lee Jones
2013-08-21 8:23 ` Linus Walleij
2013-08-21 10:10 ` Lee Jones
2013-06-06 12:17 ` [PATCH 20/33] clk: ux500: Add Device Tree support for the PRCC Peripheral clock Lee Jones
2013-06-11 11:51 ` [PATCH 20/33 v2] " Lee Jones
2013-06-06 12:17 ` [PATCH 21/33] clk: ux500: Add Device Tree support for the PRCC Kernel clock Lee Jones
2013-06-10 21:24 ` Ulf Hansson
2013-06-11 9:10 ` Lee Jones [this message]
2013-06-11 11:09 ` [PATCH 21/33 v2] " Lee Jones
2013-06-12 14:46 ` Arnd Bergmann
2013-06-18 21:17 ` Mike Turquette
2013-06-19 7:42 ` Lee Jones
2013-06-21 18:20 ` Mike Turquette
2013-08-21 8:17 ` [PATCH 21/33] " Linus Walleij
2013-08-21 10:14 ` Lee Jones
2013-08-21 22:46 ` Linus Walleij
2013-08-22 9:21 ` Lee Jones
2013-08-23 18:01 ` Linus Walleij
2013-08-24 8:00 ` Arnd Bergmann
2013-08-24 21:19 ` Linus Walleij
2013-08-27 8:23 ` Lee Jones
2013-09-12 12:50 ` Linus Walleij
2013-09-12 14:56 ` Lee Jones
2013-09-13 7:20 ` Linus Walleij
2013-06-06 12:17 ` [PATCH 22/33] clk: ux500: Add Device Tree support for the RTC clock Lee Jones
2013-06-06 12:17 ` [PATCH 23/33] clk: ux500: Add Device Tree support for the TWD clock Lee Jones
2013-06-06 12:17 ` [PATCH 24/33] ARM: ux500: Remove AUXDATA relating to GPIO clock-name bindings Lee Jones
2013-06-06 12:17 ` [PATCH 25/33] ARM: ux500: Remove AUXDATA relating to UART " Lee Jones
2013-06-06 12:17 ` [PATCH 26/33] ARM: ux500: Remove AUXDATA relating to SDI (MMC) " Lee Jones
2013-08-23 13:31 ` Linus Walleij
2013-08-23 14:45 ` Lee Jones
2013-08-24 7:57 ` Arnd Bergmann
2013-08-27 8:11 ` Lee Jones
2013-06-06 12:17 ` [PATCH 27/33] ARM: ux500: Remove AUXDATA relating to I2C " Lee Jones
2013-06-06 12:17 ` [PATCH 28/33] ARM: ux500: Remove AUXDATA relating to MSP (Audio) " Lee Jones
2013-08-21 8:08 ` Linus Walleij
2013-08-21 8:17 ` Lee Jones
2013-06-06 12:17 ` [PATCH 29/33] ARM: ux500: Remove AUXDATA relating to USB " Lee Jones
2013-06-06 12:17 ` [PATCH 30/33] ARM: ux500: Remove AUXDATA relating to Ethernet " Lee Jones
2013-06-06 12:17 ` [PATCH 31/33] ARM: ux500: Remove AUXDATA relating to DMA " Lee Jones
2013-06-06 12:17 ` [PATCH 32/33] ARM: ux500: Reclassify PRCMU AUXDATA entry Lee Jones
2013-06-06 12:17 ` [PATCH 33/33] ARM: ux500: Remove SSP AUXDATA pertaining to DMA bindings Lee Jones
2013-06-12 13:27 ` [PATCH 00/32] ARM: ux500: Enable clocks for Device Tree Lee Jones
2013-06-13 8:41 ` Linus Walleij
2013-06-13 9:34 ` Lee Jones
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=20130611091008.GA9216@laptop \
--to=lee.jones@linaro.org \
--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).