Skip to contentSkip to conversation

MIPS: Add support for OCTEON III based SoCs.

PATCH In review David Daney 2 participants 7 messages Jul 29, 2013 – Jul 30, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

cover MIPS: Add support for OCTEON III based SoCs.

From: David Daney <[email protected]>

These patches add minimal support for SoCs in the OCTEON III family. In many respects, they are similar to OCTEON II, but with larger cache and FPU. FPU support comes later...

David Daney (5):
MIPS: Add CPU identifiers for more OCTEON family members.
MIPS: Probe for new OCTEON CPU/SoC types.
MIPS: Use r4k_wait for OCTEON3 CPUs.
MIPS: Generate OCTEON3 TLB handlers with the same features as
OCTEON2.
MIPS: OCTEON: Set L1 cache parameters for OCTEON3 CPUs.

 arch/mips/include/asm/cpu.h  |  5 ++++-
 arch/mips/kernel/cpu-probe.c |  7 +++++++
 arch/mips/kernel/idle.c      |  1 +
 arch/mips/mm/c-octeon.c      | 14 ++++++++++++++
 arch/mips/mm/tlbex.c         |  2 ++
 5 files changed, 28 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.11.7
#1 lore raw

PATCH 1/5 MIPS: Add CPU identifiers for more OCTEON family members.

From: David Daney <[email protected]>

Needed to support new SOCs.

---
 arch/mips/include/asm/cpu.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/mips/include/asm/cpu.h +4 -1
index 632bbe5..c198615 100644
@@ -141,6 +141,9 @@
 #define PRID_IMP_CAVIUM_CN68XX 0x9100
 #define PRID_IMP_CAVIUM_CN66XX 0x9200
 #define PRID_IMP_CAVIUM_CN61XX 0x9300
+#define PRID_IMP_CAVIUM_CNF71XX 0x9400
+#define PRID_IMP_CAVIUM_CN78XX 0x9500
+#define PRID_IMP_CAVIUM_CN70XX 0x9600
 
 /*
  * These are the PRID's for when 23:16 == PRID_COMP_INGENIC
@@ -272,7 +275,7 @@ enum cpu_type_enum {
 	 */
 	CPU_5KC, CPU_5KE, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2,
 	CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, CPU_CAVIUM_OCTEON2,
-	CPU_XLR, CPU_XLP,
+	CPU_CAVIUM_OCTEON3, CPU_XLR, CPU_XLP,
 
 	CPU_LAST
 };
Signature · 1 line
1.7.11.7
#2 lore raw

PATCH 2/5 MIPS: Probe for new OCTEON CPU/SoC types.

In reply to David Daney

From: David Daney <[email protected]>

Add probing for CNF71XX, CN78XX and CN70XX.

---
 arch/mips/kernel/cpu-probe.c | 7 +++++++
 1 file changed, 7 insertions(+)
arch/mips/kernel/cpu-probe.c +7 -0
index 4c6167a..8e8feb8 100644
@@ -852,10 +852,17 @@ platform:
 	case PRID_IMP_CAVIUM_CN63XX:
 	case PRID_IMP_CAVIUM_CN66XX:
 	case PRID_IMP_CAVIUM_CN68XX:
+	case PRID_IMP_CAVIUM_CNF71XX:
 		c->cputype = CPU_CAVIUM_OCTEON2;
 		__cpu_name[cpu] = "Cavium Octeon II";
 		set_elf_platform(cpu, "octeon2");
 		break;
+	case PRID_IMP_CAVIUM_CN70XX:
+	case PRID_IMP_CAVIUM_CN78XX:
+		c->cputype = CPU_CAVIUM_OCTEON3;
+		__cpu_name[cpu] = "Cavium Octeon III";
+		set_elf_platform(cpu, "octeon3");
+		break;
 	default:
 		printk(KERN_INFO "Unknown Octeon chip!\n");
 		c->cputype = CPU_UNKNOWN;
Signature · 1 line
1.7.11.7
#3 lore raw

PATCH 3/5 MIPS: Use r4k_wait for OCTEON3 CPUs.

In reply to David Daney

From: David Daney <[email protected]>

---
 arch/mips/kernel/idle.c | 1 +
 1 file changed, 1 insertion(+)
arch/mips/kernel/idle.c +1 -0
index 0c655de..42f8875 100644
@@ -166,6 +166,7 @@ void __init check_wait(void)
 	case CPU_CAVIUM_OCTEON:
 	case CPU_CAVIUM_OCTEON_PLUS:
 	case CPU_CAVIUM_OCTEON2:
+	case CPU_CAVIUM_OCTEON3:
 	case CPU_JZRISC:
 	case CPU_LOONGSON1:
 	case CPU_XLR:
Signature · 1 line
1.7.11.7
#5 lore raw

PATCH 5/5 MIPS: OCTEON: Set L1 cache parameters for OCTEON3 CPUs.

In reply to David Daney

From: David Daney <[email protected]>

---
 arch/mips/mm/c-octeon.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/mips/mm/c-octeon.c +14 -0
index a0bcdbb..729e770 100644
@@ -224,6 +224,20 @@ static void probe_octeon(void)
 		c->options |= MIPS_CPU_PREFETCH;
 		break;
 
+	case CPU_CAVIUM_OCTEON3:
+		c->icache.linesz = 128;
+		c->icache.sets = 16;
+		c->icache.ways = 39;
+		c->icache.flags |= MIPS_CACHE_VTAG;
+		icache_size = c->icache.sets * c->icache.ways * c->icache.linesz;
+
+		c->dcache.linesz = 128;
+		c->dcache.ways = 32;
+		c->dcache.sets = 8;
+		dcache_size = c->dcache.sets * c->dcache.ways * c->dcache.linesz;
+		c->options |= MIPS_CPU_PREFETCH;
+		break;
+
 	default:
 		panic("Unsupported Cavium Networks CPU type");
 		break;
Signature · 1 line
1.7.11.7
#6 lore raw
In reply to David Daney
Quoted 5 lines · David Daney

From: David Daney <[email protected]>

These patches add minimal support for SoCs in the OCTEON III family. In many respects, they are similar to OCTEON II, but with larger cache and FPU. FPU support comes later...

Thanks, entire series applied.

Ralf