All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver
@ 2017-01-13 15:07 Linus Walleij
  2017-01-20 14:08 ` Ulf Hansson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Linus Walleij @ 2017-01-13 15:07 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-clk, Linus Walleij, Ulf Hansson

The AB8500 sysclk is just another PRCMU-controlled clock, there
is no reason why it should be in the ABx500-controlled part of
the clock implementation. Doing this and the corresponding device
tree changes makes USB work on the Ux500 again.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/clk/ux500/abx500-clk.c   | 8 --------
 drivers/clk/ux500/u8500_of_clk.c | 3 +++
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c
index a07c31e6f26d..0467fcae3b0e 100644
--- a/drivers/clk/ux500/abx500-clk.c
+++ b/drivers/clk/ux500/abx500-clk.c
@@ -15,7 +15,6 @@
 #include <linux/mfd/abx500/ab8500-sysctrl.h>
 #include <linux/clkdev.h>
 #include <linux/clk-provider.h>
-#include <linux/mfd/dbx500-prcmu.h>
 #include "clk.h"
 
 /* Clock definitions for ab8500 */
@@ -39,13 +38,6 @@ static int ab8500_reg_clks(struct device *dev)
 	if (ret)
 		return ret;
 
-	/* ab8500_sysclk */
-	clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
-	clk_register_clkdev(clk, "sysclk", "ab8500-usb.0");
-	clk_register_clkdev(clk, "sysclk", "ab-iddet.0");
-	clk_register_clkdev(clk, "sysclk", "snd-soc-mop500.0");
-	clk_register_clkdev(clk, "sysclk", "shrm_bus");
-
 	/* ab8500_sysclk2 */
 	clk = clk_reg_sysctrl_gate(dev , "ab8500_sysclk2", "ab8500_sysclk",
 		AB8500_SYSULPCLKCTRL1, AB8500_SYSULPCLKCTRL1_SYSCLKBUF2REQ,
diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
index e960d686d9db..d5888591e1a9 100644
--- a/drivers/clk/ux500/u8500_of_clk.c
+++ b/drivers/clk/ux500/u8500_of_clk.c
@@ -206,6 +206,9 @@ static void u8500_clk_init(struct device_node *np)
 	clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, 0);
 	prcmu_clk[PRCMU_TIMCLK] = clk;
 
+	clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
+	prcmu_clk[PRCMU_SYSCLK] = clk;
+
 	clk = clk_reg_prcmu_opp_volt_scalable("sdmmcclk", NULL, PRCMU_SDMMCCLK,
 					100000000, CLK_SET_RATE_GATE);
 	prcmu_clk[PRCMU_SDMMCCLK] = clk;
-- 
2.9.3

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

* Re: [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver
  2017-01-13 15:07 [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver Linus Walleij
@ 2017-01-20 14:08 ` Ulf Hansson
  2017-01-20 15:12   ` Linus Walleij
  2017-01-20 15:55 ` Ulf Hansson
  2017-01-27  0:11 ` Stephen Boyd
  2 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2017-01-20 14:08 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Michael Turquette, Stephen Boyd, linux-clk

On 13 January 2017 at 16:07, Linus Walleij <linus.walleij@linaro.org> wrote:
> The AB8500 sysclk is just another PRCMU-controlled clock, there
> is no reason why it should be in the ABx500-controlled part of

Right, this change makes sense to me!

> the clock implementation. Doing this and the corresponding device
> tree changes makes USB work on the Ux500 again.
>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/clk/ux500/abx500-clk.c   | 8 --------
>  drivers/clk/ux500/u8500_of_clk.c | 3 +++
>  2 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c
> index a07c31e6f26d..0467fcae3b0e 100644
> --- a/drivers/clk/ux500/abx500-clk.c
> +++ b/drivers/clk/ux500/abx500-clk.c
> @@ -15,7 +15,6 @@
>  #include <linux/mfd/abx500/ab8500-sysctrl.h>
>  #include <linux/clkdev.h>
>  #include <linux/clk-provider.h>
> -#include <linux/mfd/dbx500-prcmu.h>
>  #include "clk.h"
>
>  /* Clock definitions for ab8500 */
> @@ -39,13 +38,6 @@ static int ab8500_reg_clks(struct device *dev)
>         if (ret)
>                 return ret;
>
> -       /* ab8500_sysclk */
> -       clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
> -       clk_register_clkdev(clk, "sysclk", "ab8500-usb.0");
> -       clk_register_clkdev(clk, "sysclk", "ab-iddet.0");
> -       clk_register_clkdev(clk, "sysclk", "snd-soc-mop500.0");
> -       clk_register_clkdev(clk, "sysclk", "shrm_bus");

These lookups are removed in this change. Are there already existing
name lookups already defined in the DTS?

> -
>         /* ab8500_sysclk2 */
>         clk = clk_reg_sysctrl_gate(dev , "ab8500_sysclk2", "ab8500_sysclk",
>                 AB8500_SYSULPCLKCTRL1, AB8500_SYSULPCLKCTRL1_SYSCLKBUF2REQ,
> diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
> index e960d686d9db..d5888591e1a9 100644
> --- a/drivers/clk/ux500/u8500_of_clk.c
> +++ b/drivers/clk/ux500/u8500_of_clk.c
> @@ -206,6 +206,9 @@ static void u8500_clk_init(struct device_node *np)
>         clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, 0);
>         prcmu_clk[PRCMU_TIMCLK] = clk;
>
> +       clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
> +       prcmu_clk[PRCMU_SYSCLK] = clk;
> +
>         clk = clk_reg_prcmu_opp_volt_scalable("sdmmcclk", NULL, PRCMU_SDMMCCLK,
>                                         100000000, CLK_SET_RATE_GATE);
>         prcmu_clk[PRCMU_SDMMCCLK] = clk;
> --
> 2.9.3
>

Kind regards
Uffe

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

* Re: [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver
  2017-01-20 14:08 ` Ulf Hansson
