]> err.no Git - linux-2.6/blobdiff - arch/sh/kernel/cpu/sh4/probe.c
sh: Disable L2 reporting for present URAM only parts.
[linux-2.6] / arch / sh / kernel / cpu / sh4 / probe.c
index 58950de2696d1ab5285fa1024d19ebcfc8ee2ff3..8f318a4fe722afec4a11bdbb3c032626313e4110 100644 (file)
@@ -3,7 +3,7 @@
  *
  * CPU Subtype Probing for SH-4.
  *
- * Copyright (C) 2001 - 2006  Paul Mundt
+ * Copyright (C) 2001 - 2007  Paul Mundt
  * Copyright (C) 2003  Richard Curnow
  *
  * This file is subject to the terms and conditions of the GNU General Public
@@ -12,6 +12,7 @@
  */
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/smp.h>
 #include <asm/processor.h>
 #include <asm/cache.h>
 
@@ -51,12 +52,9 @@ int __init detect_cpu_and_cache_system(void)
        current_cpu_data.dcache.linesz          = L1_CACHE_BYTES;
 
        /*
-        * Setup some generic flags we can probe
-        * (L2 and DSP detection only work on SH-4A)
+        * Setup some generic flags we can probe on SH-4A parts
         */
        if (((pvr >> 16) & 0xff) == 0x10) {
-               if ((cvr & 0x02000000) == 0)
-                       current_cpu_data.flags |= CPU_HAS_L2_CACHE;
                if ((cvr & 0x10000000) == 0)
                        current_cpu_data.flags |= CPU_HAS_DSP;
 
@@ -89,12 +87,6 @@ int __init detect_cpu_and_cache_system(void)
                current_cpu_data.type = CPU_SH7751;
                current_cpu_data.flags |= CPU_HAS_FPU;
                break;
-       case 0x2000:
-               current_cpu_data.type = CPU_SH73180;
-               current_cpu_data.icache.ways = 4;
-               current_cpu_data.dcache.ways = 4;
-               current_cpu_data.flags |= CPU_HAS_LLSC;
-               break;
        case 0x2001:
        case 0x2004:
                current_cpu_data.type = CPU_SH7770;
@@ -124,6 +116,14 @@ int __init detect_cpu_and_cache_system(void)
                current_cpu_data.dcache.ways = 4;
                current_cpu_data.flags |= CPU_HAS_LLSC;
                break;
+       case 0x3004:
+       case 0x3007:
+               current_cpu_data.type = CPU_SH7785;
+               current_cpu_data.icache.ways = 4;
+               current_cpu_data.dcache.ways = 4;
+               current_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER |
+                                         CPU_HAS_LLSC;
+               break;
        case 0x3008:
                if (prr == 0xa0) {
                        current_cpu_data.type = CPU_SH7722;
@@ -132,6 +132,14 @@ int __init detect_cpu_and_cache_system(void)
                        current_cpu_data.flags |= CPU_HAS_LLSC;
                }
                break;
+       case 0x4000:    /* 1st cut */
+       case 0x4001:    /* 2nd cut */
+               current_cpu_data.type = CPU_SHX3;
+               current_cpu_data.icache.ways = 4;
+               current_cpu_data.dcache.ways = 4;
+               current_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER |
+                                         CPU_HAS_LLSC;
+               break;
        case 0x8000:
                current_cpu_data.type = CPU_ST40RA;
                current_cpu_data.flags |= CPU_HAS_FPU;