Linux-Clk Archive on lore.kernel.org
 help / Atom feed
* [PATCH] clk: clps711x: Remove board support
@ 2018-12-20  8:54 Alexander Shiyan
  2018-12-20 15:14 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alexander Shiyan @ 2018-12-20  8:54 UTC (permalink / raw)
  To: linux-clk
  Cc: Michael Turquette, Stephen Boyd, Arnd Bergmann, Alexander Shiyan

Since board support for the CLPS711X platform was removed,
remove the board support from the clk-clps711x driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/clk/clk-clps711x.c | 61 +++++++++-------------------------------------
 1 file changed, 11 insertions(+), 50 deletions(-)

diff --git a/drivers/clk/clk-clps711x.c b/drivers/clk/clk-clps711x.c
index 2c04396402ab..c36c47bdba02 100644
--- a/drivers/clk/clk-clps711x.c
+++ b/drivers/clk/clk-clps711x.c
@@ -44,21 +44,21 @@ struct clps711x_clk {
 	struct clk_hw_onecell_data	clk_data;
 };
 
-static struct clps711x_clk * __init _clps711x_clk_init(void __iomem *base,
-						       u32 fref)
+static void __init clps711x_clk_init_dt(struct device_node *np)
 {
-	u32 tmp, f_cpu, f_pll, f_bus, f_tim, f_pwm, f_spi;
+	u32 tmp, f_cpu, f_pll, f_bus, f_tim, f_pwm, f_spi, fref = 0;
 	struct clps711x_clk *clps711x_clk;
-	unsigned i;
+	void __iomem *base;
+
+	WARN_ON(of_property_read_u32(np, "startup-frequency", &fref));
 
-	if (!base)
-		return ERR_PTR(-ENOMEM);
+	base = of_iomap(np, 0);
+	BUG_ON(!base);
 
 	clps711x_clk = kzalloc(struct_size(clps711x_clk, clk_data.hws,
 					   CLPS711X_CLK_MAX),
 			       GFP_KERNEL);
-	if (!clps711x_clk)
-		return ERR_PTR(-ENOMEM);
+	BUG_ON(!clps711x_clk);
 
 	spin_lock_init(&clps711x_clk->lock);
 
@@ -137,52 +137,13 @@ static struct clps711x_clk * __init _clps711x_clk_init(void __iomem *base,
 		clk_hw_register_fixed_factor(NULL, "uart", "bus", 0, 1, 10);
 	clps711x_clk->clk_data.hws[CLPS711X_CLK_TICK] =
 		clk_hw_register_fixed_rate(NULL, "tick", NULL, 0, 64);
-	for (i = 0; i < CLPS711X_CLK_MAX; i++)
-		if (IS_ERR(clps711x_clk->clk_data.hws[i]))
+	for (tmp = 0; tmp < CLPS711X_CLK_MAX; tmp++)
+		if (IS_ERR(clps711x_clk->clk_data.hws[tmp]))
 			pr_err("clk %i: register failed with %ld\n",
-			       i, PTR_ERR(clps711x_clk->clk_data.hws[i]));
-
-	return clps711x_clk;
-}
-
-void __init clps711x_clk_init(void __iomem *base)
-{
-	struct clps711x_clk *clps711x_clk;
-
-	clps711x_clk = _clps711x_clk_init(base, 73728000);
-
-	BUG_ON(IS_ERR(clps711x_clk));
-
-	/* Clocksource */
-	clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_TIMER1],
-			    NULL, "clps711x-timer.0");
-	clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_TIMER2],
-			    NULL, "clps711x-timer.1");
-
-	/* Drivers */
-	clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_PWM],
-			    NULL, "clps711x-pwm");
-	clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_UART],
-			    NULL, "clps711x-uart.0");
-	clk_hw_register_clkdev(clps711x_clk->clk_data.hws[CLPS711X_CLK_UART],
-			    NULL, "clps711x-uart.1");
-}
-
-#ifdef CONFIG_OF
-static void __init clps711x_clk_init_dt(struct device_node *np)
-{
-	void __iomem *base = of_iomap(np, 0);
-	struct clps711x_clk *clps711x_clk;
-	u32 fref = 0;
-
-	WARN_ON(of_property_read_u32(np, "startup-frequency", &fref));
-
-	clps711x_clk = _clps711x_clk_init(base, fref);
-	BUG_ON(IS_ERR(clps711x_clk));
+			       tmp, PTR_ERR(clps711x_clk->clk_data.hws[tmp]));
 
 	clps711x_clk->clk_data.num = CLPS711X_CLK_MAX;
 	of_clk_add_hw_provider(np, of_clk_hw_onecell_get,
 			       &clps711x_clk->clk_data);
 }
 CLK_OF_DECLARE(clps711x, "cirrus,ep7209-clk", clps711x_clk_init_dt);
