[ARM] 3469/1: S3C24XX: clkout missing hclk selector
authorBen Dooks <ben-linux@fluff.org>
Sun, 9 Apr 2006 21:21:10 +0000 (22:21 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 9 Apr 2006 21:21:10 +0000 (22:21 +0100)
Patch from Ben Dooks

The clkout0/1 output parent code is missing the
HCLK option, and does not set clk->parent field
after updating the clock field

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

index b7f85e6d6b76f6e09816a3c6dd9df34e48161f85..6de713ad319a1c798c3444da58c2f545d933fb37 100644 (file)
@@ -367,6 +367,8 @@ static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent)
                source = S3C2410_MISCCR_CLK0_UPLL;
        else if (parent == &clk_f)
                source = S3C2410_MISCCR_CLK0_FCLK;
+       else if (parent == &clk_h)
+               source = S3C2410_MISCCR_CLK0_HCLK;
        else if (parent == &clk_p)
                source = S3C2410_MISCCR_CLK0_PCLK;
        else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0)
@@ -376,6 +378,8 @@ static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent)
        else
                return -EINVAL;
 
+       clk->parent = parent;
+
        if (clk == &s3c24xx_dclk0)
                mask = S3C2410_MISCCR_CLK0_MASK;
        else {