linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Wed, 31 Aug 2005 14:50:29 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/08/31 14:50:22

Modified files:
        drivers/net    : ioc3-eth.c 

Log message:
        Kill two instances of register_serial().

diff -urN linux/drivers/net/ioc3-eth.c linux/drivers/net/ioc3-eth.c
--- linux/drivers/net/ioc3-eth.c        2005/07/11 10:03:32     1.102
+++ linux/drivers/net/ioc3-eth.c        2005/08/31 13:50:22     1.103
@@ -46,10 +46,12 @@
 #include <linux/udp.h>
 
 #ifdef CONFIG_SERIAL_8250
-#include <linux/serial.h>
-#include <asm/serial.h>
-#define IOC3_BAUD (22000000 / (3*16))
-#define IOC3_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+#include <linux/serial_core.h>
+
+/*
+ * Bloody function has no prototype in headers ...
+ */
+extern int serial8250_register_port(struct uart_port *port);
 #endif
 
 #include <linux/netdevice.h>
@@ -1146,12 +1148,11 @@
  * around ioc3 oddities in this respect.
  *
  * The IOC3 serials use a 22MHz clock rate with an additional divider by 3.
- * (IOC3_BAUD = (22000000 / (3*16)))
  */
 
 static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 
*ioc3)
 {
-       struct serial_struct req;
+       struct uart_port port;
 
        /*
         * We need to recognice and treat the fourth MENET serial as it
@@ -1165,20 +1166,25 @@
        if (ioc3_is_menet(pdev) && PCI_SLOT(pdev->devfn) == 3)
                return;
 
-       /* Register to interrupt zero because we share the interrupt with
-          the serial driver which we don't properly support yet.  */
-       memset(&req, 0, sizeof(req));
-       req.irq             = 0;
-       req.flags           = IOC3_COM_FLAGS;
-       req.io_type         = SERIAL_IO_MEM;
-       req.iomem_reg_shift = 0;
-       req.baud_base       = IOC3_BAUD;
+       /*
+        * Register to interrupt zero because we share the interrupt with
+        * the serial driver which we don't properly support yet.
+        *
+        * Can't use UPF_IOREMAP as the whole of IOC3 resources have already
+        * been registered.
+        */
+       memset(&port, 0, sizeof(port));
+       port.irq      = 0;
+       port.flags    = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
+       port.iotype   = UPIO_MEM;
+       port.regshift = 0;
+       port.uartclk  = 22000000 / 3;
 
-       req.iomem_base      = (unsigned char *) &ioc3->sregs.uarta;
-       register_serial(&req);
+       port.membase  = (unsigned char *) &ioc3->sregs.uarta;
+       serial8250_register_port(&port);
 
-       req.iomem_base      = (unsigned char *) &ioc3->sregs.uartb;
-       register_serial(&req);
+       port.membase  = (unsigned char *) &ioc3->sregs.uartb;
+       serial8250_register_port(&port);
 }
 #endif
 

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