diff options
Diffstat (limited to 'arch/mips/mm/c-octeon.c')
| -rw-r--r-- | arch/mips/mm/c-octeon.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/mips/mm/c-octeon.c b/arch/mips/mm/c-octeon.c index 0f9c488044d1..16c4d256b76f 100644 --- a/arch/mips/mm/c-octeon.c +++ b/arch/mips/mm/c-octeon.c | |||
| @@ -181,10 +181,10 @@ static void __cpuinit probe_octeon(void) | |||
| 181 | unsigned int config1; | 181 | unsigned int config1; |
| 182 | struct cpuinfo_mips *c = ¤t_cpu_data; | 182 | struct cpuinfo_mips *c = ¤t_cpu_data; |
| 183 | 183 | ||
| 184 | config1 = read_c0_config1(); | ||
| 184 | switch (c->cputype) { | 185 | switch (c->cputype) { |
| 185 | case CPU_CAVIUM_OCTEON: | 186 | case CPU_CAVIUM_OCTEON: |
| 186 | case CPU_CAVIUM_OCTEON_PLUS: | 187 | case CPU_CAVIUM_OCTEON_PLUS: |
| 187 | config1 = read_c0_config1(); | ||
| 188 | c->icache.linesz = 2 << ((config1 >> 19) & 7); | 188 | c->icache.linesz = 2 << ((config1 >> 19) & 7); |
| 189 | c->icache.sets = 64 << ((config1 >> 22) & 7); | 189 | c->icache.sets = 64 << ((config1 >> 22) & 7); |
| 190 | c->icache.ways = 1 + ((config1 >> 16) & 7); | 190 | c->icache.ways = 1 + ((config1 >> 16) & 7); |
| @@ -204,6 +204,20 @@ static void __cpuinit probe_octeon(void) | |||
| 204 | c->options |= MIPS_CPU_PREFETCH; | 204 | c->options |= MIPS_CPU_PREFETCH; |
| 205 | break; | 205 | break; |
| 206 | 206 | ||
| 207 | case CPU_CAVIUM_OCTEON2: | ||
| 208 | c->icache.linesz = 2 << ((config1 >> 19) & 7); | ||
| 209 | c->icache.sets = 8; | ||
| 210 | c->icache.ways = 37; | ||
| 211 | c->icache.flags |= MIPS_CACHE_VTAG; | ||
| 212 | icache_size = c->icache.sets * c->icache.ways * c->icache.linesz; | ||
| 213 | |||
| 214 | c->dcache.linesz = 128; | ||
| 215 | c->dcache.ways = 32; | ||
| 216 | c->dcache.sets = 8; | ||
| 217 | dcache_size = c->dcache.sets * c->dcache.ways * c->dcache.linesz; | ||
| 218 | c->options |= MIPS_CPU_PREFETCH; | ||
| 219 | break; | ||
| 220 | |||
| 207 | default: | 221 | default: |
| 208 | panic("Unsupported Cavium Networks CPU type\n"); | 222 | panic("Unsupported Cavium Networks CPU type\n"); |
| 209 | break; | 223 | break; |
