aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/clock.h
diff options
context:
space:
mode:
authordmitry pervushin <dimka@nomadgs.com>2007-04-24 00:39:09 -0400
committerPaul Mundt <lethal@hera.kernel.org>2007-05-06 22:11:56 -0400
commit1929cb340b74904c130fdf3de3fe5bbedb68a5aa (patch)
tree2675de406fca78e6bfd5b29535bbb220a167bc2e /include/asm-sh/clock.h
parent34a780a0afeb8f99c9ca9934f4cc0822541769c6 (diff)
sh: SH7722 clock framework support.
This adds support for the SH7722 (MobileR) to the clock framework. Signed-off-by: dmitry pervushin <dimka@nomadgs.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/clock.h')
-rw-r--r--include/asm-sh/clock.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/include/asm-sh/clock.h b/include/asm-sh/clock.h
index 1df92807f8c5..a5d629f090d4 100644
--- a/include/asm-sh/clock.h
+++ b/include/asm-sh/clock.h
@@ -13,7 +13,7 @@ struct clk_ops {
13 void (*enable)(struct clk *clk); 13 void (*enable)(struct clk *clk);
14 void (*disable)(struct clk *clk); 14 void (*disable)(struct clk *clk);
15 void (*recalc)(struct clk *clk); 15 void (*recalc)(struct clk *clk);
16 int (*set_rate)(struct clk *clk, unsigned long rate); 16 int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id);
17}; 17};
18 18
19struct clk { 19struct clk {
@@ -50,4 +50,34 @@ void clk_unregister(struct clk *);
50 50
51int show_clocks(struct seq_file *m); 51int show_clocks(struct seq_file *m);
52 52
53/* the exported API, in addition to clk_set_rate */
54/**
55 * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter
56 * @clk: clock source
57 * @rate: desired clock rate in Hz
58 * @algo_id: algorithm id to be passed down to ops->set_rate
59 *
60 * Returns success (0) or negative errno.
61 */
62int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id);
63
64enum clk_sh_algo_id {
65 NO_CHANGE = 0,
66
67 IUS_N1_N1,
68 IUS_322,
69 IUS_522,
70 IUS_N11,
71
72 SB_N1,
73
74 SB3_N1,
75 SB3_32,
76 SB3_43,
77 SB3_54,
78
79 BP_N1,
80
81 IP_N1,
82};
53#endif /* __ASM_SH_CLOCK_H */ 83#endif /* __ASM_SH_CLOCK_H */