linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz
@ 2016-06-29  8:45 Guodong Xu
  2016-06-29  8:45 ` [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz Guodong Xu
  2016-07-06 22:23 ` [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz Michael Turquette
  0 siblings, 2 replies; 8+ messages in thread
From: Guodong Xu @ 2016-06-29  8:45 UTC (permalink / raw)
  To: mturquette, sboyd, jorge.ramirez-ortiz, xinliang.liu, guodong.xu,
	john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

From: Xinliang Liu <xinliang.liu@linaro.org>

In the bootloader of HiKey/96boards, syspll and media_syspll clk
was initialized to 1.19GHz. So, here changes it in kernel accordingly.

1.19GHz was chosen over 1.2GHz because at 1.19GHz we get more precise
HDMI pixel clock (1.19G/16 = 74.4MHz) for 1280x720p@60Hz HDMI
(74.25MHz required by standards). Closer pixel clock means better
compatibility to HDMI monitors.

Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
---
 drivers/clk/hisilicon/clk-hi6220.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/clk-hi6220.c
index f02cb41..a36ffcb 100644
--- a/drivers/clk/hisilicon/clk-hi6220.c
+++ b/drivers/clk/hisilicon/clk-hi6220.c
@@ -34,8 +34,8 @@ static struct hisi_fixed_rate_clock hi6220_fixed_rate_clks[] __initdata = {
 	{ HI6220_PLL_BBP,	"bbppll0",	NULL, 0, 245760000, },
 	{ HI6220_PLL_GPU,	"gpupll",	NULL, 0, 1000000000,},
 	{ HI6220_PLL1_DDR,	"ddrpll1",	NULL, 0, 1066000000,},
-	{ HI6220_PLL_SYS,	"syspll",	NULL, 0, 1200000000,},
-	{ HI6220_PLL_SYS_MEDIA,	"media_syspll",	NULL, 0, 1200000000,},
+	{ HI6220_PLL_SYS,	"syspll",	NULL, 0, 1190400000,},
+	{ HI6220_PLL_SYS_MEDIA,	"media_syspll",	NULL, 0, 1190400000,},
 	{ HI6220_DDR_SRC,	"ddr_sel_src",  NULL, 0, 1200000000,},
 	{ HI6220_PLL_MEDIA,	"media_pll",    NULL, 0, 1440000000,},
 	{ HI6220_PLL_DDR,	"ddrpll0",      NULL, 0, 1600000000,},
-- 
1.9.1

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

* [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz
  2016-06-29  8:45 [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz Guodong Xu
@ 2016-06-29  8:45 ` Guodong Xu
  2016-07-06 21:43   ` Michael Turquette
  2016-07-06 22:23 ` [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz Michael Turquette
  1 sibling, 1 reply; 8+ messages in thread
From: Guodong Xu @ 2016-06-29  8:45 UTC (permalink / raw)
  To: mturquette, sboyd, jorge.ramirez-ortiz, xinliang.liu, guodong.xu,
	john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

Early at boot, during the sys_clk initialization, make sure UART1 uses
the higher frequency clock, 150MHz.

This enables support for higher baud rates (up to 3Mbps) in UART1, which
is required by faster bluetooth transfers.

v2: use clk_set_rate() to propergate clock settings.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
---
 drivers/clk/hisilicon/clk-hi6220.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/clk-hi6220.c
index a36ffcb..631c56f 100644
--- a/drivers/clk/hisilicon/clk-hi6220.c
+++ b/drivers/clk/hisilicon/clk-hi6220.c
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/clk-provider.h>
+#include <linux/clk.h>
 #include <linux/clkdev.h>
 #include <linux/io.h>
 #include <linux/of.h>
@@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct device_node *np)
 
 	hi6220_clk_register_divider(hi6220_div_clks_sys,
 			ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
+
+	if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC], 150000000))
+		pr_err("failed to set uart1 clock rate\n");
 }
 CLK_OF_DECLARE(hi6220_clk_sys, "hisilicon,hi6220-sysctrl", hi6220_clk_sys_init);
 
-- 
1.9.1

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

* Re: [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz
  2016-06-29  8:45 ` [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz Guodong Xu
@ 2016-07-06 21:43   ` Michael Turquette
  2016-07-07  6:31     ` Jorge Ramirez
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Turquette @ 2016-07-06 21:43 UTC (permalink / raw)
  To: Guodong Xu, sboyd, jorge.ramirez-ortiz, xinliang.liu, guodong.xu,
	john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

Quoting Guodong Xu (2016-06-29 01:45:55)
> From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> =

> Early at boot, during the sys_clk initialization, make sure UART1 uses
> the higher frequency clock, 150MHz.
> =

> This enables support for higher baud rates (up to 3Mbps) in UART1, which
> is required by faster bluetooth transfers.
> =

> v2: use clk_set_rate() to propergate clock settings.
> =

> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
> ---
>  drivers/clk/hisilicon/clk-hi6220.c | 4 ++++
>  1 file changed, 4 insertions(+)
> =

> diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/c=
lk-hi6220.c
> index a36ffcb..631c56f 100644
> --- a/drivers/clk/hisilicon/clk-hi6220.c
> +++ b/drivers/clk/hisilicon/clk-hi6220.c
> @@ -12,6 +12,7 @@
>  =

>  #include <linux/kernel.h>
>  #include <linux/clk-provider.h>
> +#include <linux/clk.h>
>  #include <linux/clkdev.h>
>  #include <linux/io.h>
>  #include <linux/of.h>
> @@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct device_=
node *np)
>  =

>         hi6220_clk_register_divider(hi6220_div_clks_sys,
>                         ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
> +
> +       if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC], 15000=
0000))
> +               pr_err("failed to set uart1 clock rate\n");

Why doesn't the UART driver call clk_get and then clk_set_rate on this
clock? Why do it in the clk provider driver?

Thanks,
Mike

>  }
>  CLK_OF_DECLARE(hi6220_clk_sys, "hisilicon,hi6220-sysctrl", hi6220_clk_sy=
s_init);
>  =

> -- =

> 1.9.1
>=20

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

* Re: [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz
  2016-06-29  8:45 [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz Guodong Xu
  2016-06-29  8:45 ` [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz Guodong Xu
@ 2016-07-06 22:23 ` Michael Turquette
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Turquette @ 2016-07-06 22:23 UTC (permalink / raw)
  To: Guodong Xu, sboyd, jorge.ramirez-ortiz, xinliang.liu, guodong.xu,
	john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

Quoting Guodong Xu (2016-06-29 01:45:54)
> From: Xinliang Liu <xinliang.liu@linaro.org>
> =

> In the bootloader of HiKey/96boards, syspll and media_syspll clk
> was initialized to 1.19GHz. So, here changes it in kernel accordingly.
> =

> 1.19GHz was chosen over 1.2GHz because at 1.19GHz we get more precise
> HDMI pixel clock (1.19G/16 =3D 74.4MHz) for 1280x720p@60Hz HDMI
> (74.25MHz required by standards). Closer pixel clock means better
> compatibility to HDMI monitors.
> =

> Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>

Applied.

Regards,
Mike

> ---
>  drivers/clk/hisilicon/clk-hi6220.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> =

> diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/c=
lk-hi6220.c
> index f02cb41..a36ffcb 100644
> --- a/drivers/clk/hisilicon/clk-hi6220.c
> +++ b/drivers/clk/hisilicon/clk-hi6220.c
> @@ -34,8 +34,8 @@ static struct hisi_fixed_rate_clock hi6220_fixed_rate_c=
lks[] __initdata =3D {
>         { HI6220_PLL_BBP,       "bbppll0",      NULL, 0, 245760000, },
>         { HI6220_PLL_GPU,       "gpupll",       NULL, 0, 1000000000,},
>         { HI6220_PLL1_DDR,      "ddrpll1",      NULL, 0, 1066000000,},
> -       { HI6220_PLL_SYS,       "syspll",       NULL, 0, 1200000000,},
> -       { HI6220_PLL_SYS_MEDIA, "media_syspll", NULL, 0, 1200000000,},
> +       { HI6220_PLL_SYS,       "syspll",       NULL, 0, 1190400000,},
> +       { HI6220_PLL_SYS_MEDIA, "media_syspll", NULL, 0, 1190400000,},
>         { HI6220_DDR_SRC,       "ddr_sel_src",  NULL, 0, 1200000000,},
>         { HI6220_PLL_MEDIA,     "media_pll",    NULL, 0, 1440000000,},
>         { HI6220_PLL_DDR,       "ddrpll0",      NULL, 0, 1600000000,},
> -- =

> 1.9.1
>=20

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

* Re: [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz
  2016-07-06 21:43   ` Michael Turquette
@ 2016-07-07  6:31     ` Jorge Ramirez
  2016-07-07  8:55       ` Jorge Ramirez
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge Ramirez @ 2016-07-07  6:31 UTC (permalink / raw)
  To: Michael Turquette, Guodong Xu, sboyd, xinliang.liu, john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

On 07/06/2016 11:43 PM, Michael Turquette wrote:
> Quoting Guodong Xu (2016-06-29 01:45:55)
>> >From: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
>> >
>> >Early at boot, during the sys_clk initialization, make sure UART1 uses
>> >the higher frequency clock, 150MHz.
>> >
>> >This enables support for higher baud rates (up to 3Mbps) in UART1, which
>> >is required by faster bluetooth transfers.
>> >
>> >v2: use clk_set_rate() to propergate clock settings.
>> >
>> >Signed-off-by: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
>> >Signed-off-by: Guodong Xu<guodong.xu@linaro.org>
>> >---
>> >  drivers/clk/hisilicon/clk-hi6220.c | 4 ++++
>> >  1 file changed, 4 insertions(+)
>> >
>> >diff --git a/drivers/clk/hisilicon/clk-hi6220.c b/drivers/clk/hisilicon/clk-hi6220.c
>> >index a36ffcb..631c56f 100644
>> >--- a/drivers/clk/hisilicon/clk-hi6220.c
>> >+++ b/drivers/clk/hisilicon/clk-hi6220.c
>> >@@ -12,6 +12,7 @@
>> >  
>> >  #include <linux/kernel.h>
>> >  #include <linux/clk-provider.h>
>> >+#include <linux/clk.h>
>> >  #include <linux/clkdev.h>
>> >  #include <linux/io.h>
>> >  #include <linux/of.h>
>> >@@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct device_node *np)
>> >  
>> >         hi6220_clk_register_divider(hi6220_div_clks_sys,
>> >                         ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
>> >+
>> >+       if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC], 150000000))
>> >+               pr_err("failed to set uart1 clock rate\n");
> Why doesn't the UART driver call clk_get and then clk_set_rate on this
> clock? Why do it in the clk provider driver?

yes that was my initial choice as well; in the end I opted to do it in 
the clock driver because of it being a value that will not have to ever 
change for the SoC and - maybe more importantly- because of not having a 
DT property available for the primecell pl011 uart where to  specify the 
value (so I thought this was a less intrusive implementation).

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

* Re: [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz
  2016-07-07  6:31     ` Jorge Ramirez
@ 2016-07-07  8:55       ` Jorge Ramirez
  2016-07-08  1:48         ` Michael Turquette
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge Ramirez @ 2016-07-07  8:55 UTC (permalink / raw)
  To: Michael Turquette, Guodong Xu, sboyd, xinliang.liu, john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

On 07/07/2016 08:31 AM, Jorge Ramirez wrote:
> On 07/06/2016 11:43 PM, Michael Turquette wrote:
>> Quoting Guodong Xu (2016-06-29 01:45:55)
>>> >From: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
>>> >
>>> >Early at boot, during the sys_clk initialization, make sure UART1 uses
>>> >the higher frequency clock, 150MHz.
>>> >
>>> >This enables support for higher baud rates (up to 3Mbps) in UART1, 
>>> which
>>> >is required by faster bluetooth transfers.
>>> >
>>> >v2: use clk_set_rate() to propergate clock settings.
>>> >
>>> >Signed-off-by: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
>>> >Signed-off-by: Guodong Xu<guodong.xu@linaro.org>
>>> >---
>>> >  drivers/clk/hisilicon/clk-hi6220.c | 4 ++++
>>> >  1 file changed, 4 insertions(+)
>>> >
>>> >diff --git a/drivers/clk/hisilicon/clk-hi6220.c 
>>> b/drivers/clk/hisilicon/clk-hi6220.c
>>> >index a36ffcb..631c56f 100644
>>> >--- a/drivers/clk/hisilicon/clk-hi6220.c
>>> >+++ b/drivers/clk/hisilicon/clk-hi6220.c
>>> >@@ -12,6 +12,7 @@
>>> >  >  #include <linux/kernel.h>
>>> >  #include <linux/clk-provider.h>
>>> >+#include <linux/clk.h>
>>> >  #include <linux/clkdev.h>
>>> >  #include <linux/io.h>
>>> >  #include <linux/of.h>
>>> >@@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct 
>>> device_node *np)
>>> >  > hi6220_clk_register_divider(hi6220_div_clks_sys,
>>> >                         ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
>>> >+
>>> >+       if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC], 
>>> 150000000))
>>> >+               pr_err("failed to set uart1 clock rate\n");
>> Why doesn't the UART driver call clk_get and then clk_set_rate on this
>> clock? Why do it in the clk provider driver?
>
> yes that was my initial choice as well; in the end I opted to do it in 
> the clock driver because of it being a value that will not have to 
> ever change for the SoC and - maybe more importantly- because of not 
> having a DT property available for the primecell pl011 uart where to  
> specify the value (so I thought this was a less intrusive 
> implementation).
>
>
I have v3 ready (changes done in amba-pl011.c and devicetree/bindings)
please let me know if I should send those instead.

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

* Re: [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz
  2016-07-07  8:55       ` Jorge Ramirez
@ 2016-07-08  1:48         ` Michael Turquette
  2016-07-08  6:57           ` Jorge Ramirez
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Turquette @ 2016-07-08  1:48 UTC (permalink / raw)
  To: Jorge Ramirez, Guodong Xu, sboyd, xinliang.liu, john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

Quoting Jorge Ramirez (2016-07-07 01:55:05)
> On 07/07/2016 08:31 AM, Jorge Ramirez wrote:
> > On 07/06/2016 11:43 PM, Michael Turquette wrote:
> >> Quoting Guodong Xu (2016-06-29 01:45:55)
> >>> >From: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
> >>> >
> >>> >Early at boot, during the sys_clk initialization, make sure UART1 us=
es
> >>> >the higher frequency clock, 150MHz.
> >>> >
> >>> >This enables support for higher baud rates (up to 3Mbps) in UART1, =

> >>> which
> >>> >is required by faster bluetooth transfers.
> >>> >
> >>> >v2: use clk_set_rate() to propergate clock settings.
> >>> >
> >>> >Signed-off-by: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
> >>> >Signed-off-by: Guodong Xu<guodong.xu@linaro.org>
> >>> >---
> >>> >  drivers/clk/hisilicon/clk-hi6220.c | 4 ++++
> >>> >  1 file changed, 4 insertions(+)
> >>> >
> >>> >diff --git a/drivers/clk/hisilicon/clk-hi6220.c =

> >>> b/drivers/clk/hisilicon/clk-hi6220.c
> >>> >index a36ffcb..631c56f 100644
> >>> >--- a/drivers/clk/hisilicon/clk-hi6220.c
> >>> >+++ b/drivers/clk/hisilicon/clk-hi6220.c
> >>> >@@ -12,6 +12,7 @@
> >>> >  >  #include <linux/kernel.h>
> >>> >  #include <linux/clk-provider.h>
> >>> >+#include <linux/clk.h>
> >>> >  #include <linux/clkdev.h>
> >>> >  #include <linux/io.h>
> >>> >  #include <linux/of.h>
> >>> >@@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct =

> >>> device_node *np)
> >>> >  > hi6220_clk_register_divider(hi6220_div_clks_sys,
> >>> >                         ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
> >>> >+
> >>> >+       if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC], =

> >>> 150000000))
> >>> >+               pr_err("failed to set uart1 clock rate\n");
> >> Why doesn't the UART driver call clk_get and then clk_set_rate on this
> >> clock? Why do it in the clk provider driver?
> >
> > yes that was my initial choice as well; in the end I opted to do it in =

> > the clock driver because of it being a value that will not have to =

> > ever change for the SoC and - maybe more importantly- because of not =

> > having a DT property available for the primecell pl011 uart where to  =

> > specify the value (so I thought this was a less intrusive =

> > implementation).
> >
> >
> I have v3 ready (changes done in amba-pl011.c and devicetree/bindings)
> please let me know if I should send those instead.

Yes, please do. Are you using the clock-assigned-rates property?

Regards,
Mike

> =

> =

>=20

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

* Re: [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz
  2016-07-08  1:48         ` Michael Turquette
@ 2016-07-08  6:57           ` Jorge Ramirez
  0 siblings, 0 replies; 8+ messages in thread
From: Jorge Ramirez @ 2016-07-08  6:57 UTC (permalink / raw)
  To: Michael Turquette, Guodong Xu, sboyd, xinliang.liu, john.stultz
  Cc: linux-arm-kernel, linux-kernel, linux-clk

On 07/08/2016 03:48 AM, Michael Turquette wrote:
> Quoting Jorge Ramirez (2016-07-07 01:55:05)
>> On 07/07/2016 08:31 AM, Jorge Ramirez wrote:
>>> On 07/06/2016 11:43 PM, Michael Turquette wrote:
>>>> Quoting Guodong Xu (2016-06-29 01:45:55)
>>>>>> From: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
>>>>>>
>>>>>> Early at boot, during the sys_clk initialization, make sure UART1 uses
>>>>>> the higher frequency clock, 150MHz.
>>>>>>
>>>>>> This enables support for higher baud rates (up to 3Mbps) in UART1,
>>>>> which
>>>>>> is required by faster bluetooth transfers.
>>>>>>
>>>>>> v2: use clk_set_rate() to propergate clock settings.
>>>>>>
>>>>>> Signed-off-by: Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org>
>>>>>> Signed-off-by: Guodong Xu<guodong.xu@linaro.org>
>>>>>> ---
>>>>>>   drivers/clk/hisilicon/clk-hi6220.c | 4 ++++
>>>>>>   1 file changed, 4 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/clk/hisilicon/clk-hi6220.c
>>>>> b/drivers/clk/hisilicon/clk-hi6220.c
>>>>>> index a36ffcb..631c56f 100644
>>>>>> --- a/drivers/clk/hisilicon/clk-hi6220.c
>>>>>> +++ b/drivers/clk/hisilicon/clk-hi6220.c
>>>>>> @@ -12,6 +12,7 @@
>>>>>>   >  #include <linux/kernel.h>
>>>>>>   #include <linux/clk-provider.h>
>>>>>> +#include <linux/clk.h>
>>>>>>   #include <linux/clkdev.h>
>>>>>>   #include <linux/io.h>
>>>>>>   #include <linux/of.h>
>>>>>> @@ -192,6 +193,9 @@ static void __init hi6220_clk_sys_init(struct
>>>>> device_node *np)
>>>>>>   > hi6220_clk_register_divider(hi6220_div_clks_sys,
>>>>>>                          ARRAY_SIZE(hi6220_div_clks_sys), clk_data);
>>>>>> +
>>>>>> +       if (clk_set_rate(clk_data->clk_data.clks[HI6220_UART1_SRC],
>>>>> 150000000))
>>>>>> +               pr_err("failed to set uart1 clock rate\n");
>>>> Why doesn't the UART driver call clk_get and then clk_set_rate on this
>>>> clock? Why do it in the clk provider driver?
>>> yes that was my initial choice as well; in the end I opted to do it in
>>> the clock driver because of it being a value that will not have to
>>> ever change for the SoC and - maybe more importantly- because of not
>>> having a DT property available for the primecell pl011 uart where to
>>> specify the value (so I thought this was a less intrusive
>>> implementation).
>>>
>>>
>> I have v3 ready (changes done in amba-pl011.c and devicetree/bindings)
>> please let me know if I should send those instead.
> Yes, please do. Are you using the clock-assigned-rates property?

oops (was using clock-frequency), yes it is now. thanks will send it 
shortly.

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

end of thread, other threads:[~2016-07-08  6:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29  8:45 [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz Guodong Xu
2016-06-29  8:45 ` [PATCH v2 2/2] clk: hi6220: initialize UART1 clock to 150MHz Guodong Xu
2016-07-06 21:43   ` Michael Turquette
2016-07-07  6:31     ` Jorge Ramirez
2016-07-07  8:55       ` Jorge Ramirez
2016-07-08  1:48         ` Michael Turquette
2016-07-08  6:57           ` Jorge Ramirez
2016-07-06 22:23 ` [PATCH v2 1/2] clk: hi6220: Change syspll and media_syspll clk to 1.19GHz Michael Turquette

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).