]> err.no Git - linux-2.6/commitdiff
SM501: initialise SDRAM clock before bus clocks
authorBen Dooks <ben-linux@fluff.org>
Sun, 24 Jun 2007 00:16:29 +0000 (17:16 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 24 Jun 2007 15:59:11 +0000 (08:59 -0700)
This init sequence of setting the SDRAM clock before the bus clock is
recommend by Silicon Motion to stop problems with writes not sticking into
registers.

Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mfd/sm501.c

index 72bbecf4b4516910c1ac7335865653508e45a198..4c4412e0de24e429b6a703d8c423cd1cb2944e1b 100644 (file)
@@ -843,15 +843,15 @@ static void sm501_init_regs(struct sm501_devdata *sm,
        sm501_init_reg(sm, SM501_GPIO31_0_CONTROL, &init->gpio_low);
        sm501_init_reg(sm, SM501_GPIO63_32_CONTROL, &init->gpio_high);
 
-       if (init->mclk) {
-               dev_info(sm->dev, "setting MCLK to %ld\n", init->mclk);
-               sm501_set_clock(sm->dev, SM501_CLOCK_MCLK, init->mclk);
-       }
-
        if (init->m1xclk) {
                dev_info(sm->dev, "setting M1XCLK to %ld\n", init->m1xclk);
                sm501_set_clock(sm->dev, SM501_CLOCK_M1XCLK, init->m1xclk);
        }
+
+       if (init->mclk) {
+               dev_info(sm->dev, "setting MCLK to %ld\n", init->mclk);
+               sm501_set_clock(sm->dev, SM501_CLOCK_MCLK, init->mclk);
+       }
 }
 
 static unsigned int sm501_mem_local[] = {