diff options
Diffstat (limited to 'arch/arm/mach-tegra/tegra20_clocks.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra20_clocks.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra20_clocks.c b/arch/arm/mach-tegra/tegra20_clocks.c index d9ce0087f6a6..840ab262272a 100644 --- a/arch/arm/mach-tegra/tegra20_clocks.c +++ b/arch/arm/mach-tegra/tegra20_clocks.c | |||
@@ -376,6 +376,25 @@ struct clk_ops tegra_super_ops = { | |||
376 | .recalc_rate = tegra20_super_clk_recalc_rate, | 376 | .recalc_rate = tegra20_super_clk_recalc_rate, |
377 | }; | 377 | }; |
378 | 378 | ||
379 | static unsigned long tegra20_twd_clk_recalc_rate(struct clk_hw *hw, | ||
380 | unsigned long parent_rate) | ||
381 | { | ||
382 | struct clk_tegra *c = to_clk_tegra(hw); | ||
383 | u64 rate = parent_rate; | ||
384 | |||
385 | if (c->mul != 0 && c->div != 0) { | ||
386 | rate *= c->mul; | ||
387 | rate += c->div - 1; /* round up */ | ||
388 | do_div(rate, c->div); | ||
389 | } | ||
390 | |||
391 | return rate; | ||
392 | } | ||
393 | |||
394 | struct clk_ops tegra_twd_ops = { | ||
395 | .recalc_rate = tegra20_twd_clk_recalc_rate, | ||
396 | }; | ||
397 | |||
379 | static u8 tegra20_cop_clk_get_parent(struct clk_hw *hw) | 398 | static u8 tegra20_cop_clk_get_parent(struct clk_hw *hw) |
380 | { | 399 | { |
381 | return 0; | 400 | return 0; |