Subject: fixed the problem about build of vr41xx on linux-2.5.45

From: Yoichi Yuasa <[email-masked]>
Date: Sun, 3 Nov 2002 23:52:24 +0900

Hello Ralf,

I fixed the problem about build of vr41xx on linux-2.5.45.
Here is a patch.

Please apply this patch.

Thanks,

Yoichi

diff -aruN linux.orig/arch/mips/Kconfig-shared linux/arch/mips/Kconfig-shared
--- linux.orig/arch/mips/Kconfig-shared	Sun Nov  3 20:42:38 2002
+++ linux/arch/mips/Kconfig-shared	Sun Nov  3 22:45:44 2002
@@ -508,7 +508,7 @@
 
 config SERIAL
 	tristate
-	depends on NEC_OSPREY || IBM_WORKPAD || CASIO_E55
+	depends on ZAO_CAPCELLA || NEC_EAGLE || NEC_OSPREY || VICTOR_MPC30X || IBM_WORKPAD || CASIO_E55
 	default y
 	---help---
 	  This selects whether you want to include the driver for the standard
@@ -553,9 +553,9 @@
 	depends on MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000
 	default y
 
-config CONFIG_VR41XX_COMMON
+config VR41XX_COMMON
 	bool
-	depends on CONFIG_NEC_EAGLE || CONFIG_ZAO_CAPCELLA || CONFIG_VICTOR_MPC30X || CONFIG_IBM_WORKPAD || CONFIG_CASIO_E55
+	depends on NEC_EAGLE || ZAO_CAPCELLA || VICTOR_MPC30X || IBM_WORKPAD || CASIO_E55
 	default y
 
 config CONFIG_DDB5XXX_COMMON
diff -aruN linux.orig/arch/mips/defconfig-workpad linux/arch/mips/defconfig-workpad
--- linux.orig/arch/mips/defconfig-workpad	Sun Nov  3 20:43:06 2002
+++ linux/arch/mips/defconfig-workpad	Sun Nov  3 23:36:58 2002
@@ -22,7 +22,7 @@
 # Loadable module support
 #
 CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+# CONFIG_MODVERSIONS is not set
 CONFIG_KMOD=y
 
 #
@@ -72,6 +72,7 @@
 CONFIG_SERIAL=y
 CONFIG_SERIAL_MANY_PORTS=y
 CONFIG_DUMMY_KEYB=y
+CONFIG_VR41XX_COMMON=y
 # CONFIG_FB is not set
 
 #
diff -aruN linux.orig/drivers/ide/mips/Makefile linux/drivers/ide/mips/Makefile
--- linux.orig/drivers/ide/mips/Makefile	Fri Nov  1 05:59:35 2002
+++ linux/drivers/ide/mips/Makefile	Sun Nov  3 23:04:04 2002
@@ -1,6 +1,4 @@
 
-O_TARGET := idedriver-mips.o
-
 obj-y		:=
 obj-m		:=
 
diff -aruN linux.orig/include/asm-mips/ide.h linux/include/asm-mips/ide.h
--- linux.orig/include/asm-mips/ide.h	Thu Oct 31 22:50:01 2002
+++ linux/include/asm-mips/ide.h	Sun Nov  3 22:33:12 2002
@@ -202,8 +202,6 @@
 
 #else /* defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__)  */
 
-#define ide_fix_driveid(id)		do {} while (0)
-
 #endif
 
 #define ide_release_lock(lock)		do {} while (0)
diff -aruN linux.orig/include/asm-mips/system.h linux/include/asm-mips/system.h
--- linux.orig/include/asm-mips/system.h	Sun Nov  3 01:23:55 2002
+++ linux/include/asm-mips/system.h	Sun Nov  3 22:18:07 2002
@@ -319,11 +319,10 @@
 #else
 	unsigned long flags, retval;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	retval = *m;
 	*m = val;
-	restore_flags(flags);	/* implies memory barrier  */
+	local_irq_restore(flags);	/* implies memory barrier  */
 	return retval;
 #endif /* Processor-dependent optimization */
 }

---

From: Ralf Baechle <[email-masked]>
Date: Sun, 3 Nov 2002 18:36:50 +0100

>  	  This selects whether you want to include the driver for the standard

This misses the problem.  There is no more CONFIG_SERIAL option and as such
I removed all CONFIG_SERIAL* stuff entirely.

And this one entirely misses the code of the problem.  There were a whole
bunch of options which accidently still had the CONFIG_ prefix.

> +++ linux/arch/mips/defconfig-workpad	Sun Nov  3 23:36:58 2002

It's your call - but as this help to avoid accidents it's a bad idea to
disable CONFIG_MODVERSIONS.

> +++ linux/include/asm-mips/ide.h	Sun Nov  3 22:33:12 2002

Again this entirely misses the scope of the problem.  There should be no
more definition of ide_fix_driveid() in this file at all and there's
quite a bit more of obsoleted junk left in that file.

  Ralf

---

From: Yoichi Yuasa <[email-masked]>
Date: Mon, 4 Nov 2002 20:49:29 +0900

Hello Ralf,

On Sun, 3 Nov 2002 18:36:50 +0100

> I removed all CONFIG_SERIAL* stuff entirely.

