All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
@ 2016-02-09 18:47 slemieux.tyco
  2016-02-09 18:57 ` Stephen Boyd
  0 siblings, 1 reply; 8+ messages in thread
From: slemieux.tyco @ 2016-02-09 18:47 UTC (permalink / raw)
  To: robh+dt, sboyd, mturquette; +Cc: stigge, vz, devicetree, linux-clk

From: Sylvain Lemieux <slemieux@tycoint.com>

This patch add the support to setup the clock frequency output
using an optional parameter from the device tree.

The previous kernel version did not change the clock frequency
output setup by the kickstart and/or bootloader;
this version always setup the clock frequency output to 208MHz.

Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
 drivers/clk/nxp/clk-lpc32xx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/nxp/clk-lpc32xx.c b/drivers/clk/nxp/clk-lpc32xx.c
index 981ff0d..3ab4481 100644
--- a/drivers/clk/nxp/clk-lpc32xx.c
+++ b/drivers/clk/nxp/clk-lpc32xx.c
@@ -1525,9 +1525,12 @@ static void __init lpc32xx_clk_init(struct device_node *np)
 	}
 
 	of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+	if (of_property_read_u32(np, "xtal,clock-output-frequency", &i))
+		/* use default value (208MHz) */
+		i = 208000000;
 
 	/* For 13MHz osc valid output range of PLL is from 156MHz to 266.5MHz */
-	clk_set_rate(clk[LPC32XX_CLK_HCLK_PLL], 208000000);
+	clk_set_rate(clk[LPC32XX_CLK_HCLK_PLL], i);
 
 	/* Set 48MHz rate of USB PLL clock */
 	clk_set_rate(clk[LPC32XX_CLK_USB_PLL], 48000000);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
  2016-02-09 18:47 [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration slemieux.tyco
@ 2016-02-09 18:57 ` Stephen Boyd
  2016-02-09 20:00     ` Sylvain Lemieux
  2016-02-09 20:07     ` Sylvain Lemieux
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Boyd @ 2016-02-09 18:57 UTC (permalink / raw)
  To: slemieux.tyco; +Cc: robh+dt, mturquette, stigge, vz, devicetree, linux-clk

On 02/09, slemieux.tyco@gmail.com wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
> 
> This patch add the support to setup the clock frequency output
> using an optional parameter from the device tree.
> 
> The previous kernel version did not change the clock frequency
> output setup by the kickstart and/or bootloader;
> this version always setup the clock frequency output to 208MHz.
> 
> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> ---

We have assigned-clock-rates, can you use that instead?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
  2016-02-09 18:57 ` Stephen Boyd
@ 2016-02-09 20:00     ` Sylvain Lemieux
  2016-02-09 20:07     ` Sylvain Lemieux
  1 sibling, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-02-09 20:00 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: robh+dt, mturquette, stigge, vz, devicetree, linux-clk

On Tue, 2016-02-09 at 10:57 -0800, Stephen Boyd wrote:
> On 02/09, slemieux.tyco@gmail.com wrote:
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> > 
> > This patch add the support to setup the clock frequency output
> > using an optional parameter from the device tree.
> > 
> > The previous kernel version did not change the clock frequency
> > output setup by the kickstart and/or bootloader;
> > this version always setup the clock frequency output to 208MHz.
> > 
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> > ---
> 
> We have assigned-clock-rates, can you use that instead?
> 
I will submit a version 2 with this change tomorrow.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
@ 2016-02-09 20:00     ` Sylvain Lemieux
  0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-02-09 20:00 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: robh+dt, mturquette, stigge, vz, devicetree, linux-clk

On Tue, 2016-02-09 at 10:57 -0800, Stephen Boyd wrote:
> On 02/09, slemieux.tyco@gmail.com wrote:
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> > 
> > This patch add the support to setup the clock frequency output
> > using an optional parameter from the device tree.
> > 
> > The previous kernel version did not change the clock frequency
> > output setup by the kickstart and/or bootloader;
> > this version always setup the clock frequency output to 208MHz.
> > 
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> > ---
> 
> We have assigned-clock-rates, can you use that instead?
> 
I will submit a version 2 with this change tomorrow.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
  2016-02-09 18:57 ` Stephen Boyd
@ 2016-02-09 20:07     ` Sylvain Lemieux
  2016-02-09 20:07     ` Sylvain Lemieux
  1 sibling, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-02-09 20:07 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: robh+dt, mturquette, stigge, vz, devicetree, linux-clk

On Tue, 2016-02-09 at 10:57 -0800, Stephen Boyd wrote:
> On 02/09, slemieux.tyco@gmail.com wrote:
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> > 
> > This patch add the support to setup the clock frequency output
> > using an optional parameter from the device tree.
> > 
> > The previous kernel version did not change the clock frequency
> > output setup by the kickstart and/or bootloader;
> > this version always setup the clock frequency output to 208MHz.
> > 
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> > ---
> 
> We have assigned-clock-rates, can you use that instead?
> 
OK, I will submit a new version of the patch tomorrow.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
@ 2016-02-09 20:07     ` Sylvain Lemieux
  0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-02-09 20:07 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: robh+dt, mturquette, stigge, vz, devicetree, linux-clk

