linux-mips
[Top] [All Lists]

[PATCH] TX49Lx support

To: ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: [PATCH] TX49Lx support
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Wed, 26 Nov 2003 15:07:19 +0900 (JST)
Organization: TOSHIBA Personal Computer System Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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

<Prev in Thread] Current Thread [Next in Thread>