S3C64XX: Fix get_rate() for ARMCLK
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 15 Jul 2009 12:03:34 +0000 (13:03 +0100)
committerBen Dooks <ben-linux@fluff.org>
Wed, 29 Jul 2009 22:47:14 +0000 (23:47 +0100)
If the requested clock is faster than the parent clock then the
parent clock is the closest we can get to the request so we need
to return that instead of the requested clock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/plat-s3c64xx/s3c6400-clock.c

index 1debc1f9f987bd09cc96d0d2574493bd5adb9e73..f8165e622478f0a2e30fb3365327f7ea9925e7d0 100644 (file)
@@ -153,7 +153,7 @@ static unsigned long s3c64xx_clk_arm_round_rate(struct clk *clk,
        u32 div;
 
        if (parent < rate)
-               return rate;
+               return parent;
 
        div = (parent / rate) - 1;
        if (div > armclk_mask)