sh: clkfwk: rate table construction and rounding for SH7785.

This adds support for constructing a rate table by looking at potential
divisors for a specified clock. Each FQRMR clock is given its own table.
Presently each table is rebuilt when the parent propagates down a new
rate, so some more logic needs to be added to do this more intelligently.

Additionally, a fairly generic round_rate() implementation is then
layered on top of it, which subsequently provides us with cpufreq support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Paul Mundt
2009-05-13 20:28:15 +09:00
parent a77b5ac0ea
commit cc96eace48
3 changed files with 100 additions and 13 deletions

View File

@@ -16,6 +16,7 @@ struct clk_ops {
int (*set_rate)(struct clk *clk, unsigned long rate, int algo_id);
int (*set_parent)(struct clk *clk, struct clk *parent);
long (*round_rate)(struct clk *clk, unsigned long rate);
void (*build_rate_table)(struct clk *clk);
};
struct clk {