[PATCH][2.6] cache workaround for VR4131

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ralf,

I made a patch for cache workaround of VR4131 for 2.6 too.
This patch moves cache workaround to common part from board dependence part.

Please apply this patch.

Yoichi

diff -urN -X dontdiff linux-orig/arch/mips/mm/c-r4k.c linux/arch/mips/mm/c-r4k.c
--- linux-orig/arch/mips/mm/c-r4k.c	Mon Jan  5 17:27:29 2004
+++ linux/arch/mips/mm/c-r4k.c	Fri Jan  9 08:09:17 2004
@@ -707,6 +707,13 @@
 	case CPU_VR4133:
 		write_c0_config(config & ~CONF_EB);
 	case CPU_VR4131:
+		/* Workaround for cache instruction bug of VR4131 */
+		if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U ||
+		    c->processor_id == 0x0c82U) {
+			config &= ~0x00000030U;
+			config |= 0x00410000U;
+			write_c0_config(config);
+		}
 		icache_size = 1 << (10 + ((config & CONF_IC) >> 9));
 		c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
 		c->icache.ways = 2;
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/tanbac-tb0226/init.c linux/arch/mips/vr41xx/tanbac-tb0226/init.c
--- linux-orig/arch/mips/vr41xx/tanbac-tb0226/init.c	Tue Nov 18 12:34:23 2003
+++ linux/arch/mips/vr41xx/tanbac-tb0226/init.c	Fri Jan  9 08:09:18 2004
@@ -33,7 +33,6 @@
 {
 	int argc = fw_arg0;
 	char **argv = (char **) fw_arg1;
-	u32 config;
 	int i;
 
 	/*
@@ -47,17 +46,6 @@
 
 	mips_machgroup = MACH_GROUP_NEC_VR41XX;
 	mips_machtype = MACH_TANBAC_TB0226;
-
-	switch (current_cpu_data.processor_id) {
-	case PRID_VR4131_REV1_2:
-		config = read_c0_config();
-		config &= ~0x00000030UL;
-		config |= 0x00410000UL;
-		write_c0_config(config);
-		break;
-	default:
-		break;
-	}
 }
 
 unsigned long __init prom_free_prom_memory(void)
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/tanbac-tb0229/init.c linux/arch/mips/vr41xx/tanbac-tb0229/init.c
--- linux-orig/arch/mips/vr41xx/tanbac-tb0229/init.c	Tue Nov 18 12:34:23 2003
+++ linux/arch/mips/vr41xx/tanbac-tb0229/init.c	Fri Jan  9 08:09:18 2004
@@ -38,7 +38,6 @@
 {
 	int argc = fw_arg0;
 	char **argv = (char **) fw_arg1;
-	u32 config;
 	int i;
 
 	/*
@@ -52,17 +51,6 @@
 
 	mips_machgroup = MACH_GROUP_NEC_VR41XX;
 	mips_machtype = MACH_TANBAC_TB0229;
-
-	switch (current_cpu_data.processor_id) {
-	case PRID_VR4131_REV1_2:
-		config = read_c0_config();
-		config &= ~0x00000030UL;
-		config |= 0x00410000UL;
-		write_c0_config(config);
-		break;
-	default:
-		break;
-	}
 }
 
 unsigned long __init prom_free_prom_memory(void)
diff -urN -X dontdiff linux-orig/arch/mips/vr41xx/zao-capcella/init.c linux/arch/mips/vr41xx/zao-capcella/init.c
--- linux-orig/arch/mips/vr41xx/zao-capcella/init.c	Tue Nov 18 12:34:23 2003
+++ linux/arch/mips/vr41xx/zao-capcella/init.c	Fri Jan  9 08:09:18 2004
@@ -33,7 +33,6 @@
 {
 	int argc = fw_arg0;
 	char **argv = (char **) fw_arg1;
-	u32 config;
 	int i;
 
 	/*
@@ -47,17 +46,6 @@
 
 	mips_machgroup = MACH_GROUP_NEC_VR41XX;
 	mips_machtype = MACH_ZAO_CAPCELLA;
-
-	switch (current_cpu_data.processor_id) {
-	case PRID_VR4131_REV1_2:
-		config = read_c0_config();
-		config &= ~0x00000030UL;
-		config |= 0x00410000UL;
-		write_c0_config(config);
-		break;
-	default:
-		break;
-	}
 }
 
 unsigned long __init prom_free_prom_memory(void)



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux