mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: clps711x: Simplify clock initialization
@ 2016-05-22  9:55 Alexander Shiyan
  2016-05-23  7:51 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2016-05-22  9:55 UTC (permalink / raw)
  To: barebox

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/clock.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-clps711x/clock.c b/arch/arm/mach-clps711x/clock.c
index f3b4d85..6f447f7 100644
--- a/arch/arm/mach-clps711x/clock.c
+++ b/arch/arm/mach-clps711x/clock.c
@@ -42,11 +42,6 @@ static const char *tc_sel_clks[] = {
 	"timer_hf",
 };
 
-static __init void clps711x_clk_register(enum clps711x_clks id)
-{
-	clk_register_clkdev(clks[id].clk, clks[id].name, NULL);
-}
-
 static __init int clps711x_clk_init(void)
 {
 	unsigned int f_cpu, f_bus, f_uart, f_timer_hf, f_timer_lf, pll;
@@ -99,14 +94,8 @@ static __init int clps711x_clk_init(void)
 	clks[tc2].clk = clk_mux(clks[tc2].name, IOMEM(SYSCON1), 7, 1,
 				tc_sel_clks, ARRAY_SIZE(tc_sel_clks), 0);
 
-	clps711x_clk_register(dummy);
-	clps711x_clk_register(cpu);
-	clps711x_clk_register(bus);
-	clps711x_clk_register(uart);
-	clps711x_clk_register(timer_hf);
-	clps711x_clk_register(timer_lf);
-	clps711x_clk_register(tc1);
-	clps711x_clk_register(tc2);
+	for (tmp = 0; tmp < clk_max; tmp++)
+		clk_register_clkdev(clks[tmp].clk, clks[tmp].name, NULL);
 
 	return 0;
 }
-- 
2.4.9


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] ARM: clps711x: Simplify clock initialization
  2016-05-22  9:55 [PATCH] ARM: clps711x: Simplify clock initialization Alexander Shiyan
@ 2016-05-23  7:51 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2016-05-23  7:51 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Sun, May 22, 2016 at 12:55:33PM +0300, Alexander Shiyan wrote:
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  arch/arm/mach-clps711x/clock.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2016-05-23  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-22  9:55 [PATCH] ARM: clps711x: Simplify clock initialization Alexander Shiyan
2016-05-23  7:51 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox