Subject: [PATCH] TX49Lx support

From: Atsushi Nemoto <[email-masked]>
Date: Wed, 26 Nov 2003 15:07:19 +0900 (JST)

Some TX49 do not have FPU.  We can tell such CPUs by bit3 of PrID.
Here is a patch for 2.4 tree.  The first hunk can also be used for 2.6
tree.  Please apply.  Thank you.

diff -ur linux-mips/arch/mips/kernel/cpu-probe.c linux/arch/mips/kernel/cpu-probe.c
--- linux-mips/arch/mips/kernel/cpu-probe.c	Tue Nov  4 16:57:34 2003
+++ linux/arch/mips/kernel/cpu-probe.c	Wed Nov 26 10:35:47 2003
@@ -297,6 +297,8 @@
 		c->isa_level = MIPS_CPU_ISA_III;
 		c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
 		             MIPS_CPU_LLSC;
+		if (c->processor_id & 0x08)	/* TX49Lx: no FPU */
+			c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
 		c->tlbsize = 48;
 		break;
 	case PRID_IMP_R5000:
diff -ur linux-mips/arch/mips64/kernel/cpu-probe.c linux/arch/mips64/kernel/cpu-probe.c
--- linux-mips/arch/mips64/kernel/cpu-probe.c	Tue Nov  4 16:57:37 2003
+++ linux/arch/mips64/kernel/cpu-probe.c	Wed Nov 26 10:35:50 2003
@@ -622,6 +622,8 @@
 			c->isa_level = MIPS_CPU_ISA_III;
 			c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
 			             MIPS_CPU_LLSC;
+			if (c->processor_id & 0x08)	/* TX49Lx: no FPU */
+				c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
 			c->tlbsize = 48;
 			break;
 		case PRID_IMP_R5000:
---
Atsushi Nemoto

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 26 Nov 2003 16:53:45 +0100

> tree.  Please apply.  Thank you.

In general I'd like to ask people to send patches for 2.4 and 2.6 in
separate email.

I applied your patch with a little change for clarity; I also
restructured the 64-bit cpu-probe.c the same way as it's 32-bit
counterpart to keep the two files more similar.

  Ralf

---

From: Atsushi Nemoto <[email-masked]>
Date: Thu, 27 Nov 2003 10:13:15 +0900 (JST)

>>>>> On Wed, 26 Nov 2003 16:53:45 +0100, Ralf Baechle <[email-masked]> said:
ralf> In general I'd like to ask people to send patches for 2.4 and
ralf> 2.6 in separate email.

Please forgive my laziness.  I will do so next time.

ralf> I applied your patch with a little change for clarity; I also
ralf> restructured the 64-bit cpu-probe.c the same way as it's 32-bit
ralf> counterpart to keep the two files more similar.

Thanks for your quick response.

---
Atsushi Nemoto