]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: lantiq: explicitly enable clkout generation
authorJohn Crispin <blogic@openwrt.org>
Tue, 24 Jul 2012 06:56:41 +0000 (08:56 +0200)
committerJohn Crispin <blogic@openwrt.org>
Tue, 21 Aug 2012 17:15:12 +0000 (19:15 +0200)
Previously we relied on the bootloader to have enabled this bit. However some
bootloaders seem to not enable this for us.

Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4120/

arch/mips/lantiq/xway/sysctrl.c

index befbb760ab766aee198df2dfd2ff66d0bd1832d3..8430983d3e70d734d7192219314347f87afe2478 100644 (file)
@@ -187,10 +187,12 @@ static int clkout_enable(struct clk *clk)
        for (i = 0; i < 4; i++) {
                if (clk->rates[i] == clk->rate) {
                        int shift = 14 - (2 * clk->module);
+                       int enable = 7 - clk->module;
                        unsigned int val = ltq_cgu_r32(ifccr);
 
                        val &= ~(3 << shift);
                        val |= i << shift;
+                       val |= enable;
                        ltq_cgu_w32(val, ifccr);
                        return 0;
                }