summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/clock.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2014-03-10 17:33:33 -0700
committerYu-Huan Hsu <yhsu@nvidia.com>2014-03-11 19:31:05 -0700
commit3bd440f72d1720bf30c6b6aff384838c23c9cdbb (patch)
treed72dc9be0ed033926159195faba8321f9f3ca7b4 /arch/arm/mach-tegra/clock.c
parent4e04c02fc642aabaa754736ec2dd0e81a6bd4556 (diff)
ARM: tegra: clock: Round up locked all rate
Rounded up rate returned by clk_get_rate_all_locked() function. This is consistent with other tegra clk_get_rate*() interfaces, and makes unnecessary 1Hz compensation when clk_get_rate_all_locked() is called during resume. Change-Id: I7711b6460fe2118e2bb8ccce789ecb4bf3b92e90 Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/379747 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hoang Pham <hopham@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/clock.c')
-rw-r--r--arch/arm/mach-tegra/clock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 799dd1f63a15..bf595c29dabf 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -628,6 +628,7 @@ unsigned long clk_get_rate_all_locked(struct clk *c)
rate = c->rate;
rate *= mul;
+ rate += div - 1; /* round up */
do_div(rate, div);
return rate;