]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/au1000/common/setup.c
[MIPS] Alchemy: work around clock misdetection on early Au1000
[linux-2.6-omap-h63xx.git] / arch / mips / au1000 / common / setup.c
index d885e3848ec6c0842057341e2322cf53fcd29438..9e4ab80caab6b46fb800acc0271a861e39ecc990 100644 (file)
@@ -57,7 +57,7 @@ void __init plat_mem_setup(void)
 {
        struct  cpu_spec *sp;
        char *argptr;
-       unsigned long prid, cpupll, bclk = 1;
+       unsigned long prid, cpufreq, bclk = 1;
 
        set_cpuspec();
        sp = cur_cpu_spec[0];
@@ -65,8 +65,15 @@ void __init plat_mem_setup(void)
        board_setup();  /* board specific setup */
 
        prid = read_c0_prid();
-       cpupll = (au_readl(0xB1900060) & 0x3F) * 12;
-       printk("(PRId %08lx) @ %ldMHZ\n", prid, cpupll);
+       if (sp->cpu_pll_wo)
+#ifdef CONFIG_SOC_AU1000_FREQUENCY
+               cpufreq = CONFIG_SOC_AU1000_FREQUENCY / 1000000;
+#else
+               cpufreq = 396;
+#endif
+       else
+               cpufreq = (au_readl(SYS_CPUPLL) & 0x3F) * 12;
+       printk(KERN_INFO "(PRID %08lx) @ %ld MHz\n", prid, cpufreq);
 
        bclk = sp->cpu_bclk;
        if (bclk)