Skip to content

Commit 47d979e

Browse files
David Daneyralfbaechle
authored andcommitted
MIPS: Hook Cavium OCTEON cache init into cache.c
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>
1 parent 0dd4781 commit 47d979e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎arch/mips/include/asm/cpu-features.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#ifndef cpu_has_tx39_cache
3939
#define cpu_has_tx39_cache (cpu_data[0].options & MIPS_CPU_TX39_CACHE)
4040
#endif
41+
#ifndef cpu_has_octeon_cache
42+
#define cpu_has_octeon_cache 0
43+
#endif
4144
#ifndef cpu_has_fpu
4245
#define cpu_has_fpu (current_cpu_data.options & MIPS_CPU_FPU)
4346
#define raw_cpu_has_fpu (raw_current_cpu_data.options & MIPS_CPU_FPU)

‎arch/mips/mm/cache.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ void __devinit cpu_cache_init(void)
182182
tx39_cache_init();
183183
}
184184

185+
if (cpu_has_octeon_cache) {
186+
extern void __weak octeon_cache_init(void);
187+
188+
octeon_cache_init();
189+
}
190+
185191
setup_protection_map();
186192
}
187193

0 commit comments

Comments
 (0)