@ 2017-01-20 15:12   ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2017-01-20 15:12 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Michael Turquette, Stephen Boyd, linux-clk

On Fri, Jan 20, 2017 at 3:08 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:

>> -       /* ab8500_sysclk */
>> -       clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
>> -       clk_register_clkdev(clk, "sysclk", "ab8500-usb.0");
>> -       clk_register_clkdev(clk, "sysclk", "ab-iddet.0");
>> -       clk_register_clkdev(clk, "sysclk", "snd-soc-mop500.0");
>> -       clk_register_clkdev(clk, "sysclk", "shrm_bus");
>
> These lookups are removed in this change. Are there already existing
> name lookups already defined in the DTS?

The USB PHY and snd-soc-mop500 lookup are added in
a DTS patch in a separate series.

The ID detection and SHRM drivers are not upstream,
but can easily be bound in the device tree the day they are.

Yours,
Linus Walleij

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

* Re: [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver
  2017-01-13 15:07 [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver Linus Walleij
  2017-01-20 14:08 ` Ulf Hansson
@ 2017-01-20 15:55 ` Ulf Hansson
  2017-01-27  0:11 ` Stephen Boyd
  2 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2017-01-20 15:55 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Michael Turquette, Stephen Boyd, linux-clk

On 13 January 2017 at 16:07, Linus Walleij <linus.walleij@linaro.org> wrote:
> The AB8500 sysclk is just another PRCMU-controlled clock, there
> is no reason why it should be in the ABx500-controlled part of
> the clock implementation. Doing this and the corresponding device
> tree changes makes USB work on the Ux500 again.
>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Stephen, can pick this up once Rob acked the DT change?

Kind regards
Uffe

> ---
>  drivers/clk/ux500/abx500-clk.c   | 8 --------
>  drivers/clk/ux500/u8500_of_clk.c | 3 +++
>  2 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c
> index a07c31e6f26d..0467fcae3b0e 100644
> --- a/drivers/clk/ux500/abx500-clk.c
> +++ b/drivers/clk/ux500/abx500-clk.c
> @@ -15,7 +15,6 @@
>  #include <linux/mfd/abx500/ab8500-sysctrl.h>
>  #include <linux/clkdev.h>
>  #include <linux/clk-provider.h>
> -#include <linux/mfd/dbx500-prcmu.h>
>  #include "clk.h"
>
>  /* Clock definitions for ab8500 */
> @@ -39,13 +38,6 @@ static int ab8500_reg_clks(struct device *dev)
>         if (ret)
>                 return ret;
>
> -       /* ab8500_sysclk */
> -       clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
> -       clk_register_clkdev(clk, "sysclk", "ab8500-usb.0");
> -       clk_register_clkdev(clk, "sysclk", "ab-iddet.0");
> -       clk_register_clkdev(clk, "sysclk", "snd-soc-mop500.0");
> -       clk_register_clkdev(clk, "sysclk", "shrm_bus");
> -
>         /* ab8500_sysclk2 */
>         clk = clk_reg_sysctrl_gate(dev , "ab8500_sysclk2", "ab8500_sysclk",
>                 AB8500_SYSULPCLKCTRL1, AB8500_SYSULPCLKCTRL1_SYSCLKBUF2REQ,
> diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
> index e960d686d9db..d5888591e1a9 100644
> --- a/drivers/clk/ux500/u8500_of_clk.c
> +++ b/drivers/clk/ux500/u8500_of_clk.c
> @@ -206,6 +206,9 @@ static void u8500_clk_init(struct device_node *np)
>         clk = clk_reg_prcmu_gate("timclk", NULL, PRCMU_TIMCLK, 0);
>         prcmu_clk[PRCMU_TIMCLK] = clk;
>
> +       clk = clk_reg_prcmu_gate("ab8500_sysclk", NULL, PRCMU_SYSCLK, 0);
> +       prcmu_clk[PRCMU_SYSCLK] = clk;
> +
>         clk = clk_reg_prcmu_opp_volt_scalable("sdmmcclk", NULL, PRCMU_SDMMCCLK,
>                                         100000000, CLK_SET_RATE_GATE);
>         prcmu_clk[PRCMU_SDMMCCLK] = clk;
> --
> 2.9.3
>

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

* Re: [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver
  2017-01-13 15:07 [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver Linus Walleij
  2017-01-20 14:08 ` Ulf Hansson
  2017-01-20 15:55 ` Ulf Hansson
@ 2017-01-27  0:11 ` Stephen Boyd
  2 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2017-01-27  0:11 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Michael Turquette, linux-clk, Ulf Hansson

On 01/13, Linus Walleij wrote:
> The AB8500 sysclk is just another PRCMU-controlled clock, there
> is no reason why it should be in the ABx500-controlled part of
> the clock implementation. Doing this and the corresponding device
> tree changes makes USB work on the Ux500 again.
> 
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---

Applied to clk-ux500 and merged into clk-next

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

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

end of thread, other threads:[~2017-01-27  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 15:07 [PATCH 1/3] clk: ux500: move AB8500 sysclk over to PRCMU clk driver Linus Walleij
2017-01-20 14:08 ` Ulf Hansson
2017-01-20 15:12   ` Linus Walleij
2017-01-20 15:55 ` Ulf Hansson
2017-01-27  0:11 ` Stephen Boyd

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.