aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/clock.h
diff options
context:
space:
mode:
authordmitry pervushin <dimka@nomadgs.com>2007-04-24 13:39:09 +0900
committerPaul Mundt <lethal@hera.kernel.org>2007-05-07 02:11:56 +0000
commit1929cb340b74904c130fdf3de3fe5bbedb68a5aa (patch)
tree2675de406fca78e6bfd5b29535bbb220a167bc2e /include/asm-sh/clock.h
parentsh: hp6xx pata_platform support. (diff)
downloadlinux-dev-1929cb340b74904c130fdf3de3fe5bbedb68a5aa.tar.xz
linux-dev-1929cb340b74904c130fdf3de3fe5bbedb68a5aa.zip
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 {
void (*enable)(struct clk *clk);
void (*disable)(struct clk *clk);
void (*recalc)(struct clk *clk);
- int (*set_rate)(struct clk *clk, unsigned long rate);
+ int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id);
};
struct clk {
@@ -50,4 +50,34 @@ void clk_unregister(struct clk *);
int show_clocks(struct seq_file *m);
+/* the exported API, in addition to clk_set_rate */
+/**
+ * clk_set_rate_ex - set the clock rate for a clock source, with additional parameter
+ * @clk: clock source
+ * @rate: desired clock rate in Hz
+ * @algo_id: algorithm id to be passed down to ops->set_rate
+ *
+ * Returns success (0) or negative errno.
+ */
+int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id);
+
+enum clk_sh_algo_id {
+ NO_CHANGE = 0,
+
+ IUS_N1_N1,
+ IUS_322,
+ IUS_522,
+ IUS_N11,
+
+ SB_N1,
+
+ SB3_N1,
+ SB3_32,
+ SB3_43,
+ SB3_54,
+
+ BP_N1,
+
+ IP_N1,
+};
#endif /* __ASM_SH_CLOCK_H */