sh: x3 - add ipi vectors
[safe/jmp/linux-2.6] / arch / sh / kernel / cpu / init.c
index 6451ad6..fdc245b 100644 (file)
@@ -21,8 +21,7 @@
 #include <asm/cacheflush.h>
 #include <asm/cache.h>
 #include <asm/io.h>
-
-extern void detect_cpu_and_cache_system(void);
+#include <asm/ubc.h>
 
 /*
  * Generic wrapper for command line arguments to disable on-chip
@@ -144,21 +143,15 @@ static void __init cache_init(void)
                flags &= ~CCR_CACHE_EMODE;
 #endif
 
-#ifdef CONFIG_SH_WRITETHROUGH
-       /* Turn on Write-through caching */
+#if defined(CONFIG_CACHE_WRITETHROUGH)
+       /* Write-through */
        flags |= CCR_CACHE_WT;
-#else
-       /* .. or default to Write-back */
+#elif defined(CONFIG_CACHE_WRITEBACK)
+       /* Write-back */
        flags |= CCR_CACHE_CB;
-#endif
-
-#ifdef CONFIG_SH_OCRAM
-       /* Turn on OCRAM -- halve the OC */
-       flags |= CCR_CACHE_ORA;
-       current_cpu_data.dcache.sets >>= 1;
-
-       current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets *
-                                   current_cpu_data.dcache.linesz;
+#else
+       /* Off */
+       flags &= ~CCR_CACHE_ENABLE;
 #endif
 
        ctrl_outl(flags, CCR);
@@ -269,7 +262,6 @@ asmlinkage void __init sh_cpu_init(void)
        }
 #endif
 
-#ifdef CONFIG_UBC_WAKEUP
        /*
         * Some brain-damaged loaders decided it would be a good idea to put
         * the UBC to sleep. This causes some issues when it comes to things
@@ -277,7 +269,5 @@ asmlinkage void __init sh_cpu_init(void)
         * we wake it up and hope that all is well.
         */
        ubc_wakeup();
-#endif
-
        speculative_execution_init();
 }