diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-11-09 00:10:51 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 00:10:51 +0100 |
commit | 15a93807826a5cbffb47d6bfbeeee108d6da1dbc (patch) | |
tree | 1651f63ecbf84e7f36c14cb386df0229fd2fd9f7 /drivers/net/ioc3-eth.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge (diff) | |
download | linux-15a93807826a5cbffb47d6bfbeeee108d6da1dbc.tar.xz linux-15a93807826a5cbffb47d6bfbeeee108d6da1dbc.zip |
[SERIAL] IOC3: Update 8250 driver bits
Update the support for the 16550 present on most IOC3 configurations to use
the current API.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ioc3-eth.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 49e5467bdd73..6a3129bc15a6 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c @@ -46,10 +46,8 @@ #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> +#include <linux/serial_8250.h> #endif #include <linux/netdevice.h> @@ -1146,12 +1144,11 @@ static inline int ioc3_is_menet(struct pci_dev *pdev) * 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 +1162,25 @@ static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3) 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; - - req.iomem_base = (unsigned char *) &ioc3->sregs.uarta; - register_serial(&req); - - req.iomem_base = (unsigned char *) &ioc3->sregs.uartb; - register_serial(&req); + /* + * 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; + + port.membase = (unsigned char *) &ioc3->sregs.uarta; + serial8250_register_port(&port); + + port.membase = (unsigned char *) &ioc3->sregs.uartb; + serial8250_register_port(&port); } #endif |