Skip to contentSkip to conversation

R3912 mm stuff from linux-vr tree

PATCH In review Florian Lohoff 3 participants 4 messages Feb 3, 2001 – Feb 5, 2001 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 R3912 mm stuff from linux-vr tree

Hi,
here is a patch against the OSS tree to basically add R3912 support - It has mainly be done by Harald Koerfgen - I did basically change the stuff to get it into the oss tree.

The CPU Probing with the PRID is definitly not right but probably someone else can come up with solutions. I havent got any R4650 hardwate so i cant try.

I only booted on an R3912 Board and it seemed to work at least for Cache detection - Could someone verify if this doesnt break R3k Decstations e.g ?

Index: include/asm-mips/bootinfo.h
===================================================================
RCS file: /cvs/linux/include/asm-mips/bootinfo.h,v retrieving revision 1.22

asm-mips/bootinfo.h +3 -2
diff -u -r1.22 bootinfo.h
@@ -176,14 +185,15 @@
 #define CPU_4KC                 30
 #define CPU_5KC                 31
 #define CPU_R4310               32
-#define CPU_LAST		32
+#define CPU_R3912		33
+#define CPU_LAST		33
 
 #define CPU_NAMES { "unknown", "R2000", "R3000", "R3000A", "R3041", "R3051", \
         "R3052", "R3081", "R3081E", "R4000PC", "R4000SC", "R4000MC",         \
         "R4200", "R4400PC", "R4400SC", "R4400MC", "R4600", "R6000",          \
         "R6000A", "R8000", "R10000", "R4300", "R4650", "R4700", "R5000",     \
         "R5000A", "R4640", "Nevada", "RM7000", "R5432", "MIPS 4Kc",          \
-        "MIPS 5Kc", "R4310" }
+        "MIPS 5Kc", "R4310", "R3912" }
 
 #define COMMAND_LINE_SIZE	256
 

Index: include/asm-mips/cpu.h
===================================================================
RCS file: /cvs/linux/include/asm-mips/cpu.h,v
retrieving revision 1.3

asm-mips/cpu.h +2 -0
diff -u -r1.3 cpu.h
@@ -26,6 +26,8 @@
 #define PRID_IMP_R4700		0x2100
 #define PRID_IMP_R4640		0x2200
 #define PRID_IMP_R4650		0x2200		/* Same as R4640 */
+#define PRID_IMP_R3912		0x2210
+#define PRID_IMP_R3922		0x2230
 #define PRID_IMP_R5000		0x2300
 #define PRID_IMP_R5432		0x5400
 #define PRID_IMP_SONIC		0x2400

Index: arch/mips/mm/r2300.c
===================================================================
RCS file: /cvs/linux/arch/mips/mm/r2300.c,v
retrieving revision 1.27

mips/mm/r2300.c +144 -55

328 lines not on this page · raw message

Index: arch/mips/kernel/setup.c
===================================================================
RCS file: /cvs/linux/arch/mips/kernel/setup.c,v
retrieving revision 1.48

mips/kernel/setup.c +12 -4
diff -u -r1.48 setup.c
@@ -210,10 +210,18 @@
 		mips_cpu.tlbsize = 48;
 		break;
 	case PRID_IMP_R4650:
-		mips_cpu.cputype = CPU_R4650;
-		mips_cpu.isa_level = MIPS_CPU_ISA_III;
-		mips_cpu.options = R4K_OPTS | MIPS_CPU_FPU;
-		mips_cpu.tlbsize = 48;
+		/* This might also be R3912 & R3922 */
+		if (mips_cpu.processor_id == PRID_IMP_R3912) {
+			mips_cpu.isa_level = MIPS_CPU_ISA_I;
+			mips_cpu.options = MIPS_CPU_TLB;
+			mips_cpu.tlbsize = 32;
+			mips_cpu.cputype = CPU_R3912;
+		} else {
+			mips_cpu.cputype = CPU_R4650;
+			mips_cpu.isa_level = MIPS_CPU_ISA_III;
+			mips_cpu.options = R4K_OPTS | MIPS_CPU_FPU;
+			mips_cpu.tlbsize = 48;
+		}
 		break;
 	case PRID_IMP_R4700:
 		mips_cpu.cputype = CPU_R4700;

Flo

Signature · 2 lines
Florian Lohoff                  [email protected]             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?
#1 lore raw

On Sat, Feb 03, 2001 at 04:27:58PM +0100, Florian Lohoff wrote:

[PATCH]

Quoted 3 lines

I only booted on an R3912 Board and it seemed to work at least for Cache detection - Could someone verify if this doesnt break R3k Decstations e.g ?

It looks like the DECstation support is already broken again :-(. I have just tried to test the current CVS on a 5000/150 - the kernel crashes just after mounting the rootfs. Anybody with similar experience?

Greetings,
Karsten

Signature · 4 lines
#include <standard_disclaimer>
Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der
Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die
Markt- oder Meinungsforschung.
#2 lore raw
Quoted 6 lines · Karsten Merker

On Sat, Feb 03, 2001 at 04:27:58PM +0100, Florian Lohoff wrote:

It looks like the DECstation support is already broken again :-(. I have just tried to test the current CVS on a 5000/150 - the kernel crashes just after mounting the rootfs. Anybody with similar experience?

This is R4k and yes i have seen that too - But i cant find why but i didnt have the time to search much.

Flo

Signature · 2 lines
Florian Lohoff                  [email protected]             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?
#3 lore raw
In reply to Florian Lohoff
Quoted 3 lines · On 03-Feb-01 Florian Lohoff wrote:

here is a patch against the OSS tree to basically add R3912 support - It has mainly be done by Harald Koerfgen - I did basically change the stuff to get it into the oss tree.

Now that I am seeing the stuff again I would say that it's in badly need of some polishing here and there :)

Signature · 2 lines
Regards,
Harald