From: Mark Brown Date: Wed, 15 Jul 2009 12:03:34 +0000 (+0100) Subject: S3C64XX: Fix get_rate() for ARMCLK X-Git-Tag: v2.6.31-rc6~40^2~5^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1d91e1a296244690461a7c36d71710dfbabbc219;p=karo-tx-linux.git S3C64XX: Fix get_rate() for ARMCLK 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 Signed-off-by: Ben Dooks --- diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c index 1debc1f9f987..f8165e622478 100644 --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c @@ -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)