summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-08-31 01:36:52 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-20 08:56:42 +0200
commit6186a855158afcd8d97002da973d88adc8637cdd (patch)
tree3b52d17549605bfc7150a6d702a27996da87e72b /include
parenta1ea745cb0a59d3627a3f8f2fda3ca913014cae0 (diff)
downloadbarebox-6186a855158afcd8d97002da973d88adc8637cdd.tar.gz
barebox-6186a855158afcd8d97002da973d88adc8637cdd.tar.xz
arm: move clkdev to drivers/clk
as refer in this patch "arm & sh: factorised duplicated clkdev.c" factorise some generic infrastructure to assist looking up struct clks for the ARM & SH architecture. as the code is identical at 99% in linux move it also as preparing for the SH adding Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/clkdev.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
new file mode 100644
index 0000000000..ae38e1a166
--- /dev/null
+++ b/include/linux/clkdev.h
@@ -0,0 +1,36 @@
+/*
+ * include/linux/clkdev.h
+ *
+ * Copyright (C) 2008 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Helper for the clk API to assist looking up a struct clk.
+ */
+#ifndef __CLKDEV_H
+#define __CLKDEV_H
+
+#include <asm/clkdev.h>
+
+struct clk;
+struct device_d;
+
+struct clk_lookup {
+ struct list_head node;
+ const char *dev_id;
+ const char *con_id;
+ struct clk *clk;
+};
+
+struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
+ const char *dev_fmt, ...);
+
+void clkdev_add(struct clk_lookup *cl);
+void clkdev_drop(struct clk_lookup *cl);
+
+void clkdev_add_table(struct clk_lookup *, size_t);
+int clk_add_alias(const char *, const char *, char *, struct device_d *);
+
+#endif