]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh/clock.h
IB/ipath: Fix sparse warning about pointer signedness
[linux-2.6-omap-h63xx.git] / include / asm-sh / clock.h
index 1df92807f8c5b1bd67092d9c52e9338d79d7ab98..b550a27a7042c85bc856a39b0eec86dcba0ca9a8 100644 (file)
@@ -13,7 +13,8 @@ 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);
+       long (*round_rate)(struct clk *clk, unsigned long rate);
 };
 
 struct clk {
@@ -48,6 +49,34 @@ void clk_recalc_rate(struct clk *);
 int clk_register(struct clk *);
 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 */