-#endif
-- 
2.13.0


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

* Re: [PATCH] clk: clps711x: Remove board support
  2018-12-20  8:54 [PATCH] clk: clps711x: Remove board support Alexander Shiyan
@ 2018-12-20 15:14 ` Arnd Bergmann
  2018-12-20 19:42 ` Stephen Boyd
  2019-01-09 20:54 ` Stephen Boyd
  2 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2018-12-20 15:14 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-clk, Michael Turquette, Stephen Boyd

On Thu, Dec 20, 2018 at 9:54 AM Alexander Shiyan <shc_work@mail.ru> wrote:
>
> Since board support for the CLPS711X platform was removed,
> remove the board support from the clk-clps711x driver.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/clk/clk-clps711x.c | 61 +++++++++-------------------------------------
>  1 file changed, 11 insertions(+), 50 deletions(-)

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* Re: [PATCH] clk: clps711x: Remove board support
  2018-12-20  8:54 [PATCH] clk: clps711x: Remove board support Alexander Shiyan
  2018-12-20 15:14 ` Arnd Bergmann
@ 2018-12-20 19:42 ` Stephen Boyd
  2018-12-20 22:44   ` Arnd Bergmann
  2019-01-09 20:54 ` Stephen Boyd
  2 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2018-12-20 19:42 UTC (permalink / raw)
  To: Alexander Shiyan, linux-clk
  Cc: Michael Turquette, Arnd Bergmann, Alexander Shiyan

Quoting Alexander Shiyan (2018-12-20 00:54:33)
> Since board support for the CLPS711X platform was removed,
> remove the board support from the clk-clps711x driver.

Can you reference the commit where the platform was removed in the
commit text here? It helps me know if there are dependencies.


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

* Re: [PATCH] clk: clps711x: Remove board support
  2018-12-20 19:42 ` Stephen Boyd
@ 2018-12-20 22:44   ` Arnd Bergmann
  2018-12-20 23:30     ` Stephen Boyd
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2018-12-20 22:44 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: Alexander Shiyan, linux-clk, Michael Turquette

On Thu, Dec 20, 2018 at 8:42 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Alexander Shiyan (2018-12-20 00:54:33)
> > Since board support for the CLPS711X platform was removed,
> > remove the board support from the clk-clps711x driver.
>
> Can you reference the commit where the platform was removed in the
> commit text here? It helps me know if there are dependencies.

This was a while back, in commit 4a56f46a7dc6 ("ARM: clps711x:
Remove boards support"), which made it into linux-4.8.

      Arnd

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

* Re: [PATCH] clk: clps711x: Remove board support
  2018-12-20 22:44   ` Arnd Bergmann
@ 2018-12-20 23:30     ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2018-12-20 23:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Alexander Shiyan, linux-clk, Michael Turquette

Quoting Arnd Bergmann (2018-12-20 14:44:03)
> On Thu, Dec 20, 2018 at 8:42 PM Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Alexander Shiyan (2018-12-20 00:54:33)
> > > Since board support for the CLPS711X platform was removed,
> > > remove the board support from the clk-clps711x driver.
> >
> > Can you reference the commit where the platform was removed in the
> > commit text here? It helps me know if there are dependencies.
> 
> This was a while back, in commit 4a56f46a7dc6 ("ARM: clps711x:
> Remove boards support"), which made it into linux-4.8.
> 

Thanks!


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

* Re: [PATCH] clk: clps711x: Remove board support
  2018-12-20  8:54 [PATCH] clk: clps711x: Remove board support Alexander Shiyan
  2018-12-20 15:14 ` Arnd Bergmann
  2018-12-20 19:42 ` Stephen Boyd
@ 2019-01-09 20:54 ` Stephen Boyd
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2019-01-09 20:54 UTC (permalink / raw)
  To: Alexander Shiyan, linux-clk
  Cc: Michael Turquette, Arnd Bergmann, Alexander Shiyan

Quoting Alexander Shiyan (2018-12-20 00:54:33)
> Since board support for the CLPS711X platform was removed,
> remove the board support from the clk-clps711x driver.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---

Applied to clk-next


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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20  8:54 [PATCH] clk: clps711x: Remove board support Alexander Shiyan
2018-12-20 15:14 ` Arnd Bergmann
2018-12-20 19:42 ` Stephen Boyd
2018-12-20 22:44   ` Arnd Bergmann
2018-12-20 23:30     ` Stephen Boyd
2019-01-09 20:54 ` Stephen Boyd

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org linux-clk@archiver.kernel.org
	public-inbox-index linux-clk


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/ public-inbox