[uClinux-dev] [PATCH] m68knommu: fix arch devm_get_clk() for some ColdFire parts

gerg at snapgear.com gerg at snapgear.com
Mon Sep 10 00:47:30 EDT 2012


From: Greg Ungerer <gerg at uclinux.org>

The arch local devm_get_clk() is always returning the NULL clock even on the
ColdFire parts that we keep a list of clocks for. This breaks drivers that
look for CPU clocks, like the Freescale FEC ethernet driver. So this is
currently broken on ColdFire 520x, 532x amd 5441x SoC parts. All other
ColdFire parts still work.

The simple clocking code traditionaly used by ColdFire parts didn't keep
a list of clocks, and returned NULL for clk_get(). With commit fe66158a
("m68knommu: Add clk definitions for m520x.") for example we now do have
a list of real clocks for some ColdFire parts. The local devm_get_clk()
function needs to return the clock struct on these, which it can easily do
using the existing local clk_get().

Signed-off-by: Greg Ungerer <gerg at uclinux.org>
---
 arch/m68k/platform/coldfire/clk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/platform/coldfire/clk.c b/arch/m68k/platform/coldfire/clk.c
index 75f9ee9..ca1d8fa 100644
--- a/arch/m68k/platform/coldfire/clk.c
+++ b/arch/m68k/platform/coldfire/clk.c
@@ -149,6 +149,6 @@ struct clk_ops clk_ops1 = {
 
 struct clk *devm_clk_get(struct device *dev, const char *id)
 {
-	return NULL;
+	return clk_get(dev, id);
 }
 EXPORT_SYMBOL(devm_clk_get);
-- 
1.7.0.4



More information about the uClinux-dev mailing list