S3C64XX: Fix ARMCLK configuration
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 15 Jul 2009 12:03:35 +0000 (13:03 +0100)
committerBen Dooks <ben-linux@fluff.org>
Wed, 29 Jul 2009 22:47:14 +0000 (23:47 +0100)
The value of armclk_mask needs to be inverted for use as a mask on
the register value when updating ARM_RATIO.

This is critical for cpufreq support, without it attempts to scale
the frequency of the core trash pretty much the entire clock tree.

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 f8165e622478f0a2e30fb3365327f7ea9925e7d0..febac1950d8ea658c5ba1321d56a000f01509972 100644 (file)
@@ -175,7 +175,7 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate)
        div = clk_get_rate(clk->parent) / rate;
 
        val = __raw_readl(S3C_CLK_DIV0);
-       val &= armclk_mask;
+       val &= ~armclk_mask;
        val |= (div - 1);
        __raw_writel(val, S3C_CLK_DIV0);