diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-01-26 20:12:57 -0700 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-01-26 20:12:57 -0700 |
commit | e9b98f6040f5a7a04d659759d83ea28d9c528800 (patch) | |
tree | 904811708c1e70cb26eb5e680e3974087085954f /arch/arm/plat-omap/clock.c | |
parent | ced825293ac34d4f250775c40f13cc6330653309 (diff) | |
download | kernel_samsung_tuna-e9b98f6040f5a7a04d659759d83ea28d9c528800.zip kernel_samsung_tuna-e9b98f6040f5a7a04d659759d83ea28d9c528800.tar.gz kernel_samsung_tuna-e9b98f6040f5a7a04d659759d83ea28d9c528800.tar.bz2 |
OMAP clock: make the fixed divisor clock code available for all OMAPs
One of the OMAP1 clocks can use the fixed divisor recalculation code
introduced in the OMAP2 clock code, so rename the
omap2_fixed_divisor_recalc() function to omap_fixed_divisor_recalc()
and make it available to all OMAPs. A followup patch converts the OMAP1
clock.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap/clock.c')
-rw-r--r-- | arch/arm/plat-omap/clock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index d9f8c84..e0f72f4 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -199,6 +199,17 @@ unsigned long followparent_recalc(struct clk *clk) return clk->parent->rate; } +/* + * Used for clocks that have the same value as the parent clock, + * divided by some factor + */ +unsigned long omap_fixed_divisor_recalc(struct clk *clk) +{ + WARN_ON(!clk->fixed_div); + + return clk->parent->rate / clk->fixed_div; +} + void clk_reparent(struct clk *child, struct clk *parent) { list_del_init(&child->sibling); |