microblaze: Do not use PVR configuration for broken MB version
authorMichal Simek <monstr@monstr.eu>
Tue, 21 Apr 2009 12:06:08 +0000 (14:06 +0200)
committerMichal Simek <monstr@monstr.eu>
Thu, 23 Apr 2009 14:27:28 +0000 (16:27 +0200)
Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
arch/microblaze/kernel/cpu/cpuinfo.c

index cf7424a6bb87b342812f22dcb8de481ce3b10294..153f57c57b6d90ef008d706b4e34319f14045949 100644 (file)
@@ -30,6 +30,13 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
        int temp; /* for saving temp value */
        get_pvr(&pvr);
 
+       CI(ver_code, VERSION);
+       if (!ci->ver_code) {
+               printk(KERN_ERR "ERROR: MB has broken PVR regs "
+                                               "-> use DTS setting\n");
+               return;
+       }
+
        temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) |\
                PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr);
        if (ci->use_instr != temp)
@@ -60,8 +67,6 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
 
        CI(mmu, USE_MMU);
 
-       CI(ver_code, VERSION);
-
        CI(use_icache, USE_ICACHE);
        CI(icache_tagbits, ICACHE_ADDR_TAG_BITS);
        CI(icache_write, ICACHE_ALLOW_WR);
index 4a740dfcf6daf9d7fc74ed834300fce647cd04ac..a10bea119b946f0b637befe039705c432cdce888 100644 (file)
@@ -71,7 +71,7 @@ void __init setup_cpuinfo(void)
                        __func__);
                set_cpuinfo_static(&cpuinfo, cpu);
                break;
-/* FIXME I found weird behavior with MB 7.00.a/b
+/* FIXME I found weird behavior with MB 7.00.a/b 7.10.a
  * please do not use FULL PVR with MMU */
        case 1:
                printk(KERN_INFO "%s: Using full CPU PVR support\n",