]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00177310-2 mx6 clock: change _clk_clko_round_rate
authorLily Zhang <r58066@freescale.com>
Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:18 +0000 (14:11 +0200)
Change _clk_clko_round_rate and ensure the clock should
be less than the input rate.

Signed-off-by: Lily Zhang <r58066@freescale.com>
arch/arm/mach-mx6/clock.c

index 06516b86aa0d1b07fc25d4cce1d9611cd8ebbd21..a6a1715124b3874cbec2bea56723f07fc5da5f92 100644 (file)
@@ -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;