Subject: [PATCH] Various diffs that fix things.

From: James Simmons <[email-masked]>
Date: Thu, 25 Oct 2001 10:30:28 -0700 (PDT)

Some of these patches are need to make the mips tree compile again. Please
apply. Thank you.

--- /tmp/linux-sgi/include/asm-mips/bugs.h	Wed Oct 24 16:25:45 2001
+++ bugs.h	Thu Oct 25 10:15:24 2001
@@ -3,6 +3,7 @@
  * Copyright (C) 1997, 1999  Ralf Baechle
  */
 #include <asm/bootinfo.h>
+#include <asm/processor.h>
 #include <asm/cpu.h>
 
 /*
--- /tmp/linux-sgi/include/asm-mips/processor.h	Fri Oct 19 13:51:06 2001
+++ processor.h	Thu Oct 25 10:15:24 2001
@@ -40,6 +40,7 @@
  * System setup and hardware flags..
  */
 extern void (*cpu_wait)(void);	/* only available on R4[26]00 and R3081 */
+extern void r39xx_wait(void);
 extern void r3081_wait(void);
 extern void r4k_wait(void);
 extern char cyclecounter_available;	/* only available from R4000 upwards. */
--- linux-sgi/drivers/i2c/Config.in	Fri Oct 19 11:47:49 2001
+++ linux-mips/drivers/i2c/Config.in	Thu Jun 21 19:29:32 2001
@@ -27,13 +27,6 @@
       fi
    fi
 
-   if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
-      dep_tristate 'ITE I2C Algorithm' CONFIG_ITE_I2C_ALGO $CONFIG_I2C
-      if [ "$CONFIG_ITE_I2C_ALGO" != "n" ]; then
-         dep_tristate '  ITE I2C Adapter' CONFIG_ITE_I2C_ADAP $CONFIG_ITE_I2C_ALGO
-      fi
-   fi
-
 # This is needed for automatic patch generation: sensors code starts here
 # This is needed for automatic patch generation: sensors code ends here
 
--- /tmp/linux-sgi/drivers/char/Config.in	Fri Oct 19 11:12:40 2001
+++ Config.in	Thu Oct 25 10:25:19 2001
@@ -68,6 +68,11 @@
 fi
 if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then
    bool 'Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
+   if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
+     define_bool CONFIG_IT8172_CIR y
+   else
+     bool '    Enable PS2 Keyboard Support' CONFIG_PC_KEYB
+   fi
    bool 'Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
    bool 'Enable Smart Card Reader 1 Support ' CONFIG_IT8172_SCR1
 fi
@@ -82,24 +87,6 @@
       fi
       bool '  Console on DC21285 serial port' CONFIG_SERIAL_21285_CONSOLE
    fi
-   if [ "$CONFIG_MIPS" = "y" ]; then
-     bool '  TMPTX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
-     dep_bool '     Console on TMPTX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
-     bool '  Enable Au1000 UART Support' CONFIG_AU1000_UART
-     if [ "$CONFIG_AU1000_UART" = "y" ]; then
-         bool '        Enable Au1000 serial console' CONFIG_AU1000_SERIAL_CONSOLE
-     fi
-   fi
-fi
-if [ "$CONFIG_IT8712" = "y" ]; then
-   bool 'Enable Qtronix 990P Keyboard Support' CONFIG_QTRONIX_KEYBOARD
-   if [ "$CONFIG_QTRONIX_KEYBOARD" = "y" ]; then
-     define_bool CONFIG_IT8172_CIR y
-   else
-     bool '    Enable PS2 Keyboard Support' CONFIG_PC_KEYB
-   fi
-   bool 'Enable Smart Card Reader 0 Support ' CONFIG_IT8172_SCR0
-   bool 'Enable Smart Card Reader 1 Support ' CONFIG_IT8172_SCR1
 fi
 bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
 if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
@@ -177,6 +164,7 @@
       fi
    fi
    tristate '  ZF MachZ Watchdog' CONFIG_MACHZ_WDT
+   dep_tristate '  NEC VR41xx Watchdog (DSU)' CONFIG_VR41XX_WDT $CONFIG_CPU_VR41XX
 fi
 endmenu

---

From: James Simmons <[email-masked]>
Date: Thu, 25 Oct 2001 10:39:17 -0700 (PDT)

I get the following errors when compiling. It barfs at mips/kernel/setup.c.
I would send you a patch but I don't know what values you want to set
these to. 

