diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-01-19 21:05:29 -0500 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2015-01-27 14:48:52 -0500 |
commit | bca9690b942654f668ffb5124b2bbd0ba0f007bb (patch) | |
tree | b0e4a32c3175916fbe680dbad1687ac9c7185221 /include/linux/clk-provider.h | |
parent | 15a02c1f6dd7c2bb150c61d00ffb33f584ff2288 (diff) |
clk: divider: Make generic for usage elsewhere
Some devices don't use mmio to interact with dividers. Split out the
logic from the register read/write parts so that we can reuse the
division logic elsewhere.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index ba858e90d5de..0ed5bf2209ad 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -353,6 +353,17 @@ struct clk_divider { | |||
353 | #define CLK_DIVIDER_READ_ONLY BIT(5) | 353 | #define CLK_DIVIDER_READ_ONLY BIT(5) |
354 | 354 | ||
355 | extern const struct clk_ops clk_divider_ops; | 355 | extern const struct clk_ops clk_divider_ops; |
356 | |||
357 | unsigned long divider_recalc_rate(struct clk_hw *hw, unsigned long parent_rate, | ||
358 | unsigned int val, const struct clk_div_table *table, | ||
359 | unsigned long flags); | ||
360 | long divider_round_rate(struct clk_hw *hw, unsigned long rate, | ||
361 | unsigned long *prate, const struct clk_div_table *table, | ||
362 | u8 width, unsigned long flags); | ||
363 | int divider_get_val(unsigned long rate, unsigned long parent_rate, | ||
364 | const struct clk_div_table *table, u8 width, | ||
365 | unsigned long flags); | ||
366 | |||
356 | struct clk *clk_register_divider(struct device *dev, const char *name, | 367 | struct clk *clk_register_divider(struct device *dev, const char *name, |
357 | const char *parent_name, unsigned long flags, | 368 | const char *parent_name, unsigned long flags, |
358 | void __iomem *reg, u8 shift, u8 width, | 369 | void __iomem *reg, u8 shift, u8 width, |