diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-29 14:13:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-29 14:13:10 -0400 |
commit | b77d643ced576bdd1e918aebda869de74696cde9 (patch) | |
tree | bb5d708f4bbb48461923a28e63a8cf8bdd477dd7 /arch/mips/mm/c-octeon.c | |
parent | b4020c1b198c0f0c0b0ff0cfdd824a26b93edd6f (diff) | |
parent | 64575f918f3279d8487cf670dbefa956ce16a526 (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (46 commits)
ftrace/MIPS: Enable C Version of recordmcount
ftrace/MIPS: Add module support for C version of recordmcount
ftrace/MIPS: Add MIPS64 support for C version of recordmcount
MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes.
MIPS: Allow UserLocal on MIPS_R1 processors
MIPS: Honor L2 bypass bit
MIPS: Add BMIPS CP0 register definitions
MIPS: Add BMIPS processor types to Kconfig
MIPS: Decouple BMIPS CPU support from bcm47xx/bcm63xx SoC code
MIPS: Add support for hardware performance events (mipsxx)
MIPS: Perf-events: Add callchain support
MIPS: add support for hardware performance events (skeleton)
MIPS: add support for software performance events
MIPS: define local_xchg from xchg_local to atomic_long_xchg
MIPS: AR7: Add support for Titan (TNETV10xx) SoC variant
MIPS: AR7: Initialize GPIO earlier
MIPS: Add platform device and Kconfig for Octeon USB EHCI / OHCI
USB: Add EHCI and OHCH glue for OCTEON II SOCs.
MIPS: Octeon: Add register definitions for EHCI / OHCI USB glue logic.
MIPS: Octeon: Apply CN63XXP1 errata workarounds.
...
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; |