MIPS: Alchemy: Fix cpu clock calculation
[linux-2.6-microblaze.git] / arch / mips / alchemy / common / clock.c
index 3612d76..4b5ec49 100644 (file)
@@ -127,6 +127,8 @@ static unsigned long alchemy_clk_cpu_recalc(struct clk_hw *hw,
                t = 396000000;
        else {
                t = alchemy_rdsys(AU1000_SYS_CPUPLL) & 0x7f;
+               if (alchemy_get_cputype() < ALCHEMY_CPU_AU1300)
+                       t &= 0x3f;
                t *= parent_rate;
        }