summaryrefslogtreecommitdiff
path: root/arch/sh/include/asm
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-05-28 13:11:31 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-06-01 18:07:37 +0900
commita1153e27eec25e9963f5843ba8932952bd9847ac (patch)
tree76ef9b57aa5734797a862ad576f4f4e74ab8a3f0 /arch/sh/include/asm
parente89d53e60593ee7066e1d36ab5c1ccf2648f5f53 (diff)
sh: shared div4 clock code
Add shared code for 4-bit divisor clocks. Processor specific code can use SH_CLK_DIV4() to initialize div4 clocks, and then use sh_clk_div4_register() for registration. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm')
-rw-r--r--arch/sh/include/asm/clock.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h
index f43d3e72d266..7435e40022e6 100644
--- a/arch/sh/include/asm/clock.h
+++ b/arch/sh/include/asm/clock.h
@@ -3,6 +3,7 @@
#include <linux/list.h>
#include <linux/seq_file.h>
+#include <linux/cpufreq.h>
#include <linux/clk.h>
#include <linux/err.h>
@@ -41,6 +42,7 @@ struct clk {
unsigned long arch_flags;
void *priv;
struct dentry *dentry;
+ struct cpufreq_frequency_table *freq_table;
};
struct clk_lookup {
@@ -130,4 +132,17 @@ long clk_rate_table_round(struct clk *clk,
int sh_clk_mstp32_register(struct clk *clks, int nr);
+#define SH_CLK_DIV4(_name, _parent, _reg, _shift, _div_bitmap, _flags) \
+{ \
+ .name = _name, \
+ .parent = _parent, \
+ .enable_reg = (void __iomem *)_reg, \
+ .enable_bit = _shift, \
+ .arch_flags = _div_bitmap, \
+ .flags = _flags, \
+}
+
+int sh_clk_div4_register(struct clk *clks, int nr,
+ struct clk_div_mult_table *table);
+
#endif /* __ASM_SH_CLOCK_H */