summaryrefslogtreecommitdiff
path: root/arch/arm/mach-w90x900/clock.h
diff options
context:
space:
mode:
authorwanzongshun <mcuos.com@gmail.com>2009-06-10 15:50:44 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-06-11 14:45:18 +0100
commit0e4a34bb6565346a8d7cc56cab412a1f98d5b1cd (patch)
treed0a7ec7e72bde2b9b9a4650fe311d5f22163ee26 /arch/arm/mach-w90x900/clock.h
parentc52d3d688b09c50de12cb2fbdfebb18b3b664b00 (diff)
[ARM] 5549/1: Add clock api for w90p910 platform.
Add clock api for w90p910 platform. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-w90x900/clock.h')
-rw-r--r--arch/arm/mach-w90x900/clock.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-w90x900/clock.h b/arch/arm/mach-w90x900/clock.h
new file mode 100644
index 000000000000..4f27bda76d56
--- /dev/null
+++ b/arch/arm/mach-w90x900/clock.h
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/arm/mach-w90x900/clock.h
+ *
+ * Copyright (c) 2008 Nuvoton technology corporation
+ *
+ * Wan ZongShun <mcuos.com@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License.
+ */
+
+#include <asm/clkdev.h>
+
+void w90x900_clk_enable(struct clk *clk, int enable);
+void clks_register(struct clk_lookup *clks, size_t num);
+
+struct clk {
+ unsigned long cken;
+ unsigned int enabled;
+ void (*enable)(struct clk *, int enable);
+};
+
+#define DEFINE_CLK(_name, _ctrlbit) \
+struct clk clk_##_name = { \
+ .enable = w90x900_clk_enable, \
+ .cken = (1 << _ctrlbit), \
+ }
+
+#define DEF_CLKLOOK(_clk, _devname, _conname) \
+ { \
+ .clk = _clk, \
+ .dev_id = _devname, \
+ .con_id = _conname, \
+ }
+