summaryrefslogtreecommitdiff
path: root/arch/arm/mach-nomadik/clock.c
diff options
context:
space:
mode:
authorAlessandro Rubini <rubini@gnudd.com>2009-07-02 18:06:47 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-07-02 20:20:44 (GMT)
commit28ad94ec61dc60207dbffdb95ff870c617fbb832 (patch)
tree4ee4d2fc06f98d70c0f7f803179b94638bc0e850 /arch/arm/mach-nomadik/clock.c
parent8c81b52422147b4b09f5adb8d0c6963342a336c6 (diff)
downloadlinux-fsl-qoriq-28ad94ec61dc60207dbffdb95ff870c617fbb832.tar.xz
[ARM] 5590/1: Add basic support for ST Nomadik 8815 SoC and evaluation board
This patch adds the basic infrastructure for the Nomadik 8815 CPU and the "Nomadik Hardware Kit" NHK8815. This patch only includes the serial console and core stuff, no drivers. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-nomadik/clock.c')
-rw-r--r--arch/arm/mach-nomadik/clock.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c
new file mode 100644
index 0000000..9f92502
--- /dev/null
+++ b/arch/arm/mach-nomadik/clock.c
@@ -0,0 +1,45 @@
+/*
+ * linux/arch/arm/mach-nomadik/clock.c
+ *
+ * Copyright (C) 2009 Alessandro Rubini
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/clk.h>
+#include <asm/clkdev.h>
+#include "clock.h"
+
+/*
+ * The nomadik board uses generic clocks, but the serial pl011 file
+ * calls clk_enable(), clk_disable(), clk_get_rate(), so we provide them
+ */
+unsigned long clk_get_rate(struct clk *clk)
+{
+ return clk->rate;
+}
+EXPORT_SYMBOL(clk_get_rate);
+
+/* enable and disable do nothing */
+int clk_enable(struct clk *clk)
+{
+ return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+void clk_disable(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_disable);
+
+/* Create a clock structure with the given name */
+int nmdk_clk_create(struct clk *clk, const char *dev_id)
+{
+ struct clk_lookup *clkdev;
+
+ clkdev = clkdev_alloc(clk, NULL, dev_id);
+ if (!clkdev)
+ return -ENOMEM;
+ clkdev_add(clkdev);
+ return 0;
+}