aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-11-08 18:10:51 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-08 18:10:51 -0500
commit15a93807826a5cbffb47d6bfbeeee108d6da1dbc (patch)
tree1651f63ecbf84e7f36c14cb386df0229fd2fd9f7 /drivers/net
parentf093182d313edde9b1f86dbdaf40ba4da2dbd0e7 (diff)
[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 'drivers/net')
-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