setup.c: In function `cpu_probe':
setup.c:246: `PRID_REV_TX3927B' undeclared (first use in this function)
setup.c:246: (Each undeclared identifier is reported only once
setup.c:246: for each function it appears in.)
setup.c:256: `PRID_REV_TX39H3TEG' undeclared (first use in this function)
setup.c:275: `PRID_IMP_TX49' undeclared (first use in this function)

---

From: Atsushi Nemoto <[email-masked]>
Date: Fri, 26 Oct 2001 10:37:41 +0900 (JST)

>>>>> On Thu, 25 Oct 2001 10:30:28 -0700 (PDT), James Simmons <[email-masked]> said:
jsimmons> --- /tmp/linux-sgi/include/asm-mips/processor.h	Fri Oct 19 13:51:06 2001
jsimmons> +++ processor.h	Thu Oct 25 10:15:24 2001

Sorry, this is my fault.  Your patch is correct.

>>>>> On Thu, 25 Oct 2001 10:39:17 -0700 (PDT), James Simmons <[email-masked]> said:
jsimmons> I get the following errors when compiling. It barfs at
jsimmons> mips/kernel/setup.c.  I would send you a patch but I don't
jsimmons> know what values you want to set these to.

This is my fault too.  Please apply this patch.  Thank you.

diff -urP -x CVS -x .cvsignore linux-sgi-cvs/include/asm-mips/cpu.h linux.new/include/asm-mips/cpu.h
--- linux-sgi-cvs/include/asm-mips/cpu.h	Mon Oct 22 10:30:09 2001
+++ linux.new/include/asm-mips/cpu.h	Fri Oct 26 10:31:19 2001
@@ -55,6 +55,7 @@
 #define PRID_IMP_R4640		0x2200
 #define PRID_IMP_R4650		0x2200		/* Same as R4640 */
 #define PRID_IMP_R5000		0x2300
+#define PRID_IMP_TX49		0x2d00
 #define PRID_IMP_SONIC		0x2400
 #define PRID_IMP_MAGIC		0x2500
 #define PRID_IMP_RM7000		0x2700
@@ -87,6 +88,12 @@
 #define PRID_REV_TX3912 	0x0010
 #define PRID_REV_TX3922 	0x0030
 #define PRID_REV_TX3927 	0x0040
+#define PRID_REV_TX3927B 	0x0041
+#define PRID_REV_TX39H3TEG 	0x0050
+#define PRID_REV_TX4955		0x0011
+#define PRID_REV_TX4955A	0x0020
+#define PRID_REV_TX4927		0x0021
+#define PRID_REV_TX4927R2	0x0022
 
 #ifndef  _LANGUAGE_ASSEMBLY
 /*
---
Atsushi Nemoto

---

From: James Simmons <[email-masked]>
Date: Fri, 26 Oct 2001 09:38:50 -0700 (PDT)

Thank you for the below patch. Applied :-)

---

From: James Simmons <[email-masked]>
Date: Fri, 26 Oct 2001 13:13:32 -0700 (PDT)

Several drivers that can be modularcall the functions in pci-dma.c in
arch/mips/kernel. The following patch exports these functions so the
modules don't fail.

--- Makefile.orig	Fri Oct 26 13:08:58 2001
+++ Makefile	Fri Oct 26 13:09:24 2001
@@ -57,6 +57,7 @@
 obj-$(CONFIG_BINFMT_IRIX)	+= irixelf.o irixioctl.o irixsig.o sysirix.o \
 				   irixinv.o
 obj-$(CONFIG_REMOTE_DEBUG)	+= gdb-low.o gdb-stub.o 
+export-objs			+= pci-dma.o
 obj-$(CONFIG_PCI)		+= pci-dma.o
 obj-$(CONFIG_PROC_FS)		+= proc.o
 
--- pci-dma.c	Mon Jun 25 12:09:29 2001
+++ /tmp/linux-mips/arch/mips/kernel/pci-dma.c	Fri Oct 26 12:57:32 2001
@@ -8,6 +8,7 @@
  * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
  */
 #include <linux/config.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/mm.h>
 #include <linux/string.h>
@@ -47,3 +48,6 @@
 #endif
 	free_pages(addr, get_order(size));
 }
+
+EXPORT_SYMBOL(pci_alloc_consistent);
+EXPORT_SYMBOL(pci_free_consistent);

---

From: Keith Owens <[email-masked]>
Date: Sat, 27 Oct 2001 10:33:55 +1000

On Fri, 26 Oct 2001 13:13:32 -0700 (PDT), 
>+++ Makefile	Fri Oct 26 13:09:24 2001

export-objs should go at the start of the Makefile, that is the
standard coding style for Makefiles.