On Tue, 2016-02-09 at 10:57 -0800, Stephen Boyd wrote:
> On 02/09, slemieux.tyco@gmail.com wrote:
> > From: Sylvain Lemieux <slemieux@tycoint.com>
> > 
> > This patch add the support to setup the clock frequency output
> > using an optional parameter from the device tree.
> > 
> > The previous kernel version did not change the clock frequency
> > output setup by the kickstart and/or bootloader;
> > this version always setup the clock frequency output to 208MHz.
> > 
> > Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> > ---
> 
> We have assigned-clock-rates, can you use that instead?
> 
OK, I will submit a new version of the patch tomorrow.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
  2016-02-09 20:07     ` Sylvain Lemieux
  (?)
@ 2016-02-10  0:00     ` Vladimir Zapolskiy
  2016-02-10 17:33       ` Sylvain Lemieux
  -1 siblings, 1 reply; 8+ messages in thread
From: Vladimir Zapolskiy @ 2016-02-10  0:00 UTC (permalink / raw)
  To: Sylvain Lemieux, Stephen Boyd
  Cc: robh+dt, mturquette, stigge, devicetree, linux-clk

Hi Sylvain,

On 09.02.2016 22:07, Sylvain Lemieux wrote:
> On Tue, 2016-02-09 at 10:57 -0800, Stephen Boyd wrote:
>> On 02/09, slemieux.tyco@gmail.com wrote:
>>> From: Sylvain Lemieux <slemieux@tycoint.com>
>>>
>>> This patch add the support to setup the clock frequency output
>>> using an optional parameter from the device tree.
>>>
>>> The previous kernel version did not change the clock frequency
>>> output setup by the kickstart and/or bootloader;
>>> this version always setup the clock frequency output to 208MHz.

ok, it makes perfect sense, and here I see two options, one is to recover
the previous behaviour by removing clk_set_rate() of LPC32XX_CLK_HCLK_PLL
completely, another one (and more preferable) is to add this clock
to a list in include/dt-bindings/clock/lpc32xx-clock.h and set its
rate in a board specific DTB file.

>>> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
>>> ---
>>
>> We have assigned-clock-rates, can you use that instead?
>>
> OK, I will submit a new version of the patch tomorrow.
> 

By the way if you have a cover letter or 2/2 patch in the series,
please send it to linux-clk as well.

--
With best wishes,
Vladimir

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration
  2016-02-10  0:00     ` Vladimir Zapolskiy
@ 2016-02-10 17:33       ` Sylvain Lemieux
  0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2016-02-10 17:33 UTC (permalink / raw)
  To: Vladimir Zapolskiy
  Cc: Stephen Boyd, robh+dt, mturquette, stigge, devicetree, linux-clk

Hi Vladimir

On Wed, 2016-02-10 at 02:00 +0200, Vladimir Zapolskiy wrote:
> Hi Sylvain,
> 
> On 09.02.2016 22:07, Sylvain Lemieux wrote:
> > On Tue, 2016-02-09 at 10:57 -0800, Stephen Boyd wrote:
> >> On 02/09, slemieux.tyco@gmail.com wrote:
> >>> From: Sylvain Lemieux <slemieux@tycoint.com>
> >>>
> >>> This patch add the support to setup the clock frequency output
> >>> using an optional parameter from the device tree.
> >>>
> >>> The previous kernel version did not change the clock frequency
> >>> output setup by the kickstart and/or bootloader;
> >>> this version always setup the clock frequency output to 208MHz.
> 
> ok, it makes perfect sense, and here I see two options, one is to recover
> the previous behaviour by removing clk_set_rate() of LPC32XX_CLK_HCLK_PLL
> completely, another one (and more preferable) is to add this clock
> to a list in include/dt-bindings/clock/lpc32xx-clock.h and set its
> rate in a board specific DTB file.

I will submit a version 2 of this patch later today using the
second option.

> 
> >>> Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
> >>> ---
> >>
> >> We have assigned-clock-rates, can you use that instead?
> >>
> > OK, I will submit a new version of the patch tomorrow.
> > 
> 
> By the way if you have a cover letter or 2/2 patch in the series,
> please send it to linux-clk as well.

The was no cover letter for this series (trivial change).

The patch 2/2 was submitted to the "linux-clk" mailling list
(http://thread.gmane.org/gmane.linux.kernel.clk/3911).

> 
> --
> With best wishes,
> Vladimir

Sylvain Lemieux



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-10 17:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 18:47 [PATCH 1/2] clk: lpc32xx: add clock frequency output configuration slemieux.tyco
2016-02-09 18:57 ` Stephen Boyd
2016-02-09 20:00   ` Sylvain Lemieux
2016-02-09 20:00     ` Sylvain Lemieux
2016-02-09 20:07   ` Sylvain Lemieux
2016-02-09 20:07     ` Sylvain Lemieux
2016-02-10  0:00     ` Vladimir Zapolskiy
2016-02-10 17:33       ` Sylvain Lemieux

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.