summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx6/clock.c
diff options
context:
space:
mode:
authorLily Zhang <r58066@freescale.com>2012-03-13 18:47:50 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:24:17 +0800
commit6238c8255d5e93f177723d5898d5d45250d5e994 (patch)
treedd213973c4eced9576221f43c25047630d827cf4 /arch/arm/mach-mx6/clock.c
parentd81c4b9e7936b1503bb787e7c7df0a26704744f7 (diff)
ENGR00177310-2 mx6 clock: change _clk_clko_round_rate
Change _clk_clko_round_rate and ensure the clock should be less than the input rate. Signed-off-by: Lily Zhang <r58066@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx6/clock.c')
-rw-r--r--arch/arm/mach-mx6/clock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/clock.c b/arch/arm/mach-mx6/clock.c
index 06516b86aa0d..a6a1715124b3 100644
--- a/arch/arm/mach-mx6/clock.c
+++ b/arch/arm/mach-mx6/clock.c
@@ -4821,6 +4821,9 @@ static unsigned long _clk_clko_round_rate(struct clk *clk,
*/
if (div == 0)
div++;
+ else if (parent_rate % rate)
+ div++;
+
if (div > 8)
div = 8;
return parent_rate / div;