mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] clk: socfpga: don't register fixed clocks
@ 2015-08-10 12:07 Steffen Trumtrar
  2015-08-19 14:06 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Steffen Trumtrar @ 2015-08-10 12:07 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

The fixed clocks are registered from devicetree. Therefore the code path is
not needed, but would instead register the clocks twice, which leads to the
error message:

	clk_register clk f2s_periph_ref_clk is already registered, skipping!
	of_clk_init: failed to init clock for /soc/clkmgr@ffd04000/clocks/f2s_periph_ref_clk: 1
	clk_register clk osc1 is already registered, skipping!
	of_clk_init: failed to init clock for /soc/clkmgr@ffd04000/clocks/osc1: 1

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 drivers/clk/socfpga.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/clk/socfpga.c b/drivers/clk/socfpga.c
index be97d13fa68b..3387c0e63451 100644
--- a/drivers/clk/socfpga.c
+++ b/drivers/clk/socfpga.c
@@ -49,15 +49,6 @@
 
 static void __iomem *clk_mgr_base_addr;
 
-static struct clk *socfpga_fixed_clk(struct device_node *node)
-{
-	uint32_t f = 0;
-
-	of_property_read_u32(node, "clock-frequency", &f);
-
-	return clk_fixed(node->name, f);
-}
-
 struct clk_pll {
 	struct clk clk;
 	const char *parent;
@@ -338,9 +329,7 @@ static void socfpga_register_clocks(struct device_d *dev, struct device_node *no
 		socfpga_register_clocks(dev, child);
 	}
 
-	if (of_device_is_compatible(node, "fixed-clock"))
-		clk = socfpga_fixed_clk(node);
-	else if (of_device_is_compatible(node, "altr,socfpga-pll-clock"))
+	if (of_device_is_compatible(node, "altr,socfpga-pll-clock"))
 		clk = socfpga_pll_clk(node);
 	else if (of_device_is_compatible(node, "altr,socfpga-perip-clk"))
 		clk = socfpga_periph_clk(node);
-- 
2.4.6


_______________________________________________
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:[~2015-08-19 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-10 12:07 [PATCH] clk: socfpga: don't register fixed clocks Steffen Trumtrar
2015-08-19 14:06 ` Sascha Hauer

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