I made a patch for vr41xx about this problem.
Please apply a patch.

Thanks,

Yoichi
diff -aruN linux.orig/arch/mips/vr41xx/casio-e55/setup.c linux/arch/mips/vr41xx/casio-e55/setup.c
--- linux.orig/arch/mips/vr41xx/casio-e55/setup.c	Tue Oct 29 09:56:59 2002
+++ linux/arch/mips/vr41xx/casio-e55/setup.c	Mon Nov  4 15:05:00 2002
@@ -68,5 +68,7 @@
 
 	vr41xx_cmu_init(0);
 
+#ifdef CONFIG_SERIAL_8250
 	vr41xx_siu_init(SIU_RS232C, 0);
+#endif
 }
diff -aruN linux.orig/arch/mips/vr41xx/common/Makefile linux/arch/mips/vr41xx/common/Makefile
--- linux.orig/arch/mips/vr41xx/common/Makefile	Fri Nov  1 11:32:25 2002
+++ linux/arch/mips/vr41xx/common/Makefile	Mon Nov  4 15:01:14 2002
@@ -5,7 +5,7 @@
 obj-y		:= bcu.o cmu.o giu.o icu.o int-handler.o reset.o
 
 obj-$(CONFIG_PCI)		+= pciu.o
-obj-$(CONFIG_SERIAL)		+= serial.o
+obj-$(CONFIG_SERIAL_8250)	+= serial.o
 obj-$(CONFIG_VR41XX_TIME_C)	+= time.o
 
 EXTRA_AFLAGS := $(CFLAGS)
diff -aruN linux.orig/arch/mips/vr41xx/ibm-workpad/setup.c linux/arch/mips/vr41xx/ibm-workpad/setup.c
--- linux.orig/arch/mips/vr41xx/ibm-workpad/setup.c	Tue Oct 29 09:56:59 2002
+++ linux/arch/mips/vr41xx/ibm-workpad/setup.c	Mon Nov  4 15:10:05 2002
@@ -68,5 +68,7 @@
 
 	vr41xx_cmu_init(0);
 
+#ifdef CONFIG_SERIAL_8250
 	vr41xx_siu_init(SIU_RS232C, 0);
+#endif
 }
diff -aruN linux.orig/arch/mips/vr41xx/nec-eagle/setup.c linux/arch/mips/vr41xx/nec-eagle/setup.c
--- linux.orig/arch/mips/vr41xx/nec-eagle/setup.c	Tue Oct 29 09:56:59 2002
+++ linux/arch/mips/vr41xx/nec-eagle/setup.c	Mon Nov  4 15:10:46 2002
@@ -146,8 +146,10 @@
 
 	vr41xx_cmu_init(0);
 
+#ifdef CONFIG_SERIAL_8250
 	vr41xx_dsiu_init();
 	vr41xx_siu_init(SIU_RS232C, 0);
+#endif
 
 #ifdef CONFIG_PCI
 	vr41xx_pciu_init(&pci_address_map);
diff -aruN linux.orig/arch/mips/vr41xx/victor-mpc30x/setup.c linux/arch/mips/vr41xx/victor-mpc30x/setup.c
--- linux.orig/arch/mips/vr41xx/victor-mpc30x/setup.c	Tue Oct 29 09:56:59 2002
+++ linux/arch/mips/vr41xx/victor-mpc30x/setup.c	Mon Nov  4 15:11:14 2002
@@ -116,7 +116,9 @@
 
 	vr41xx_cmu_init(0);
 
+#ifdef CONFIG_SERIAL_8250
 	vr41xx_siu_init(SIU_RS232C, 0);
+#endif
 
 #ifdef CONFIG_PCI
 	vr41xx_pciu_init(&pci_address_map);
diff -aruN linux.orig/arch/mips/vr41xx/zao-capcella/setup.c linux/arch/mips/vr41xx/zao-capcella/setup.c
--- linux.orig/arch/mips/vr41xx/zao-capcella/setup.c	Tue Oct 29 09:56:59 2002
+++ linux/arch/mips/vr41xx/zao-capcella/setup.c	Mon Nov  4 15:11:52 2002
@@ -116,8 +116,10 @@
 
 	vr41xx_cmu_init(0x0102);
 
+#ifdef CONFIG_SERIAL_8250
 	vr41xx_siu_init(SIU_RS232C, 0);
 	vr41xx_dsiu_init();
+#endif
 
 #ifdef CONFIG_PCI
 	vr41xx_pciu_init(&pci_address_map);

---

From: Yoichi Yuasa <[email-masked]>
Date: Thu, 7 Nov 2002 20:15:19 +0900

Hi Ralf,

If this patch is not applied, it will become build error by VR41xx.
Please apply this patch.

Thanks,
 
Yoichi

On Mon, 4 Nov 2002 20:49:29 +0900

 
 	vr41xx_cmu_init(0);

 
 
 	vr41xx_cmu_init(0);

 	vr41xx_cmu_init(0);

 #ifdef CONFIG_PCI
 
 	vr41xx_cmu_init(0);

 #ifdef CONFIG_PCI
 
 	vr41xx_cmu_init(0x0102);

 #ifdef CONFIG_PCI