[ARM] 4790/1: S3C2412: Fix parent selection for msysclk.
authorBen Dooks <ben-linux@fluff.org>
Mon, 28 Jan 2008 12:01:30 +0000 (13:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Jan 2008 13:20:52 +0000 (13:20 +0000)
The msysclk clock was checking for the wrong PLL for the
parent in s3c2412_setparent_msysclk(), trying the UPLL instead
of the MPLL output.

Also ensure the mpll and fclks are at the same rate at init time.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-s3c2412/clock.c
arch/arm/mach-s3c2412/s3c2412.c

index 42ccb5eb6042cbbb7c978c2a32c0676d99f9ef30..0f752500cd5ba6b5d391e0ae677718d17c293c2a 100644 (file)
@@ -217,7 +217,7 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
 
        if (parent == &clk_mdivclk)
                clksrc &= ~S3C2412_CLKSRC_MSYSCLK_MPLL;
-       else if (parent == &clk_upll)
+       else if (parent == &clk_mpll)
                clksrc |= S3C2412_CLKSRC_MSYSCLK_MPLL;
        else
                return -EINVAL;
index 265cd3f567a3fe164bbe9027cd2856120e725dd9..abf1599c9f97f277b009fd6c64ed6e14629bba46 100644 (file)
@@ -168,6 +168,8 @@ void __init s3c2412_init_clocks(int xtal)
 
        fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2);
 
+       clk_mpll.rate = fclk;
+
        tmp = __raw_readl(S3C2410_CLKDIVN);
 
        /* work out clock scalings */