m68knommu: introduce basic clk infrastructure
authorGreg Ungerer <gerg@uclinux.org>
Wed, 4 Mar 2009 00:43:06 +0000 (10:43 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Tue, 24 Mar 2009 05:17:45 +0000 (15:17 +1000)
Create basic support for clk API. Recent changes to the FEC driver
(used by many ColdFire family parts) need this. Initially only
supports getting the master clock frequency.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68knommu/platform/coldfire/Makefile
arch/m68knommu/platform/coldfire/clk.c [new file with mode: 0644]

index 4f416a91a829b38c9f130ecad667307ea0ef98f6..1bcb9372353fe8496966ce50f7a67cf2d32f80db 100644 (file)
@@ -14,7 +14,7 @@
 
 asflags-$(CONFIG_FULLDEBUG) := -DDEBUGGER_COMPATIBLE_CACHE=1
 
-obj-$(CONFIG_COLDFIRE) += dma.o entry.o vectors.o
+obj-$(CONFIG_COLDFIRE) += clk.o dma.o entry.o vectors.o
 obj-$(CONFIG_M5206)    += timers.o
 obj-$(CONFIG_M5206e)   += timers.o
 obj-$(CONFIG_M520x)    += pit.o
diff --git a/arch/m68knommu/platform/coldfire/clk.c b/arch/m68knommu/platform/coldfire/clk.c
new file mode 100644 (file)
index 0000000..7cdbf44
--- /dev/null
@@ -0,0 +1,40 @@
+/***************************************************************************/
+
+/*
+ *     clk.c -- general ColdFire CPU kernel clk handling
+ *
+ *     Copyright (C) 2009, Greg Ungerer (gerg@snapgear.com)
+ */
+
+/***************************************************************************/
+
+#include <linux/kernel.h>
+#include <linux/clk.h>
+#include <asm/coldfire.h>
+
+/***************************************************************************/
+
+struct clk *clk_get(struct device *dev, const char *id)
+{
+       return NULL;
+}
+
+int clk_enable(struct clk *clk)
+{
+       return 0;
+}
+
+void clk_disable(struct clk *clk)
+{
+}
+
+void clk_put(struct clk *clk)
+{
+}
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+       return MCF_CLK;
+}
+
+/***************************************************************************/