[PATCH 2.6] use struct uart_port for early_serial_setup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

  I think early_serial_setup() should be called with struct uart_port* instead
  of struct serial_struct*. Patch for the Vr41xx series.

  Dimitri

-- 
Dimitri Torfs             |  NSCE 
dimitri.torfs@sonycom.com |  Sint Stevens Woluwestraat 55
tel: +32 2 2908451        |  1130 Brussel
fax: +32 2 7262686        |  Belgium

Index: arch/mips/vr41xx/common/serial.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/vr41xx/common/serial.c,v
retrieving revision 1.4
diff -u -r1.4 serial.c
--- arch/mips/vr41xx/common/serial.c	31 Oct 2003 01:49:07 -0000	1.4
+++ arch/mips/vr41xx/common/serial.c	23 Dec 2003 08:51:07 -0000
@@ -41,7 +41,9 @@
  */
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/tty.h>
 #include <linux/serial.h>
+#include <linux/serial_core.h>
 
 #include <asm/addrspace.h>
 #include <asm/cpu.h>
@@ -116,59 +118,62 @@
 
 void __init vr41xx_siu_init(int interface, int module)
 {
-	struct serial_struct s;
+#ifdef CONFIG_SERIAL_8250
+	struct uart_port p;
 
 	vr41xx_siu_ifselect(interface, module);
 
-	memset(&s, 0, sizeof(s));
+	memset(&p, 0, sizeof(p));
 
-	s.line = vr41xx_serial_ports;
-	s.baud_base = SIU_BASE_BAUD;
-	s.irq = SIU_IRQ;
-	s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
+	p.line = vr41xx_serial_ports;
+	p.uartclk = SIU_BASE_BAUD * 16;
+	p.irq = SIU_IRQ;
+	p.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		s.iomem_base = (unsigned char *)VR4111_SIURB;
+		p.membase = (unsigned char *)VR4111_SIURB;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		s.iomem_base = (unsigned char *)VR4122_SIURB;
+		p.membase = (unsigned char *)VR4122_SIURB;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
 		break;
 	}
-	s.iomem_reg_shift = 0;
-	s.io_type = SERIAL_IO_MEM;
-	if (early_serial_setup(&s) != 0)
+	p.regshift = 0;
+	p.iotype = UPIO_MEM;
+	if (early_serial_setup(&p) != 0)
 		printk(KERN_ERR "SIU setup failed!\n");
 
 	vr41xx_clock_supply(SIU_CLOCK);
 
 	vr41xx_serial_ports++;
+#endif
 }
 
 void __init vr41xx_dsiu_init(void)
 {
-	struct serial_struct s;
+#ifdef CONFIG_SERIAL_8250
+	struct uart_port p;
 
 	if (current_cpu_data.cputype != CPU_VR4122 &&
 	    current_cpu_data.cputype != CPU_VR4131 &&
 	    current_cpu_data.cputype != CPU_VR4133)
 		return;
 
-	memset(&s, 0, sizeof(s));
+	memset(&p, 0, sizeof(p));
 
-	s.line = vr41xx_serial_ports;
-	s.baud_base = DSIU_BASE_BAUD;
-	s.irq = DSIU_IRQ;
-	s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
-	s.iomem_base = (unsigned char *)DSIURB;
-	s.iomem_reg_shift = 0;
-	s.io_type = SERIAL_IO_MEM;
-	if (early_serial_setup(&s) != 0)
+	p.line = vr41xx_serial_ports;
+	p.uartclk = DSIU_BASE_BAUD * 16;
+	p.irq = DSIU_IRQ;
+	p.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST;
+	p.membase = (unsigned char *)DSIURB;
+	p.regshift = 0;
+	p.iotype = UPIO_MEM;
+	if (early_serial_setup(&p) != 0)
 		printk(KERN_ERR "DSIU setup failed!\n");
 
 	vr41xx_clock_supply(DSIU_CLOCK);
@@ -176,4 +181,5 @@
 	writew(INTDSIU, MDSIUINTREG);
 
 	vr41xx_serial_ports++;
+#endif
 }

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux