aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-08 19:04:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-08 19:04:39 -0500
commit8546df6f357dadf1989ad8da9309c9524fd56cdf (patch)
tree5b8557f84b0b5fd1d441739d3bb6cd8951a6db44
parent9f04012c58a32756bbbd0239c4144e835048aa4d (diff)
parent15a93807826a5cbffb47d6bfbeeee108d6da1dbc (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-serial
-rw-r--r--drivers/net/ioc3-eth.c42
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 @@
46#include <linux/udp.h> 46#include <linux/udp.h>
47 47
48#ifdef CONFIG_SERIAL_8250 48#ifdef CONFIG_SERIAL_8250
49#include <linux/serial.h> 49#include <linux/serial_core.h>
50#include <asm/serial.h> 50#include <linux/serial_8250.h>
51#define IOC3_BAUD (22000000 / (3*16))
52#define IOC3_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
53#endif 51#endif
54 52
55#include <linux/netdevice.h> 53#include <linux/netdevice.h>
@@ -1146,12 +1144,11 @@ static inline int ioc3_is_menet(struct pci_dev *pdev)
1146 * around ioc3 oddities in this respect. 1144 * around ioc3 oddities in this respect.
1147 * 1145 *
1148 * The IOC3 serials use a 22MHz clock rate with an additional divider by 3. 1146 * The IOC3 serials use a 22MHz clock rate with an additional divider by 3.
1149 * (IOC3_BAUD = (22000000 / (3*16)))
1150 */ 1147 */
1151 1148
1152static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3) 1149static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3 *ioc3)
1153{ 1150{
1154 struct serial_struct req; 1151 struct uart_port port;
1155 1152
1156 /* 1153 /*
1157 * We need to recognice and treat the fourth MENET serial as it 1154 * 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)
1165 if (ioc3_is_menet(pdev) && PCI_SLOT(pdev->devfn) == 3) 1162 if (ioc3_is_menet(pdev) && PCI_SLOT(pdev->devfn) == 3)
1166 return; 1163 return;
1167 1164
1168 /* Register to interrupt zero because we share the interrupt with 1165 /*
1169 the serial driver which we don't properly support yet. */ 1166 * Register to interrupt zero because we share the interrupt with
1170 memset(&req, 0, sizeof(req)); 1167 * the serial driver which we don't properly support yet.
1171 req.irq = 0; 1168 *
1172 req.flags = IOC3_COM_FLAGS; 1169 * Can't use UPF_IOREMAP as the whole of IOC3 resources have already
1173 req.io_type = SERIAL_IO_MEM; 1170 * been registered.
1174 req.iomem_reg_shift = 0; 1171 */
1175 req.baud_base = IOC3_BAUD; 1172 memset(&port, 0, sizeof(port));
1176 1173 port.irq = 0;
1177 req.iomem_base = (unsigned char *) &ioc3->sregs.uarta; 1174 port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF;
1178 register_serial(&req); 1175 port.iotype = UPIO_MEM;
1179 1176 port.regshift = 0;
1180 req.iomem_base = (unsigned char *) &ioc3->sregs.uartb; 1177 port.uartclk = 22000000 / 3;
1181 register_serial(&req); 1178
1179 port.membase = (unsigned char *) &ioc3->sregs.uarta;
1180 serial8250_register_port(&port);
1181
1182 port.membase = (unsigned char *) &ioc3->sregs.uartb;
1183 serial8250_register_port(&port);
1182} 1184}
1183#endif 1185#endif
1184 1186