MIPS: Hook Cavium OCTEON cache init into cache.c
authorDavid Daney <ddaney@caviumnetworks.com>
Thu, 11 Dec 2008 23:33:27 +0000 (15:33 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Sun, 11 Jan 2009 09:57:22 +0000 (09:57 +0000)
Follow precedent of other boards, and hook-up the CPU specific cache
init.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/cpu-features.h
arch/mips/mm/cache.c

index 12d12dfe73c096b8994c6f0a6bacb12d977e5f35..a0d14f85b7815958035a08894e8882274201aa2f 100644 (file)
@@ -38,6 +38,9 @@
 #ifndef cpu_has_tx39_cache
 #define cpu_has_tx39_cache     (cpu_data[0].options & MIPS_CPU_TX39_CACHE)
 #endif
+#ifndef cpu_has_octeon_cache
+#define cpu_has_octeon_cache   0
+#endif
 #ifndef cpu_has_fpu
 #define cpu_has_fpu            (current_cpu_data.options & MIPS_CPU_FPU)
 #define raw_cpu_has_fpu                (raw_current_cpu_data.options & MIPS_CPU_FPU)
index 1eb7c71e3d6adfe25916070e180ae87e0b3eedbf..98ad0a82c29e84cd35303809e3c473c6a7531e10 100644 (file)
@@ -182,6 +182,12 @@ void __devinit cpu_cache_init(void)
                tx39_cache_init();
        }
 
+       if (cpu_has_octeon_cache) {
+               extern void __weak octeon_cache_init(void);
+
+               octeon_cache_init();
+       }
+
        setup_protection_map();
 }