blob: 1c2eb44e9c334c36d993fab0792bf8691623075d [file] [log] [blame]
Greg Kroah-Hartmane3b3d0f2017-11-06 18:11:51 +01001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Probe module for 8250/16550-type PCI serial ports.
4 *
5 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
6 *
7 * Copyright (C) 2001 Russell King, All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 */
Greg Kroah-Hartmanaf8c5b82013-09-28 13:01:59 -07009#undef DEBUG
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#include <linux/pci.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/string.h>
13#include <linux/kernel.h>
14#include <linux/slab.h>
15#include <linux/delay.h>
16#include <linux/tty.h>
Sudhakar Mamillapalli0ad372b2012-04-10 14:10:58 -070017#include <linux/serial_reg.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#include <linux/serial_core.h>
19#include <linux/8250_pci.h>
20#include <linux/bitops.h>
21
22#include <asm/byteorder.h>
23#include <asm/io.h>
24
25#include "8250.h"
26
Linus Torvalds1da177e2005-04-16 15:20:36 -070027/*
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 * init function returns:
29 * > 0 - number of ports
30 * = 0 - use board->num_ports
31 * < 0 - error
32 */
33struct pci_serial_quirk {
34 u32 vendor;
35 u32 device;
36 u32 subvendor;
37 u32 subdevice;
Frédéric Brière5bf8f502011-05-29 15:08:03 -040038 int (*probe)(struct pci_dev *dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 int (*init)(struct pci_dev *dev);
Russell King975a1a7d2009-01-02 13:44:27 +000040 int (*setup)(struct serial_private *,
41 const struct pciserial_board *,
Alan Cox2655a2c2012-07-12 12:59:50 +010042 struct uart_8250_port *, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -070043 void (*exit)(struct pci_dev *dev);
44};
45
Ji-Ze Hong (Peter Hong)68e26a82019-08-16 13:27:29 +080046struct f815xxa_data {
47 spinlock_t lock;
48 int idx;
49};
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051struct serial_private {
Russell King70db3d92005-07-27 11:34:27 +010052 struct pci_dev *dev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070053 unsigned int nr;
Linus Torvalds1da177e2005-04-16 15:20:36 -070054 struct pci_serial_quirk *quirk;
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -020055 const struct pciserial_board *board;
Gustavo A. R. Silva02042a42020-02-12 18:44:26 -060056 int line[];
Linus Torvalds1da177e2005-04-16 15:20:36 -070057};
58
Randy Wrighte0e24202021-05-14 10:26:54 -060059#define PCI_DEVICE_ID_HPE_PCI_SERIAL 0x37e
60
Ralf Ramsauer84284132019-08-12 13:21:52 +020061static const struct pci_device_id pci_use_msi[] = {
62 { PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
63 0xA000, 0x1000) },
64 { PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912,
65 0xA000, 0x1000) },
66 { PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922,
67 0xA000, 0x1000) },
Randy Wrighte0e24202021-05-14 10:26:54 -060068 { PCI_DEVICE_SUB(PCI_VENDOR_ID_HP_3PAR, PCI_DEVICE_ID_HPE_PCI_SERIAL,
69 PCI_ANY_ID, PCI_ANY_ID) },
Ralf Ramsauer84284132019-08-12 13:21:52 +020070 { }
71};
72
Nicos Gollan7808edc2011-05-05 21:00:37 +020073static int pci_default_setup(struct serial_private*,
Alan Cox2655a2c2012-07-12 12:59:50 +010074 const struct pciserial_board*, struct uart_8250_port *, int);
Nicos Gollan7808edc2011-05-05 21:00:37 +020075
Linus Torvalds1da177e2005-04-16 15:20:36 -070076static void moan_device(const char *str, struct pci_dev *dev)
77{
Andy Shevchenko11773842021-10-22 16:51:47 +030078 pci_err(dev, "%s\n"
Joe Perchesad361c92009-07-06 13:05:40 -070079 "Please send the output of lspci -vv, this\n"
80 "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
81 "manufacturer and name of serial board or\n"
Russell Kingf2e0ea82015-03-06 10:49:21 +000082 "modem board to <linux-serial@vger.kernel.org>.\n",
Andy Shevchenko11773842021-10-22 16:51:47 +030083 str, dev->vendor, dev->device,
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 dev->subsystem_vendor, dev->subsystem_device);
85}
86
87static int
Alan Cox2655a2c2012-07-12 12:59:50 +010088setup_port(struct serial_private *priv, struct uart_8250_port *port,
Greg Kroah-Hartman3a96e972021-07-26 15:07:17 +020089 u8 bar, unsigned int offset, int regshift)
Linus Torvalds1da177e2005-04-16 15:20:36 -070090{
Russell King70db3d92005-07-27 11:34:27 +010091 struct pci_dev *dev = priv->dev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070092
Denis Efremovc9c13ba2019-09-28 02:43:08 +030093 if (bar >= PCI_STD_NUM_BARS)
Linus Torvalds1da177e2005-04-16 15:20:36 -070094 return -EINVAL;
95
96 if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
Andy Shevchenko3f64b1d2016-02-15 18:01:51 +020097 if (!pcim_iomap(dev, bar, 0) && !pcim_iomap_table(dev))
Linus Torvalds1da177e2005-04-16 15:20:36 -070098 return -ENOMEM;
99
Alan Cox2655a2c2012-07-12 12:59:50 +0100100 port->port.iotype = UPIO_MEM;
101 port->port.iobase = 0;
Aaron Sierra398a9db2014-10-30 19:49:45 -0500102 port->port.mapbase = pci_resource_start(dev, bar) + offset;
Andy Shevchenko3f64b1d2016-02-15 18:01:51 +0200103 port->port.membase = pcim_iomap_table(dev)[bar] + offset;
Alan Cox2655a2c2012-07-12 12:59:50 +0100104 port->port.regshift = regshift;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105 } else {
Alan Cox2655a2c2012-07-12 12:59:50 +0100106 port->port.iotype = UPIO_PORT;
Aaron Sierra398a9db2014-10-30 19:49:45 -0500107 port->port.iobase = pci_resource_start(dev, bar) + offset;
Alan Cox2655a2c2012-07-12 12:59:50 +0100108 port->port.mapbase = 0;
109 port->port.membase = NULL;
110 port->port.regshift = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700111 }
112 return 0;
113}
114
115/*
Krauth.Julien02c9b5c2008-02-04 22:27:49 -0800116 * ADDI-DATA GmbH communication cards <info@addi-data.com>
117 */
118static int addidata_apci7800_setup(struct serial_private *priv,
Russell King975a1a7d2009-01-02 13:44:27 +0000119 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100120 struct uart_8250_port *port, int idx)
Krauth.Julien02c9b5c2008-02-04 22:27:49 -0800121{
122 unsigned int bar = 0, offset = board->first_offset;
123 bar = FL_GET_BASE(board->flags);
124
125 if (idx < 2) {
126 offset += idx * board->uart_offset;
127 } else if ((idx >= 2) && (idx < 4)) {
128 bar += 1;
129 offset += ((idx - 2) * board->uart_offset);
130 } else if ((idx >= 4) && (idx < 6)) {
131 bar += 2;
132 offset += ((idx - 4) * board->uart_offset);
133 } else if (idx >= 6) {
134 bar += 3;
135 offset += ((idx - 6) * board->uart_offset);
136 }
137
138 return setup_port(priv, port, bar, offset, board->reg_shift);
139}
140
141/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142 * AFAVLAB uses a different mixture of BARs and offsets
143 * Not that ugly ;) -- HW
144 */
145static int
Russell King975a1a7d2009-01-02 13:44:27 +0000146afavlab_setup(struct serial_private *priv, const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100147 struct uart_8250_port *port, int idx)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148{
149 unsigned int bar, offset = board->first_offset;
Alan Cox5756ee92008-02-08 04:18:51 -0800150
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151 bar = FL_GET_BASE(board->flags);
152 if (idx < 4)
153 bar += idx;
154 else {
155 bar = 4;
156 offset += (idx - 4) * board->uart_offset;
157 }
158
Russell King70db3d92005-07-27 11:34:27 +0100159 return setup_port(priv, port, bar, offset, board->reg_shift);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160}
161
162/*
163 * HP's Remote Management Console. The Diva chip came in several
164 * different versions. N-class, L2000 and A500 have two Diva chips, each
165 * with 3 UARTs (the third UART on the second chip is unused). Superdome
166 * and Keystone have one Diva chip with 3 UARTs. Some later machines have
167 * one Diva chip, but it has been expanded to 5 UARTs.
168 */
Russell King61a116e2006-07-03 15:22:35 +0100169static int pci_hp_diva_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700170{
171 int rc = 0;
172
173 switch (dev->subsystem_device) {
174 case PCI_DEVICE_ID_HP_DIVA_TOSCA1:
175 case PCI_DEVICE_ID_HP_DIVA_HALFDOME:
176 case PCI_DEVICE_ID_HP_DIVA_KEYSTONE:
177 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
178 rc = 3;
179 break;
180 case PCI_DEVICE_ID_HP_DIVA_TOSCA2:
181 rc = 2;
182 break;
183 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
184 rc = 4;
185 break;
186 case PCI_DEVICE_ID_HP_DIVA_POWERBAR:
Justin Chen551f8f02005-10-24 22:16:38 +0100187 case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188 rc = 1;
189 break;
190 }
191
192 return rc;
193}
194
195/*
196 * HP's Diva chip puts the 4th/5th serial port further out, and
197 * some serial ports are supposed to be hidden on certain models.
198 */
199static int
Russell King975a1a7d2009-01-02 13:44:27 +0000200pci_hp_diva_setup(struct serial_private *priv,
201 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100202 struct uart_8250_port *port, int idx)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203{
204 unsigned int offset = board->first_offset;
205 unsigned int bar = FL_GET_BASE(board->flags);
206
Russell King70db3d92005-07-27 11:34:27 +0100207 switch (priv->dev->subsystem_device) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
209 if (idx == 3)
210 idx++;
211 break;
212 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
213 if (idx > 0)
214 idx++;
215 if (idx > 2)
216 idx++;
217 break;
218 }
219 if (idx > 2)
220 offset = 0x18;
221
222 offset += idx * board->uart_offset;
223
Russell King70db3d92005-07-27 11:34:27 +0100224 return setup_port(priv, port, bar, offset, board->reg_shift);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700225}
226
227/*
228 * Added for EKF Intel i960 serial boards
229 */
Russell King61a116e2006-07-03 15:22:35 +0100230static int pci_inteli960ni_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231{
Heikki Krogerus0a0d4122015-01-12 13:47:46 +0200232 u32 oldval;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233
234 if (!(dev->subsystem_device & 0x1000))
235 return -ENODEV;
236
237 /* is firmware started? */
Heikki Krogerus0a0d4122015-01-12 13:47:46 +0200238 pci_read_config_dword(dev, 0x44, &oldval);
Alan Cox5756ee92008-02-08 04:18:51 -0800239 if (oldval == 0x00001000L) { /* RESET value */
Andy Shevchenko11773842021-10-22 16:51:47 +0300240 pci_dbg(dev, "Local i960 firmware missing\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241 return -ENODEV;
242 }
243 return 0;
244}
245
246/*
247 * Some PCI serial cards using the PLX 9050 PCI interface chip require
248 * that the card interrupt be explicitly enabled or disabled. This
249 * seems to be mainly needed on card using the PLX which also use I/O
250 * mapped memory.
251 */
Russell King61a116e2006-07-03 15:22:35 +0100252static int pci_plx9050_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700253{
254 u8 irq_config;
255 void __iomem *p;
256
257 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) {
258 moan_device("no memory in bar 0", dev);
259 return 0;
260 }
261
262 irq_config = 0x41;
Bjorn Helgaasadd7b582005-10-24 22:11:57 +0100263 if (dev->vendor == PCI_VENDOR_ID_PANACOM ||
Alan Cox5756ee92008-02-08 04:18:51 -0800264 dev->subsystem_vendor == PCI_SUBVENDOR_ID_EXSYS)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265 irq_config = 0x43;
Alan Cox5756ee92008-02-08 04:18:51 -0800266
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267 if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
Alan Cox5756ee92008-02-08 04:18:51 -0800268 (dev->device == PCI_DEVICE_ID_PLX_ROMULUS))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700269 /*
270 * As the megawolf cards have the int pins active
271 * high, and have 2 UART chips, both ints must be
272 * enabled on the 9050. Also, the UARTS are set in
273 * 16450 mode by default, so we have to enable the
274 * 16C950 'enhanced' mode so that we can use the
275 * deep FIFOs
276 */
277 irq_config = 0x5b;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278 /*
279 * enable/disable interrupts
280 */
Christoph Hellwig4bdc0d62020-01-06 09:43:50 +0100281 p = ioremap(pci_resource_start(dev, 0), 0x80);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282 if (p == NULL)
283 return -ENOMEM;
284 writel(irq_config, p + 0x4c);
285
286 /*
287 * Read the register back to ensure that it took effect.
288 */
289 readl(p + 0x4c);
290 iounmap(p);
291
292 return 0;
293}
294
Bill Pembertonae8d8a12012-11-19 13:26:18 -0500295static void pci_plx9050_exit(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296{
297 u8 __iomem *p;
298
299 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0)
300 return;
301
302 /*
303 * disable interrupts
304 */
Christoph Hellwig4bdc0d62020-01-06 09:43:50 +0100305 p = ioremap(pci_resource_start(dev, 0), 0x80);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700306 if (p != NULL) {
307 writel(0, p + 0x4c);
308
309 /*
310 * Read the register back to ensure that it took effect.
311 */
312 readl(p + 0x4c);
313 iounmap(p);
314 }
315}
316
Will Page04bf7e72009-04-06 17:32:15 +0100317#define NI8420_INT_ENABLE_REG 0x38
318#define NI8420_INT_ENABLE_BIT 0x2000
319
Bill Pembertonae8d8a12012-11-19 13:26:18 -0500320static void pci_ni8420_exit(struct pci_dev *dev)
Will Page04bf7e72009-04-06 17:32:15 +0100321{
322 void __iomem *p;
Will Page04bf7e72009-04-06 17:32:15 +0100323 unsigned int bar = 0;
324
325 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
326 moan_device("no memory in bar", dev);
327 return;
328 }
329
Aaron Sierra398a9db2014-10-30 19:49:45 -0500330 p = pci_ioremap_bar(dev, bar);
Will Page04bf7e72009-04-06 17:32:15 +0100331 if (p == NULL)
332 return;
333
334 /* Disable the CPU Interrupt */
335 writel(readl(p + NI8420_INT_ENABLE_REG) & ~(NI8420_INT_ENABLE_BIT),
336 p + NI8420_INT_ENABLE_REG);
337 iounmap(p);
338}
339
340
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100341/* MITE registers */
342#define MITE_IOWBSR1 0xc4
343#define MITE_IOWCR1 0xf4
344#define MITE_LCIMR1 0x08
345#define MITE_LCIMR2 0x10
346
347#define MITE_LCIMR2_CLR_CPU_IE (1 << 30)
348
Bill Pembertonae8d8a12012-11-19 13:26:18 -0500349static void pci_ni8430_exit(struct pci_dev *dev)
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100350{
351 void __iomem *p;
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100352 unsigned int bar = 0;
353
354 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
355 moan_device("no memory in bar", dev);
356 return;
357 }
358
Aaron Sierra398a9db2014-10-30 19:49:45 -0500359 p = pci_ioremap_bar(dev, bar);
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100360 if (p == NULL)
361 return;
362
363 /* Disable the CPU Interrupt */
364 writel(MITE_LCIMR2_CLR_CPU_IE, p + MITE_LCIMR2);
365 iounmap(p);
366}
367
Linus Torvalds1da177e2005-04-16 15:20:36 -0700368/* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
369static int
Russell King975a1a7d2009-01-02 13:44:27 +0000370sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100371 struct uart_8250_port *port, int idx)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700372{
373 unsigned int bar, offset = board->first_offset;
374
375 bar = 0;
376
377 if (idx < 4) {
378 /* first four channels map to 0, 0x100, 0x200, 0x300 */
379 offset += idx * board->uart_offset;
380 } else if (idx < 8) {
381 /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */
382 offset += idx * board->uart_offset + 0xC00;
383 } else /* we have only 8 ports on PMC-OCTALPRO */
384 return 1;
385
Russell King70db3d92005-07-27 11:34:27 +0100386 return setup_port(priv, port, bar, offset, board->reg_shift);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700387}
388
389/*
390* This does initialization for PMC OCTALPRO cards:
391* maps the device memory, resets the UARTs (needed, bc
392* if the module is removed and inserted again, the card
393* is in the sleep mode) and enables global interrupt.
394*/
395
396/* global control register offset for SBS PMC-OctalPro */
397#define OCT_REG_CR_OFF 0x500
398
Russell King61a116e2006-07-03 15:22:35 +0100399static int sbs_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700400{
401 u8 __iomem *p;
402
Arjan van de Ven24ed3ab2009-06-24 18:34:58 +0100403 p = pci_ioremap_bar(dev, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404
405 if (p == NULL)
406 return -ENOMEM;
407 /* Set bit-4 Control Register (UART RESET) in to reset the uarts */
Alan Cox5756ee92008-02-08 04:18:51 -0800408 writeb(0x10, p + OCT_REG_CR_OFF);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700409 udelay(50);
Alan Cox5756ee92008-02-08 04:18:51 -0800410 writeb(0x0, p + OCT_REG_CR_OFF);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700411
412 /* Set bit-2 (INTENABLE) of Control Register */
413 writeb(0x4, p + OCT_REG_CR_OFF);
414 iounmap(p);
415
416 return 0;
417}
418
419/*
420 * Disables the global interrupt of PMC-OctalPro
421 */
422
Bill Pembertonae8d8a12012-11-19 13:26:18 -0500423static void sbs_exit(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700424{
425 u8 __iomem *p;
426
Arjan van de Ven24ed3ab2009-06-24 18:34:58 +0100427 p = pci_ioremap_bar(dev, 0);
Alan Cox5756ee92008-02-08 04:18:51 -0800428 /* FIXME: What if resource_len < OCT_REG_CR_OFF */
429 if (p != NULL)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430 writeb(0, p + OCT_REG_CR_OFF);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431 iounmap(p);
432}
433
434/*
435 * SIIG serial cards have an PCI interface chip which also controls
436 * the UART clocking frequency. Each UART can be clocked independently
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300437 * (except cards equipped with 4 UARTs) and initial clocking settings
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438 * are stored in the EEPROM chip. It can cause problems because this
439 * version of serial driver doesn't support differently clocked UART's
440 * on single PCI card. To prevent this, initialization functions set
441 * high frequency clocking for all UART's on given card. It is safe (I
442 * hope) because it doesn't touch EEPROM settings to prevent conflicts
443 * with other OSes (like M$ DOS).
444 *
445 * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999
Alan Cox5756ee92008-02-08 04:18:51 -0800446 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700447 * There is two family of SIIG serial cards with different PCI
448 * interface chip and different configuration methods:
449 * - 10x cards have control registers in IO and/or memory space;
450 * - 20x cards have control registers in standard PCI configuration space.
451 *
Russell King67d74b82005-07-27 11:33:03 +0100452 * Note: all 10x cards have PCI device ids 0x10..
453 * all 20x cards have PCI device ids 0x20..
454 *
Andrey Paninfbc0dc02005-07-18 11:38:09 +0100455 * There are also Quartet Serial cards which use Oxford Semiconductor
456 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
457 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458 * Note: some SIIG cards are probed by the parport_serial object.
459 */
460
461#define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc)
462#define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8)
463
464static int pci_siig10x_init(struct pci_dev *dev)
465{
466 u16 data;
467 void __iomem *p;
468
469 switch (dev->device & 0xfff8) {
470 case PCI_DEVICE_ID_SIIG_1S_10x: /* 1S */
471 data = 0xffdf;
472 break;
473 case PCI_DEVICE_ID_SIIG_2S_10x: /* 2S, 2S1P */
474 data = 0xf7ff;
475 break;
476 default: /* 1S1P, 4S */
477 data = 0xfffb;
478 break;
479 }
480
Christoph Hellwig4bdc0d62020-01-06 09:43:50 +0100481 p = ioremap(pci_resource_start(dev, 0), 0x80);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482 if (p == NULL)
483 return -ENOMEM;
484
485 writew(readw(p + 0x28) & data, p + 0x28);
486 readw(p + 0x28);
487 iounmap(p);
488 return 0;
489}
490
491#define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc)
492#define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc)
493
494static int pci_siig20x_init(struct pci_dev *dev)
495{
496 u8 data;
497
498 /* Change clock frequency for the first UART. */
499 pci_read_config_byte(dev, 0x6f, &data);
500 pci_write_config_byte(dev, 0x6f, data & 0xef);
501
502 /* If this card has 2 UART, we have to do the same with second UART. */
503 if (((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S_20x) ||
504 ((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S1P_20x)) {
505 pci_read_config_byte(dev, 0x73, &data);
506 pci_write_config_byte(dev, 0x73, data & 0xef);
507 }
508 return 0;
509}
510
Russell King67d74b82005-07-27 11:33:03 +0100511static int pci_siig_init(struct pci_dev *dev)
512{
513 unsigned int type = dev->device & 0xff00;
514
515 if (type == 0x1000)
516 return pci_siig10x_init(dev);
Andy Shevchenko0187f882021-10-22 16:51:46 +0300517 if (type == 0x2000)
Russell King67d74b82005-07-27 11:33:03 +0100518 return pci_siig20x_init(dev);
519
520 moan_device("Unknown SIIG card", dev);
521 return -ENODEV;
522}
523
Andrey Panin3ec9c592006-02-02 20:15:09 +0000524static int pci_siig_setup(struct serial_private *priv,
Russell King975a1a7d2009-01-02 13:44:27 +0000525 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100526 struct uart_8250_port *port, int idx)
Andrey Panin3ec9c592006-02-02 20:15:09 +0000527{
528 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
529
530 if (idx > 3) {
531 bar = 4;
532 offset = (idx - 4) * 8;
533 }
534
535 return setup_port(priv, port, bar, offset, 0);
536}
537
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538/*
539 * Timedia has an explosion of boards, and to avoid the PCI table from
540 * growing *huge*, we use this function to collapse some 70 entries
541 * in the PCI table into one, for sanity's and compactness's sake.
542 */
Helge Dellere9422e02006-08-29 21:57:29 +0200543static const unsigned short timedia_single_port[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
545};
546
Helge Dellere9422e02006-08-29 21:57:29 +0200547static const unsigned short timedia_dual_port[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700548 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
Alan Cox5756ee92008-02-08 04:18:51 -0800549 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
550 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
552 0xD079, 0
553};
554
Helge Dellere9422e02006-08-29 21:57:29 +0200555static const unsigned short timedia_quad_port[] = {
Alan Cox5756ee92008-02-08 04:18:51 -0800556 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
557 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700558 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
559 0xB157, 0
560};
561
Helge Dellere9422e02006-08-29 21:57:29 +0200562static const unsigned short timedia_eight_port[] = {
Alan Cox5756ee92008-02-08 04:18:51 -0800563 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700564 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
565};
566
Arjan van de Vencb3592b2005-11-28 21:04:11 +0000567static const struct timedia_struct {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568 int num;
Helge Dellere9422e02006-08-29 21:57:29 +0200569 const unsigned short *ids;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570} timedia_data[] = {
571 { 1, timedia_single_port },
572 { 2, timedia_dual_port },
573 { 4, timedia_quad_port },
Helge Dellere9422e02006-08-29 21:57:29 +0200574 { 8, timedia_eight_port }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575};
576
Frédéric Brièreb9b24552011-05-29 15:08:04 -0400577/*
578 * There are nearly 70 different Timedia/SUNIX PCI serial devices. Instead of
579 * listing them individually, this driver merely grabs them all with
580 * PCI_ANY_ID. Some of these devices, however, also feature a parallel port,
581 * and should be left free to be claimed by parport_serial instead.
582 */
583static int pci_timedia_probe(struct pci_dev *dev)
584{
585 /*
586 * Check the third digit of the subdevice ID
587 * (0,2,3,5,6: serial only -- 7,8,9: serial + parallel)
588 */
589 if ((dev->subsystem_device & 0x00f0) >= 0x70) {
Andy Shevchenko11773842021-10-22 16:51:47 +0300590 pci_info(dev, "ignoring Timedia subdevice %04x for parport_serial\n",
591 dev->subsystem_device);
Frédéric Brièreb9b24552011-05-29 15:08:04 -0400592 return -ENODEV;
593 }
594
595 return 0;
596}
597
Russell King61a116e2006-07-03 15:22:35 +0100598static int pci_timedia_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599{
Helge Dellere9422e02006-08-29 21:57:29 +0200600 const unsigned short *ids;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700601 int i, j;
602
Helge Dellere9422e02006-08-29 21:57:29 +0200603 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 ids = timedia_data[i].ids;
605 for (j = 0; ids[j]; j++)
606 if (dev->subsystem_device == ids[j])
607 return timedia_data[i].num;
608 }
609 return 0;
610}
611
612/*
613 * Timedia/SUNIX uses a mixture of BARs and offsets
614 * Ugh, this is ugly as all hell --- TYT
615 */
616static int
Russell King975a1a7d2009-01-02 13:44:27 +0000617pci_timedia_setup(struct serial_private *priv,
618 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100619 struct uart_8250_port *port, int idx)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620{
621 unsigned int bar = 0, offset = board->first_offset;
622
623 switch (idx) {
624 case 0:
625 bar = 0;
626 break;
627 case 1:
628 offset = board->uart_offset;
629 bar = 0;
630 break;
631 case 2:
632 bar = 1;
633 break;
634 case 3:
635 offset = board->uart_offset;
Gustavo A. R. Silvadf561f662020-08-23 17:36:59 -0500636 fallthrough;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700637 case 4: /* BAR 2 */
638 case 5: /* BAR 3 */
639 case 6: /* BAR 4 */
640 case 7: /* BAR 5 */
641 bar = idx - 2;
642 }
643
Russell King70db3d92005-07-27 11:34:27 +0100644 return setup_port(priv, port, bar, offset, board->reg_shift);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700645}
646
647/*
648 * Some Titan cards are also a little weird
649 */
650static int
Russell King70db3d92005-07-27 11:34:27 +0100651titan_400l_800l_setup(struct serial_private *priv,
Russell King975a1a7d2009-01-02 13:44:27 +0000652 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100653 struct uart_8250_port *port, int idx)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654{
655 unsigned int bar, offset = board->first_offset;
656
657 switch (idx) {
658 case 0:
659 bar = 1;
660 break;
661 case 1:
662 bar = 2;
663 break;
664 default:
665 bar = 4;
666 offset = (idx - 2) * board->uart_offset;
667 }
668
Russell King70db3d92005-07-27 11:34:27 +0100669 return setup_port(priv, port, bar, offset, board->reg_shift);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700670}
671
Russell King61a116e2006-07-03 15:22:35 +0100672static int pci_xircom_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700673{
674 msleep(100);
675 return 0;
676}
677
Will Page04bf7e72009-04-06 17:32:15 +0100678static int pci_ni8420_init(struct pci_dev *dev)
679{
680 void __iomem *p;
Will Page04bf7e72009-04-06 17:32:15 +0100681 unsigned int bar = 0;
682
683 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
684 moan_device("no memory in bar", dev);
685 return 0;
686 }
687
Aaron Sierra398a9db2014-10-30 19:49:45 -0500688 p = pci_ioremap_bar(dev, bar);
Will Page04bf7e72009-04-06 17:32:15 +0100689 if (p == NULL)
690 return -ENOMEM;
691
692 /* Enable CPU Interrupt */
693 writel(readl(p + NI8420_INT_ENABLE_REG) | NI8420_INT_ENABLE_BIT,
694 p + NI8420_INT_ENABLE_REG);
695
696 iounmap(p);
697 return 0;
698}
699
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100700#define MITE_IOWBSR1_WSIZE 0xa
701#define MITE_IOWBSR1_WIN_OFFSET 0x800
702#define MITE_IOWBSR1_WENAB (1 << 7)
703#define MITE_LCIMR1_IO_IE_0 (1 << 24)
704#define MITE_LCIMR2_SET_CPU_IE (1 << 31)
705#define MITE_IOWCR1_RAMSEL_MASK 0xfffffffe
706
707static int pci_ni8430_init(struct pci_dev *dev)
708{
709 void __iomem *p;
Aaron Sierra398a9db2014-10-30 19:49:45 -0500710 struct pci_bus_region region;
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100711 u32 device_window;
712 unsigned int bar = 0;
713
714 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
715 moan_device("no memory in bar", dev);
716 return 0;
717 }
718
Aaron Sierra398a9db2014-10-30 19:49:45 -0500719 p = pci_ioremap_bar(dev, bar);
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100720 if (p == NULL)
721 return -ENOMEM;
722
Aaron Sierra398a9db2014-10-30 19:49:45 -0500723 /*
724 * Set device window address and size in BAR0, while acknowledging that
725 * the resource structure may contain a translated address that differs
726 * from the address the device responds to.
727 */
728 pcibios_resource_to_bus(dev->bus, &region, &dev->resource[bar]);
729 device_window = ((region.start + MITE_IOWBSR1_WIN_OFFSET) & 0xffffff00)
Anton Wuerfel6d7c1572016-01-14 16:08:11 +0100730 | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE;
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100731 writel(device_window, p + MITE_IOWBSR1);
732
733 /* Set window access to go to RAMSEL IO address space */
734 writel((readl(p + MITE_IOWCR1) & MITE_IOWCR1_RAMSEL_MASK),
735 p + MITE_IOWCR1);
736
737 /* Enable IO Bus Interrupt 0 */
738 writel(MITE_LCIMR1_IO_IE_0, p + MITE_LCIMR1);
739
740 /* Enable CPU Interrupt */
741 writel(MITE_LCIMR2_SET_CPU_IE, p + MITE_LCIMR2);
742
743 iounmap(p);
744 return 0;
745}
746
747/* UART Port Control Register */
Je Yen Tam27ed14d2019-11-27 15:53:01 +0800748#define NI8430_PORTCON 0x0f
749#define NI8430_PORTCON_TXVR_ENABLE (1 << 3)
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100750
751static int
Alan Coxbf538fe2009-04-06 17:35:42 +0100752pci_ni8430_setup(struct serial_private *priv,
753 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100754 struct uart_8250_port *port, int idx)
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100755{
Aaron Sierra398a9db2014-10-30 19:49:45 -0500756 struct pci_dev *dev = priv->dev;
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100757 void __iomem *p;
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100758 unsigned int bar, offset = board->first_offset;
759
760 if (idx >= board->num_ports)
761 return 1;
762
763 bar = FL_GET_BASE(board->flags);
764 offset += idx * board->uart_offset;
765
Aaron Sierra398a9db2014-10-30 19:49:45 -0500766 p = pci_ioremap_bar(dev, bar);
Aaron Sierra5d14bba2014-10-30 19:49:52 -0500767 if (!p)
768 return -ENOMEM;
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100769
Joe Perches7c9d4402011-06-23 11:39:20 -0700770 /* enable the transceiver */
Je Yen Tam27ed14d2019-11-27 15:53:01 +0800771 writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
772 p + offset + NI8430_PORTCON);
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100773
774 iounmap(p);
775
776 return setup_port(priv, port, bar, offset, board->reg_shift);
777}
778
Nicos Gollan7808edc2011-05-05 21:00:37 +0200779static int pci_netmos_9900_setup(struct serial_private *priv,
780 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +0100781 struct uart_8250_port *port, int idx)
Nicos Gollan7808edc2011-05-05 21:00:37 +0200782{
783 unsigned int bar;
784
Dmitry Eremin-Solenikov333c0852014-02-11 14:18:13 +0400785 if ((priv->dev->device != PCI_DEVICE_ID_NETMOS_9865) &&
786 (priv->dev->subsystem_device & 0xff00) == 0x3000) {
Nicos Gollan7808edc2011-05-05 21:00:37 +0200787 /* netmos apparently orders BARs by datasheet layout, so serial
788 * ports get BARs 0 and 3 (or 1 and 4 for memmapped)
789 */
790 bar = 3 * idx;
791
792 return setup_port(priv, port, bar, 0, board->reg_shift);
Nicos Gollan7808edc2011-05-05 21:00:37 +0200793 }
Andy Shevchenko0187f882021-10-22 16:51:46 +0300794
795 return pci_default_setup(priv, board, port, idx);
Nicos Gollan7808edc2011-05-05 21:00:37 +0200796}
797
798/* the 99xx series comes with a range of device IDs and a variety
799 * of capabilities:
800 *
801 * 9900 has varying capabilities and can cascade to sub-controllers
802 * (cascading should be purely internal)
803 * 9904 is hardwired with 4 serial ports
804 * 9912 and 9922 are hardwired with 2 serial ports
805 */
806static int pci_netmos_9900_numports(struct pci_dev *dev)
807{
808 unsigned int c = dev->class;
809 unsigned int pi;
810 unsigned short sub_serports;
811
Anton Wuerfel149a44c2016-01-14 16:08:17 +0100812 pi = c & 0xff;
Nicos Gollan7808edc2011-05-05 21:00:37 +0200813
Anton Wuerfelc2f5fde2016-01-14 16:08:14 +0100814 if (pi == 2)
Nicos Gollan7808edc2011-05-05 21:00:37 +0200815 return 1;
Anton Wuerfelc2f5fde2016-01-14 16:08:14 +0100816
817 if ((pi == 0) && (dev->device == PCI_DEVICE_ID_NETMOS_9900)) {
Nicos Gollan7808edc2011-05-05 21:00:37 +0200818 /* two possibilities: 0x30ps encodes number of parallel and
819 * serial ports, or 0x1000 indicates *something*. This is not
820 * immediately obvious, since the 2s1p+4s configuration seems
821 * to offer all functionality on functions 0..2, while still
822 * advertising the same function 3 as the 4s+2s1p config.
823 */
824 sub_serports = dev->subsystem_device & 0xf;
Anton Wuerfelc2f5fde2016-01-14 16:08:14 +0100825 if (sub_serports > 0)
Nicos Gollan7808edc2011-05-05 21:00:37 +0200826 return sub_serports;
Anton Wuerfelc2f5fde2016-01-14 16:08:14 +0100827
Andy Shevchenko11773842021-10-22 16:51:47 +0300828 pci_err(dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
Anton Wuerfelc2f5fde2016-01-14 16:08:14 +0100829 return 0;
Nicos Gollan7808edc2011-05-05 21:00:37 +0200830 }
831
832 moan_device("unknown NetMos/Mostech program interface", dev);
833 return 0;
834}
Shawn Bohrer46a0fac2009-04-06 17:32:07 +0100835
Russell King61a116e2006-07-03 15:22:35 +0100836static int pci_netmos_init(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700837{
838 /* subdevice 0x00PS means <P> parallel, <S> serial */
839 unsigned int num_serial = dev->subsystem_device & 0xf;
840
Ira W. Snyderac6ec5b2009-12-21 16:26:45 -0800841 if ((dev->device == PCI_DEVICE_ID_NETMOS_9901) ||
842 (dev->device == PCI_DEVICE_ID_NETMOS_9865))
Michael Bueschc4285b42009-06-30 11:41:21 -0700843 return 0;
Nicos Gollan7808edc2011-05-05 21:00:37 +0200844
Jiri Slaby25cf9bc2009-01-15 13:30:34 +0000845 if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
846 dev->subsystem_device == 0x0299)
847 return 0;
848
Nicos Gollan7808edc2011-05-05 21:00:37 +0200849 switch (dev->device) { /* FALLTHROUGH on all */
Anton Wuerfelb3d67932016-01-14 16:08:23 +0100850 case PCI_DEVICE_ID_NETMOS_9904:
851 case PCI_DEVICE_ID_NETMOS_9912:
852 case PCI_DEVICE_ID_NETMOS_9922:
853 case PCI_DEVICE_ID_NETMOS_9900:
854 num_serial = pci_netmos_9900_numports(dev);
855 break;
Nicos Gollan7808edc2011-05-05 21:00:37 +0200856
Anton Wuerfelb3d67932016-01-14 16:08:23 +0100857 default:
858 break;
Nicos Gollan7808edc2011-05-05 21:00:37 +0200859 }
860
Anton Wuerfel829b0002016-01-14 16:08:22 +0100861 if (num_serial == 0) {
862 moan_device("unknown NetMos/Mostech device", dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863 return -ENODEV;
Anton Wuerfel829b0002016-01-14 16:08:22 +0100864 }
Nicos Gollan7808edc2011-05-05 21:00:37 +0200865
Linus Torvalds1da177e2005-04-16 15:20:36 -0700866 return num_serial;
867}
868
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700869/*
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700870 * These chips are available with optionally one parallel port and up to
871 * two serial ports. Unfortunately they all have the same product id.
872 *
873 * Basic configuration is done over a region of 32 I/O ports. The base
874 * ioport is called INTA or INTC, depending on docs/other drivers.
875 *
876 * The region of the 32 I/O ports is configured in POSIO0R...
877 */
878
879/* registers */
880#define ITE_887x_MISCR 0x9c
881#define ITE_887x_INTCBAR 0x78
882#define ITE_887x_UARTBAR 0x7c
883#define ITE_887x_PS0BAR 0x10
884#define ITE_887x_POSIO0 0x60
885
886/* I/O space size */
887#define ITE_887x_IOSIZE 32
888/* I/O space size (bits 26-24; 8 bytes = 011b) */
889#define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
890/* I/O space size (bits 26-24; 32 bytes = 101b) */
891#define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
892/* Decoding speed (1 = slow, 2 = medium, 3 = fast) */
893#define ITE_887x_POSIO_SPEED (3 << 29)
894/* enable IO_Space bit */
895#define ITE_887x_POSIO_ENABLE (1 << 31)
896
Andy Shevchenko35b4f172021-10-22 16:51:45 +0300897/* inta_addr are the configuration addresses of the ITE */
898static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0, 0x200, 0x280 };
Ralf Baechlef79abb82007-08-30 23:56:31 -0700899static int pci_ite887x_init(struct pci_dev *dev)
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700900{
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700901 int ret, i, type;
902 struct resource *iobase = NULL;
903 u32 miscr, uartbar, ioport;
904
905 /* search for the base-ioport */
Andy Shevchenko35b4f172021-10-22 16:51:45 +0300906 for (i = 0; i < ARRAY_SIZE(inta_addr); i++) {
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700907 iobase = request_region(inta_addr[i], ITE_887x_IOSIZE,
908 "ite887x");
909 if (iobase != NULL) {
910 /* write POSIO0R - speed | size | ioport */
911 pci_write_config_dword(dev, ITE_887x_POSIO0,
912 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
913 ITE_887x_POSIO_IOSIZE_32 | inta_addr[i]);
914 /* write INTCBAR - ioport */
Alan Cox5756ee92008-02-08 04:18:51 -0800915 pci_write_config_dword(dev, ITE_887x_INTCBAR,
916 inta_addr[i]);
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700917 ret = inb(inta_addr[i]);
918 if (ret != 0xff) {
919 /* ioport connected */
920 break;
921 }
922 release_region(iobase->start, ITE_887x_IOSIZE);
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700923 }
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700924 }
925
Andy Shevchenko35b4f172021-10-22 16:51:45 +0300926 if (i == ARRAY_SIZE(inta_addr)) {
Andy Shevchenko11773842021-10-22 16:51:47 +0300927 pci_err(dev, "could not find iobase\n");
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700928 return -ENODEV;
929 }
930
931 /* start of undocumented type checking (see parport_pc.c) */
932 type = inb(iobase->start + 0x18) & 0x0f;
933
934 switch (type) {
935 case 0x2: /* ITE8871 (1P) */
936 case 0xa: /* ITE8875 (1P) */
937 ret = 0;
938 break;
939 case 0xe: /* ITE8872 (2S1P) */
940 ret = 2;
941 break;
942 case 0x6: /* ITE8873 (1S) */
943 ret = 1;
944 break;
945 case 0x8: /* ITE8874 (2S) */
946 ret = 2;
947 break;
948 default:
949 moan_device("Unknown ITE887x", dev);
950 ret = -ENODEV;
951 }
952
953 /* configure all serial ports */
954 for (i = 0; i < ret; i++) {
955 /* read the I/O port from the device */
956 pci_read_config_dword(dev, ITE_887x_PS0BAR + (0x4 * (i + 1)),
957 &ioport);
958 ioport &= 0x0000FF00; /* the actual base address */
959 pci_write_config_dword(dev, ITE_887x_POSIO0 + (0x4 * (i + 1)),
960 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
961 ITE_887x_POSIO_IOSIZE_8 | ioport);
962
963 /* write the ioport to the UARTBAR */
964 pci_read_config_dword(dev, ITE_887x_UARTBAR, &uartbar);
965 uartbar &= ~(0xffff << (16 * i)); /* clear half the reg */
966 uartbar |= (ioport << (16 * i)); /* set the ioport */
967 pci_write_config_dword(dev, ITE_887x_UARTBAR, uartbar);
968
969 /* get current config */
970 pci_read_config_dword(dev, ITE_887x_MISCR, &miscr);
971 /* disable interrupts (UARTx_Routing[3:0]) */
972 miscr &= ~(0xf << (12 - 4 * i));
973 /* activate the UART (UARTx_En) */
974 miscr |= 1 << (23 - i);
975 /* write new config with activated UART */
976 pci_write_config_dword(dev, ITE_887x_MISCR, miscr);
977 }
978
979 if (ret <= 0) {
980 /* the device has no UARTs if we get here */
981 release_region(iobase->start, ITE_887x_IOSIZE);
982 }
983
984 return ret;
985}
986
Bill Pembertonae8d8a12012-11-19 13:26:18 -0500987static void pci_ite887x_exit(struct pci_dev *dev)
Niels de Vos84f8c6f2007-08-22 14:01:14 -0700988{
989 u32 ioport;
990 /* the ioport is bit 0-15 in POSIO0R */
991 pci_read_config_dword(dev, ITE_887x_POSIO0, &ioport);
992 ioport &= 0xffff;
993 release_region(ioport, ITE_887x_IOSIZE);
994}
995
Russell King9f2a0362009-01-02 13:44:20 +0000996/*
Mike Skoog1bc8cde2014-10-16 13:10:01 -0700997 * EndRun Technologies.
998 * Determine the number of ports available on the device.
999 */
1000#define PCI_VENDOR_ID_ENDRUN 0x7401
1001#define PCI_DEVICE_ID_ENDRUN_1588 0xe100
1002
1003static int pci_endrun_init(struct pci_dev *dev)
1004{
1005 u8 __iomem *p;
1006 unsigned long deviceID;
1007 unsigned int number_uarts = 0;
1008
1009 /* EndRun device is all 0xexxx */
1010 if (dev->vendor == PCI_VENDOR_ID_ENDRUN &&
1011 (dev->device & 0xf000) != 0xe000)
1012 return 0;
1013
1014 p = pci_iomap(dev, 0, 5);
1015 if (p == NULL)
1016 return -ENOMEM;
1017
1018 deviceID = ioread32(p);
1019 /* EndRun device */
1020 if (deviceID == 0x07000200) {
1021 number_uarts = ioread8(p + 4);
Andy Shevchenko11773842021-10-22 16:51:47 +03001022 pci_dbg(dev, "%d ports detected on EndRun PCI Express device\n", number_uarts);
Mike Skoog1bc8cde2014-10-16 13:10:01 -07001023 }
1024 pci_iounmap(dev, p);
1025 return number_uarts;
1026}
1027
1028/*
Russell King9f2a0362009-01-02 13:44:20 +00001029 * Oxford Semiconductor Inc.
1030 * Check that device is part of the Tornado range of devices, then determine
1031 * the number of ports available on the device.
1032 */
1033static int pci_oxsemi_tornado_init(struct pci_dev *dev)
1034{
1035 u8 __iomem *p;
1036 unsigned long deviceID;
1037 unsigned int number_uarts = 0;
1038
1039 /* OxSemi Tornado devices are all 0xCxxx */
1040 if (dev->vendor == PCI_VENDOR_ID_OXSEMI &&
1041 (dev->device & 0xF000) != 0xC000)
1042 return 0;
1043
1044 p = pci_iomap(dev, 0, 5);
1045 if (p == NULL)
1046 return -ENOMEM;
1047
1048 deviceID = ioread32(p);
1049 /* Tornado device */
1050 if (deviceID == 0x07000200) {
1051 number_uarts = ioread8(p + 4);
Andy Shevchenko11773842021-10-22 16:51:47 +03001052 pci_dbg(dev, "%d ports detected on Oxford PCI Express device\n", number_uarts);
Russell King9f2a0362009-01-02 13:44:20 +00001053 }
1054 pci_iounmap(dev, p);
1055 return number_uarts;
1056}
1057
Alan Coxeb26dfe2012-07-12 13:00:31 +01001058static int pci_asix_setup(struct serial_private *priv,
Russell King975a1a7d2009-01-02 13:44:27 +00001059 const struct pciserial_board *board,
Alan Coxeb26dfe2012-07-12 13:00:31 +01001060 struct uart_8250_port *port, int idx)
1061{
1062 port->bugs |= UART_BUG_PARITY;
1063 return pci_default_setup(priv, board, port, idx);
1064}
1065
Alan Cox55c7c0f2012-11-29 09:03:00 +10301066#define QPCR_TEST_FOR1 0x3F
1067#define QPCR_TEST_GET1 0x00
1068#define QPCR_TEST_FOR2 0x40
1069#define QPCR_TEST_GET2 0x40
1070#define QPCR_TEST_FOR3 0x80
1071#define QPCR_TEST_GET3 0x40
1072#define QPCR_TEST_FOR4 0xC0
1073#define QPCR_TEST_GET4 0x80
1074
1075#define QOPR_CLOCK_X1 0x0000
1076#define QOPR_CLOCK_X2 0x0001
1077#define QOPR_CLOCK_X4 0x0002
1078#define QOPR_CLOCK_X8 0x0003
1079#define QOPR_CLOCK_RATE_MASK 0x0003
1080
Andy Shevchenko42902422021-10-26 16:34:51 +03001081/* Quatech devices have their own extra interface features */
1082static struct pci_device_id quatech_cards[] = {
1083 { PCI_DEVICE_DATA(QUATECH, QSC100, 1) },
1084 { PCI_DEVICE_DATA(QUATECH, DSC100, 1) },
1085 { PCI_DEVICE_DATA(QUATECH, DSC100E, 0) },
1086 { PCI_DEVICE_DATA(QUATECH, DSC200, 1) },
1087 { PCI_DEVICE_DATA(QUATECH, DSC200E, 0) },
1088 { PCI_DEVICE_DATA(QUATECH, ESC100D, 1) },
1089 { PCI_DEVICE_DATA(QUATECH, ESC100M, 1) },
1090 { PCI_DEVICE_DATA(QUATECH, QSCP100, 1) },
1091 { PCI_DEVICE_DATA(QUATECH, DSCP100, 1) },
1092 { PCI_DEVICE_DATA(QUATECH, QSCP200, 1) },
1093 { PCI_DEVICE_DATA(QUATECH, DSCP200, 1) },
1094 { PCI_DEVICE_DATA(QUATECH, ESCLP100, 0) },
1095 { PCI_DEVICE_DATA(QUATECH, QSCLP100, 0) },
1096 { PCI_DEVICE_DATA(QUATECH, DSCLP100, 0) },
1097 { PCI_DEVICE_DATA(QUATECH, SSCLP100, 0) },
1098 { PCI_DEVICE_DATA(QUATECH, QSCLP200, 0) },
1099 { PCI_DEVICE_DATA(QUATECH, DSCLP200, 0) },
1100 { PCI_DEVICE_DATA(QUATECH, SSCLP200, 0) },
1101 { PCI_DEVICE_DATA(QUATECH, SPPXP_100, 0) },
Alan Cox55c7c0f2012-11-29 09:03:00 +10301102 { 0, }
1103};
1104
Alan Cox55c7c0f2012-11-29 09:03:00 +10301105static int pci_quatech_rqopr(struct uart_8250_port *port)
1106{
1107 unsigned long base = port->port.iobase;
1108 u8 LCR, val;
1109
1110 LCR = inb(base + UART_LCR);
1111 outb(0xBF, base + UART_LCR);
1112 val = inb(base + UART_SCR);
1113 outb(LCR, base + UART_LCR);
1114 return val;
1115}
1116
1117static void pci_quatech_wqopr(struct uart_8250_port *port, u8 qopr)
1118{
1119 unsigned long base = port->port.iobase;
Jiri Slaby17b27202016-06-23 13:34:22 +02001120 u8 LCR;
Alan Cox55c7c0f2012-11-29 09:03:00 +10301121
1122 LCR = inb(base + UART_LCR);
1123 outb(0xBF, base + UART_LCR);
Jiri Slaby17b27202016-06-23 13:34:22 +02001124 inb(base + UART_SCR);
Alan Cox55c7c0f2012-11-29 09:03:00 +10301125 outb(qopr, base + UART_SCR);
1126 outb(LCR, base + UART_LCR);
1127}
1128
1129static int pci_quatech_rqmcr(struct uart_8250_port *port)
1130{
1131 unsigned long base = port->port.iobase;
1132 u8 LCR, val, qmcr;
1133
1134 LCR = inb(base + UART_LCR);
1135 outb(0xBF, base + UART_LCR);
1136 val = inb(base + UART_SCR);
1137 outb(val | 0x10, base + UART_SCR);
1138 qmcr = inb(base + UART_MCR);
1139 outb(val, base + UART_SCR);
1140 outb(LCR, base + UART_LCR);
1141
1142 return qmcr;
1143}
1144
1145static void pci_quatech_wqmcr(struct uart_8250_port *port, u8 qmcr)
1146{
1147 unsigned long base = port->port.iobase;
1148 u8 LCR, val;
1149
1150 LCR = inb(base + UART_LCR);
1151 outb(0xBF, base + UART_LCR);
1152 val = inb(base + UART_SCR);
1153 outb(val | 0x10, base + UART_SCR);
1154 outb(qmcr, base + UART_MCR);
1155 outb(val, base + UART_SCR);
1156 outb(LCR, base + UART_LCR);
1157}
1158
1159static int pci_quatech_has_qmcr(struct uart_8250_port *port)
1160{
1161 unsigned long base = port->port.iobase;
1162 u8 LCR, val;
1163
1164 LCR = inb(base + UART_LCR);
1165 outb(0xBF, base + UART_LCR);
1166 val = inb(base + UART_SCR);
1167 if (val & 0x20) {
1168 outb(0x80, UART_LCR);
1169 if (!(inb(UART_SCR) & 0x20)) {
1170 outb(LCR, base + UART_LCR);
1171 return 1;
1172 }
1173 }
1174 return 0;
1175}
1176
1177static int pci_quatech_test(struct uart_8250_port *port)
1178{
Anton Wuerfel1a33e342016-01-14 16:08:10 +01001179 u8 reg, qopr;
1180
1181 qopr = pci_quatech_rqopr(port);
Alan Cox55c7c0f2012-11-29 09:03:00 +10301182 pci_quatech_wqopr(port, qopr & QPCR_TEST_FOR1);
1183 reg = pci_quatech_rqopr(port) & 0xC0;
1184 if (reg != QPCR_TEST_GET1)
1185 return -EINVAL;
1186 pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR2);
1187 reg = pci_quatech_rqopr(port) & 0xC0;
1188 if (reg != QPCR_TEST_GET2)
1189 return -EINVAL;
1190 pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR3);
1191 reg = pci_quatech_rqopr(port) & 0xC0;
1192 if (reg != QPCR_TEST_GET3)
1193 return -EINVAL;
1194 pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR4);
1195 reg = pci_quatech_rqopr(port) & 0xC0;
1196 if (reg != QPCR_TEST_GET4)
1197 return -EINVAL;
1198
1199 pci_quatech_wqopr(port, qopr);
1200 return 0;
1201}
1202
1203static int pci_quatech_clock(struct uart_8250_port *port)
1204{
1205 u8 qopr, reg, set;
1206 unsigned long clock;
1207
1208 if (pci_quatech_test(port) < 0)
1209 return 1843200;
1210
1211 qopr = pci_quatech_rqopr(port);
1212
1213 pci_quatech_wqopr(port, qopr & ~QOPR_CLOCK_X8);
1214 reg = pci_quatech_rqopr(port);
1215 if (reg & QOPR_CLOCK_X8) {
1216 clock = 1843200;
1217 goto out;
1218 }
1219 pci_quatech_wqopr(port, qopr | QOPR_CLOCK_X8);
1220 reg = pci_quatech_rqopr(port);
1221 if (!(reg & QOPR_CLOCK_X8)) {
1222 clock = 1843200;
1223 goto out;
1224 }
1225 reg &= QOPR_CLOCK_X8;
1226 if (reg == QOPR_CLOCK_X2) {
1227 clock = 3685400;
1228 set = QOPR_CLOCK_X2;
1229 } else if (reg == QOPR_CLOCK_X4) {
1230 clock = 7372800;
1231 set = QOPR_CLOCK_X4;
1232 } else if (reg == QOPR_CLOCK_X8) {
1233 clock = 14745600;
1234 set = QOPR_CLOCK_X8;
1235 } else {
1236 clock = 1843200;
1237 set = QOPR_CLOCK_X1;
1238 }
1239 qopr &= ~QOPR_CLOCK_RATE_MASK;
1240 qopr |= set;
1241
1242out:
1243 pci_quatech_wqopr(port, qopr);
1244 return clock;
1245}
1246
1247static int pci_quatech_rs422(struct uart_8250_port *port)
1248{
1249 u8 qmcr;
1250 int rs422 = 0;
1251
1252 if (!pci_quatech_has_qmcr(port))
1253 return 0;
1254 qmcr = pci_quatech_rqmcr(port);
1255 pci_quatech_wqmcr(port, 0xFF);
1256 if (pci_quatech_rqmcr(port))
1257 rs422 = 1;
1258 pci_quatech_wqmcr(port, qmcr);
1259 return rs422;
1260}
1261
1262static int pci_quatech_init(struct pci_dev *dev)
1263{
Andy Shevchenko42902422021-10-26 16:34:51 +03001264 const struct pci_device_id *match;
1265 bool amcc = false;
1266
1267 match = pci_match_id(quatech_cards, dev);
1268 if (match)
1269 amcc = match->driver_data;
1270 else
1271 pci_err(dev, "unknown port type '0x%04X'.\n", dev->device);
1272
1273 if (amcc) {
Alan Cox55c7c0f2012-11-29 09:03:00 +10301274 unsigned long base = pci_resource_start(dev, 0);
1275 if (base) {
1276 u32 tmp;
Anton Wuerfel1a33e342016-01-14 16:08:10 +01001277
Jonathan Woithe9c5320f2013-12-09 16:33:08 +10301278 outl(inl(base + 0x38) | 0x00002000, base + 0x38);
Alan Cox55c7c0f2012-11-29 09:03:00 +10301279 tmp = inl(base + 0x3c);
1280 outl(tmp | 0x01000000, base + 0x3c);
Jonathan Woithe9c5320f2013-12-09 16:33:08 +10301281 outl(tmp &= ~0x01000000, base + 0x3c);
Alan Cox55c7c0f2012-11-29 09:03:00 +10301282 }
1283 }
1284 return 0;
1285}
1286
1287static int pci_quatech_setup(struct serial_private *priv,
1288 const struct pciserial_board *board,
1289 struct uart_8250_port *port, int idx)
1290{
1291 /* Needed by pci_quatech calls below */
1292 port->port.iobase = pci_resource_start(priv->dev, FL_GET_BASE(board->flags));
1293 /* Set up the clocking */
1294 port->port.uartclk = pci_quatech_clock(port);
1295 /* For now just warn about RS422 */
1296 if (pci_quatech_rs422(port))
Andy Shevchenko11773842021-10-22 16:51:47 +03001297 pci_warn(priv->dev, "software control of RS422 features not currently supported.\n");
Alan Cox55c7c0f2012-11-29 09:03:00 +10301298 return pci_default_setup(priv, board, port, idx);
1299}
1300
Greg Kroah-Hartmand73dfc62013-01-15 22:44:48 -08001301static void pci_quatech_exit(struct pci_dev *dev)
Alan Cox55c7c0f2012-11-29 09:03:00 +10301302{
1303}
1304
Alan Coxeb26dfe2012-07-12 13:00:31 +01001305static int pci_default_setup(struct serial_private *priv,
Russell King70db3d92005-07-27 11:34:27 +01001306 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +01001307 struct uart_8250_port *port, int idx)
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308{
1309 unsigned int bar, offset = board->first_offset, maxnr;
1310
1311 bar = FL_GET_BASE(board->flags);
1312 if (board->flags & FL_BASE_BARS)
1313 bar += idx;
1314 else
1315 offset += idx * board->uart_offset;
1316
Greg Kroah-Hartman2427ddd2006-06-12 17:07:52 -07001317 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1318 (board->reg_shift + 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001319
1320 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1321 return 1;
Alan Cox5756ee92008-02-08 04:18:51 -08001322
Russell King70db3d92005-07-27 11:34:27 +01001323 return setup_port(priv, port, bar, offset, board->reg_shift);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001324}
kbuild test robot607ea692019-06-18 19:23:51 +08001325static void
Jay Dolan6bf4e422019-06-11 04:47:15 -07001326pericom_do_set_divisor(struct uart_port *port, unsigned int baud,
1327 unsigned int quot, unsigned int quot_frac)
1328{
1329 int scr;
1330 int lcr;
1331 int actual_baud;
1332 int tolerance;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001333
Jay Dolan6bf4e422019-06-11 04:47:15 -07001334 for (scr = 5 ; scr <= 15 ; scr++) {
1335 actual_baud = 921600 * 16 / scr;
1336 tolerance = actual_baud / 50;
1337
1338 if ((baud < actual_baud + tolerance) &&
1339 (baud > actual_baud - tolerance)) {
1340
1341 lcr = serial_port_in(port, UART_LCR);
1342 serial_port_out(port, UART_LCR, lcr | 0x80);
1343
1344 serial_port_out(port, UART_DLL, 1);
1345 serial_port_out(port, UART_DLM, 0);
1346 serial_port_out(port, 2, 16 - scr);
1347 serial_port_out(port, UART_LCR, lcr);
1348 return;
1349 } else if (baud > actual_baud) {
1350 break;
1351 }
1352 }
1353 serial8250_do_set_divisor(port, baud, quot, quot_frac);
1354}
Angelo Butti5c31ef92016-11-07 16:39:03 +01001355static int pci_pericom_setup(struct serial_private *priv,
1356 const struct pciserial_board *board,
1357 struct uart_8250_port *port, int idx)
1358{
1359 unsigned int bar, offset = board->first_offset, maxnr;
1360
1361 bar = FL_GET_BASE(board->flags);
1362 if (board->flags & FL_BASE_BARS)
1363 bar += idx;
1364 else
1365 offset += idx * board->uart_offset;
1366
Jay Dolan6bf4e422019-06-11 04:47:15 -07001367
1368 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1369 (board->reg_shift + 3);
1370
1371 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1372 return 1;
1373
1374 port->port.set_divisor = pericom_do_set_divisor;
1375
1376 return setup_port(priv, port, bar, offset, board->reg_shift);
1377}
1378
1379static int pci_pericom_setup_four_at_eight(struct serial_private *priv,
1380 const struct pciserial_board *board,
1381 struct uart_8250_port *port, int idx)
1382{
1383 unsigned int bar, offset = board->first_offset, maxnr;
1384
1385 bar = FL_GET_BASE(board->flags);
1386 if (board->flags & FL_BASE_BARS)
1387 bar += idx;
1388 else
1389 offset += idx * board->uart_offset;
1390
Angelo Butti5c31ef92016-11-07 16:39:03 +01001391 if (idx==3)
1392 offset = 0x38;
1393
1394 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1395 (board->reg_shift + 3);
1396
1397 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1398 return 1;
1399
Jay Dolan6bf4e422019-06-11 04:47:15 -07001400 port->port.set_divisor = pericom_do_set_divisor;
1401
Angelo Butti5c31ef92016-11-07 16:39:03 +01001402 return setup_port(priv, port, bar, offset, board->reg_shift);
1403}
1404
Dirk Brandewie095e24b2010-11-17 07:35:20 -08001405static int
1406ce4100_serial_setup(struct serial_private *priv,
1407 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +01001408 struct uart_8250_port *port, int idx)
Dirk Brandewie095e24b2010-11-17 07:35:20 -08001409{
1410 int ret;
1411
Maxime Bizon08ec2122012-10-19 10:45:07 +02001412 ret = setup_port(priv, port, idx, 0, board->reg_shift);
Alan Cox2655a2c2012-07-12 12:59:50 +01001413 port->port.iotype = UPIO_MEM32;
1414 port->port.type = PORT_XSCALE;
1415 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1416 port->port.regshift = 2;
Dirk Brandewie095e24b2010-11-17 07:35:20 -08001417
1418 return ret;
1419}
1420
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04001421static int
1422pci_omegapci_setup(struct serial_private *priv,
Alan Cox1798ca12011-05-24 12:35:48 +01001423 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +01001424 struct uart_8250_port *port, int idx)
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04001425{
1426 return setup_port(priv, port, 2, idx * 8, 0);
1427}
1428
Stephen Hurdebebd492013-01-17 14:14:53 -08001429static int
1430pci_brcm_trumanage_setup(struct serial_private *priv,
1431 const struct pciserial_board *board,
1432 struct uart_8250_port *port, int idx)
1433{
1434 int ret = pci_default_setup(priv, board, port, idx);
1435
1436 port->port.type = PORT_BRCM_TRUMANAGE;
1437 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1438 return ret;
1439}
1440
Peter Hungfecf27a2015-07-28 11:59:24 +08001441/* RTS will control by MCR if this bit is 0 */
1442#define FINTEK_RTS_CONTROL_BY_HW BIT(4)
1443/* only worked with FINTEK_RTS_CONTROL_BY_HW on */
1444#define FINTEK_RTS_INVERT BIT(5)
1445
1446/* We should do proper H/W transceiver setting before change to RS485 mode */
1447static int pci_fintek_rs485_config(struct uart_port *port,
1448 struct serial_rs485 *rs485)
1449{
Geliang Tang30c6c352015-12-27 22:29:42 +08001450 struct pci_dev *pci_dev = to_pci_dev(port->dev);
Peter Hungfecf27a2015-07-28 11:59:24 +08001451 u8 setting;
1452 u8 *index = (u8 *) port->private_data;
Peter Hungfecf27a2015-07-28 11:59:24 +08001453
1454 pci_read_config_byte(pci_dev, 0x40 + 8 * *index + 7, &setting);
1455
Peter Hungd3159452015-08-05 14:44:53 +08001456 if (!rs485)
1457 rs485 = &port->rs485;
1458 else if (rs485->flags & SER_RS485_ENABLED)
Peter Hungfecf27a2015-07-28 11:59:24 +08001459 memset(rs485->padding, 0, sizeof(rs485->padding));
1460 else
1461 memset(rs485, 0, sizeof(*rs485));
1462
1463 /* F81504/508/512 not support RTS delay before or after send */
1464 rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND;
1465
1466 if (rs485->flags & SER_RS485_ENABLED) {
1467 /* Enable RTS H/W control mode */
1468 setting |= FINTEK_RTS_CONTROL_BY_HW;
1469
1470 if (rs485->flags & SER_RS485_RTS_ON_SEND) {
1471 /* RTS driving high on TX */
1472 setting &= ~FINTEK_RTS_INVERT;
1473 } else {
1474 /* RTS driving low on TX */
1475 setting |= FINTEK_RTS_INVERT;
1476 }
1477
1478 rs485->delay_rts_after_send = 0;
1479 rs485->delay_rts_before_send = 0;
1480 } else {
1481 /* Disable RTS H/W control mode */
1482 setting &= ~(FINTEK_RTS_CONTROL_BY_HW | FINTEK_RTS_INVERT);
1483 }
1484
1485 pci_write_config_byte(pci_dev, 0x40 + 8 * *index + 7, setting);
Peter Hungd3159452015-08-05 14:44:53 +08001486
1487 if (rs485 != &port->rs485)
1488 port->rs485 = *rs485;
1489
Peter Hungfecf27a2015-07-28 11:59:24 +08001490 return 0;
1491}
1492
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001493static int pci_fintek_setup(struct serial_private *priv,
1494 const struct pciserial_board *board,
1495 struct uart_8250_port *port, int idx)
1496{
1497 struct pci_dev *pdev = priv->dev;
Peter Hungfecf27a2015-07-28 11:59:24 +08001498 u8 *data;
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001499 u8 config_base;
Peter Hung6a8bc232015-04-01 14:00:21 +08001500 u16 iobase;
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001501
Peter Hung6a8bc232015-04-01 14:00:21 +08001502 config_base = 0x40 + 0x08 * idx;
1503
1504 /* Get the io address from configuration space */
1505 pci_read_config_word(pdev, config_base + 4, &iobase);
1506
Andy Shevchenko11773842021-10-22 16:51:47 +03001507 pci_dbg(pdev, "idx=%d iobase=0x%x", idx, iobase);
Peter Hung6a8bc232015-04-01 14:00:21 +08001508
1509 port->port.iotype = UPIO_PORT;
1510 port->port.iobase = iobase;
Peter Hungfecf27a2015-07-28 11:59:24 +08001511 port->port.rs485_config = pci_fintek_rs485_config;
1512
1513 data = devm_kzalloc(&pdev->dev, sizeof(u8), GFP_KERNEL);
1514 if (!data)
1515 return -ENOMEM;
1516
1517 /* preserve index in PCI configuration space */
1518 *data = idx;
1519 port->port.private_data = data;
Peter Hung6a8bc232015-04-01 14:00:21 +08001520
1521 return 0;
1522}
1523
1524static int pci_fintek_init(struct pci_dev *dev)
1525{
1526 unsigned long iobase;
1527 u32 max_port, i;
Ji-Ze Hong (Peter Hong)6def0472016-12-23 09:41:20 +08001528 resource_size_t bar_data[3];
Peter Hung6a8bc232015-04-01 14:00:21 +08001529 u8 config_base;
Peter Hungd3159452015-08-05 14:44:53 +08001530 struct serial_private *priv = pci_get_drvdata(dev);
1531 struct uart_8250_port *port;
Peter Hung6a8bc232015-04-01 14:00:21 +08001532
Ji-Ze Hong (Peter Hong)6def0472016-12-23 09:41:20 +08001533 if (!(pci_resource_flags(dev, 5) & IORESOURCE_IO) ||
1534 !(pci_resource_flags(dev, 4) & IORESOURCE_IO) ||
1535 !(pci_resource_flags(dev, 3) & IORESOURCE_IO))
1536 return -ENODEV;
1537
Peter Hung6a8bc232015-04-01 14:00:21 +08001538 switch (dev->device) {
1539 case 0x1104: /* 4 ports */
1540 case 0x1108: /* 8 ports */
1541 max_port = dev->device & 0xff;
Peter Hungcb8ee9f2014-11-19 13:22:27 +08001542 break;
Peter Hung6a8bc232015-04-01 14:00:21 +08001543 case 0x1112: /* 12 ports */
1544 max_port = 12;
Peter Hungcb8ee9f2014-11-19 13:22:27 +08001545 break;
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001546 default:
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001547 return -EINVAL;
1548 }
1549
Peter Hungcb8ee9f2014-11-19 13:22:27 +08001550 /* Get the io address dispatch from the BIOS */
Ji-Ze Hong (Peter Hong)6def0472016-12-23 09:41:20 +08001551 bar_data[0] = pci_resource_start(dev, 5);
1552 bar_data[1] = pci_resource_start(dev, 4);
1553 bar_data[2] = pci_resource_start(dev, 3);
Peter Hungcb8ee9f2014-11-19 13:22:27 +08001554
Peter Hung6a8bc232015-04-01 14:00:21 +08001555 for (i = 0; i < max_port; ++i) {
1556 /* UART0 configuration offset start from 0x40 */
1557 config_base = 0x40 + 0x08 * i;
Peter Hungcb8ee9f2014-11-19 13:22:27 +08001558
Peter Hung6a8bc232015-04-01 14:00:21 +08001559 /* Calculate Real IO Port */
1560 iobase = (bar_data[i / 4] & 0xffffffe0) + (i % 4) * 8;
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001561
Peter Hung6a8bc232015-04-01 14:00:21 +08001562 /* Enable UART I/O port */
1563 pci_write_config_byte(dev, config_base + 0x00, 0x01);
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001564
Peter Hung6a8bc232015-04-01 14:00:21 +08001565 /* Select 128-byte FIFO and 8x FIFO threshold */
1566 pci_write_config_byte(dev, config_base + 0x01, 0x33);
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001567
Peter Hung6a8bc232015-04-01 14:00:21 +08001568 /* LSB UART */
1569 pci_write_config_byte(dev, config_base + 0x04,
1570 (u8)(iobase & 0xff));
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001571
Peter Hung6a8bc232015-04-01 14:00:21 +08001572 /* MSB UART */
1573 pci_write_config_byte(dev, config_base + 0x05,
1574 (u8)((iobase & 0xff00) >> 8));
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001575
Peter Hung6a8bc232015-04-01 14:00:21 +08001576 pci_write_config_byte(dev, config_base + 0x06, dev->irq);
Peter Hungfecf27a2015-07-28 11:59:24 +08001577
Peter Hungd3159452015-08-05 14:44:53 +08001578 if (priv) {
1579 /* re-apply RS232/485 mode when
1580 * pciserial_resume_ports()
1581 */
1582 port = serial8250_get_port(priv->line[i]);
1583 pci_fintek_rs485_config(&port->port, NULL);
1584 } else {
1585 /* First init without port data
1586 * force init to RS232 Mode
1587 */
1588 pci_write_config_byte(dev, config_base + 0x07, 0x01);
1589 }
Peter Hung6a8bc232015-04-01 14:00:21 +08001590 }
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001591
Peter Hung6a8bc232015-04-01 14:00:21 +08001592 return max_port;
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07001593}
1594
Ji-Ze Hong (Peter Hong)68e26a82019-08-16 13:27:29 +08001595static void f815xxa_mem_serial_out(struct uart_port *p, int offset, int value)
1596{
1597 struct f815xxa_data *data = p->private_data;
1598 unsigned long flags;
1599
1600 spin_lock_irqsave(&data->lock, flags);
1601 writeb(value, p->membase + offset);
1602 readb(p->membase + UART_SCR); /* Dummy read for flush pcie tx queue */
1603 spin_unlock_irqrestore(&data->lock, flags);
1604}
1605
1606static int pci_fintek_f815xxa_setup(struct serial_private *priv,
1607 const struct pciserial_board *board,
1608 struct uart_8250_port *port, int idx)
1609{
1610 struct pci_dev *pdev = priv->dev;
1611 struct f815xxa_data *data;
1612
1613 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
1614 if (!data)
1615 return -ENOMEM;
1616
1617 data->idx = idx;
1618 spin_lock_init(&data->lock);
1619
1620 port->port.private_data = data;
1621 port->port.iotype = UPIO_MEM;
1622 port->port.flags |= UPF_IOREMAP;
1623 port->port.mapbase = pci_resource_start(pdev, 0) + 8 * idx;
1624 port->port.serial_out = f815xxa_mem_serial_out;
1625
1626 return 0;
1627}
1628
1629static int pci_fintek_f815xxa_init(struct pci_dev *dev)
1630{
1631 u32 max_port, i;
1632 int config_base;
1633
1634 if (!(pci_resource_flags(dev, 0) & IORESOURCE_MEM))
1635 return -ENODEV;
1636
1637 switch (dev->device) {
1638 case 0x1204: /* 4 ports */
1639 case 0x1208: /* 8 ports */
1640 max_port = dev->device & 0xff;
1641 break;
1642 case 0x1212: /* 12 ports */
1643 max_port = 12;
1644 break;
1645 default:
1646 return -EINVAL;
1647 }
1648
1649 /* Set to mmio decode */
1650 pci_write_config_byte(dev, 0x209, 0x40);
1651
1652 for (i = 0; i < max_port; ++i) {
1653 /* UART0 configuration offset start from 0x2A0 */
1654 config_base = 0x2A0 + 0x08 * i;
1655
1656 /* Select 128-byte FIFO and 8x FIFO threshold */
1657 pci_write_config_byte(dev, config_base + 0x01, 0x33);
1658
1659 /* Enable UART I/O port */
1660 pci_write_config_byte(dev, config_base + 0, 0x01);
1661 }
1662
1663 return max_port;
1664}
1665
Mauro Carvalho Chehabb6adea32009-02-20 15:38:52 -08001666static int skip_tx_en_setup(struct serial_private *priv,
1667 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +01001668 struct uart_8250_port *port, int idx)
Mauro Carvalho Chehabb6adea32009-02-20 15:38:52 -08001669{
Andy Shevchenkoc7ac15c2017-07-25 20:39:58 +03001670 port->port.quirks |= UPQ_NO_TXEN_TEST;
Andy Shevchenko11773842021-10-22 16:51:47 +03001671 pci_dbg(priv->dev,
Greg Kroah-Hartmanaf8c5b82013-09-28 13:01:59 -07001672 "serial8250: skipping TxEn test for device [%04x:%04x] subsystem [%04x:%04x]\n",
1673 priv->dev->vendor, priv->dev->device,
1674 priv->dev->subsystem_vendor, priv->dev->subsystem_device);
Mauro Carvalho Chehabb6adea32009-02-20 15:38:52 -08001675
1676 return pci_default_setup(priv, board, port, idx);
1677}
1678
Sudhakar Mamillapalli0ad372b2012-04-10 14:10:58 -07001679static void kt_handle_break(struct uart_port *p)
1680{
Andy Shevchenkob1261c82014-07-14 14:26:14 +03001681 struct uart_8250_port *up = up_to_u8250p(p);
Sudhakar Mamillapalli0ad372b2012-04-10 14:10:58 -07001682 /*
1683 * On receipt of a BI, serial device in Intel ME (Intel
1684 * management engine) needs to have its fifos cleared for sane
1685 * SOL (Serial Over Lan) output.
1686 */
1687 serial8250_clear_and_reinit_fifos(up);
1688}
1689
1690static unsigned int kt_serial_in(struct uart_port *p, int offset)
1691{
Andy Shevchenkob1261c82014-07-14 14:26:14 +03001692 struct uart_8250_port *up = up_to_u8250p(p);
Sudhakar Mamillapalli0ad372b2012-04-10 14:10:58 -07001693 unsigned int val;
1694
1695 /*
1696 * When the Intel ME (management engine) gets reset its serial
1697 * port registers could return 0 momentarily. Functions like
1698 * serial8250_console_write, read and save the IER, perform
1699 * some operation and then restore it. In order to avoid
1700 * setting IER register inadvertently to 0, if the value read
1701 * is 0, double check with ier value in uart_8250_port and use
1702 * that instead. up->ier should be the same value as what is
1703 * currently configured.
1704 */
1705 val = inb(p->iobase + offset);
1706 if (offset == UART_IER) {
1707 if (val == 0)
1708 val = up->ier;
1709 }
1710 return val;
1711}
1712
Dan Williamsbc02d152012-04-06 11:49:50 -07001713static int kt_serial_setup(struct serial_private *priv,
1714 const struct pciserial_board *board,
Alan Cox2655a2c2012-07-12 12:59:50 +01001715 struct uart_8250_port *port, int idx)
Dan Williamsbc02d152012-04-06 11:49:50 -07001716{
Alan Cox2655a2c2012-07-12 12:59:50 +01001717 port->port.flags |= UPF_BUG_THRE;
1718 port->port.serial_in = kt_serial_in;
1719 port->port.handle_break = kt_handle_break;
Dan Williamsbc02d152012-04-06 11:49:50 -07001720 return skip_tx_en_setup(priv, board, port, idx);
1721}
1722
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09001723static int pci_eg20t_init(struct pci_dev *dev)
1724{
1725#if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE)
1726 return -ENODEV;
1727#else
1728 return 0;
1729#endif
1730}
1731
Matt Schultedc96efb2012-11-19 09:12:04 -06001732static int
Guainluca Anzolin6971c632012-09-04 15:56:12 +01001733pci_wch_ch353_setup(struct serial_private *priv,
Anton Wuerfel6d7c1572016-01-14 16:08:11 +01001734 const struct pciserial_board *board,
1735 struct uart_8250_port *port, int idx)
Guainluca Anzolin6971c632012-09-04 15:56:12 +01001736{
1737 port->port.flags |= UPF_FIXED_TYPE;
1738 port->port.type = PORT_16550A;
Søren Holm06315342011-09-02 22:55:37 +02001739 return pci_default_setup(priv, board, port, idx);
1740}
1741
Sergej Pupykin2fdd8c82014-11-06 14:36:31 +03001742static int
Alexandr Petrenko55c368c2016-05-23 10:04:54 +03001743pci_wch_ch355_setup(struct serial_private *priv,
1744 const struct pciserial_board *board,
1745 struct uart_8250_port *port, int idx)
1746{
1747 port->port.flags |= UPF_FIXED_TYPE;
1748 port->port.type = PORT_16550A;
1749 return pci_default_setup(priv, board, port, idx);
1750}
1751
1752static int
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03001753pci_wch_ch38x_setup(struct serial_private *priv,
Anton Wuerfel6d7c1572016-01-14 16:08:11 +01001754 const struct pciserial_board *board,
1755 struct uart_8250_port *port, int idx)
Sergej Pupykin2fdd8c82014-11-06 14:36:31 +03001756{
1757 port->port.flags |= UPF_FIXED_TYPE;
1758 port->port.type = PORT_16850;
1759 return pci_default_setup(priv, board, port, idx);
1760}
1761
Du Huanpeng04b6ff52020-08-22 09:47:28 +08001762
1763#define CH384_XINT_ENABLE_REG 0xEB
1764#define CH384_XINT_ENABLE_BIT 0x02
1765
1766static int pci_wch_ch38x_init(struct pci_dev *dev)
1767{
1768 int max_port;
1769 unsigned long iobase;
1770
1771
1772 switch (dev->device) {
1773 case 0x3853: /* 8 ports */
1774 max_port = 8;
1775 break;
1776 default:
1777 return -EINVAL;
1778 }
1779
1780 iobase = pci_resource_start(dev, 0);
1781 outb(CH384_XINT_ENABLE_BIT, iobase + CH384_XINT_ENABLE_REG);
1782
1783 return max_port;
1784}
1785
1786static void pci_wch_ch38x_exit(struct pci_dev *dev)
1787{
1788 unsigned long iobase;
1789
1790 iobase = pci_resource_start(dev, 0);
1791 outb(0x0, iobase + CH384_XINT_ENABLE_REG);
1792}
1793
1794
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08001795static int
1796pci_sunix_setup(struct serial_private *priv,
1797 const struct pciserial_board *board,
1798 struct uart_8250_port *port, int idx)
1799{
1800 int bar;
1801 int offset;
1802
1803 port->port.flags |= UPF_FIXED_TYPE;
1804 port->port.type = PORT_SUNIX;
1805
1806 if (idx < 4) {
1807 bar = 0;
1808 offset = idx * board->uart_offset;
1809 } else {
1810 bar = 1;
1811 idx -= 4;
1812 idx = div_s64_rem(idx, 4, &offset);
1813 offset = idx * 64 + offset * board->uart_offset;
1814 }
1815
1816 return setup_port(priv, port, bar, offset, 0);
1817}
1818
Kai-Heng Fengd193db72019-08-17 00:51:24 +08001819static int
1820pci_moxa_setup(struct serial_private *priv,
1821 const struct pciserial_board *board,
1822 struct uart_8250_port *port, int idx)
1823{
1824 unsigned int bar = FL_GET_BASE(board->flags);
1825 int offset;
1826
1827 if (board->num_ports == 4 && idx == 3)
1828 offset = 7 * board->uart_offset;
1829 else
1830 offset = idx * board->uart_offset;
1831
1832 return setup_port(priv, port, bar, offset, 0);
1833}
1834
Linus Torvalds1da177e2005-04-16 15:20:36 -07001835#define PCI_VENDOR_ID_SBSMODULARIO 0x124B
1836#define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
1837#define PCI_DEVICE_ID_OCTPRO 0x0001
1838#define PCI_SUBDEVICE_ID_OCTPRO232 0x0108
1839#define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
1840#define PCI_SUBDEVICE_ID_POCTAL232 0x0308
1841#define PCI_SUBDEVICE_ID_POCTAL422 0x0408
Flavio Leitner26e82202012-09-21 21:04:34 -03001842#define PCI_SUBDEVICE_ID_SIIG_DUAL_00 0x2500
1843#define PCI_SUBDEVICE_ID_SIIG_DUAL_30 0x2530
Michael Bramer78d70d42009-01-27 11:51:16 +00001844#define PCI_VENDOR_ID_ADVANTECH 0x13fe
Dirk Brandewie095e24b2010-11-17 07:35:20 -08001845#define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66
Michael Bramer78d70d42009-01-27 11:51:16 +00001846#define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620
Thomee Wright0c6d7742014-05-19 20:30:51 +00001847#define PCI_DEVICE_ID_ADVANTECH_PCI3618 0x3618
1848#define PCI_DEVICE_ID_ADVANTECH_PCIf618 0xf618
Yegor Yefremov66169ad2010-06-04 09:58:18 +02001849#define PCI_DEVICE_ID_TITAN_200I 0x8028
1850#define PCI_DEVICE_ID_TITAN_400I 0x8048
1851#define PCI_DEVICE_ID_TITAN_800I 0x8088
1852#define PCI_DEVICE_ID_TITAN_800EH 0xA007
1853#define PCI_DEVICE_ID_TITAN_800EHB 0xA008
1854#define PCI_DEVICE_ID_TITAN_400EH 0xA009
1855#define PCI_DEVICE_ID_TITAN_100E 0xA010
1856#define PCI_DEVICE_ID_TITAN_200E 0xA012
1857#define PCI_DEVICE_ID_TITAN_400E 0xA013
1858#define PCI_DEVICE_ID_TITAN_800E 0xA014
1859#define PCI_DEVICE_ID_TITAN_200EI 0xA016
1860#define PCI_DEVICE_ID_TITAN_200EISI 0xA017
Yegor Yefremov48c02472013-12-09 12:11:15 +01001861#define PCI_DEVICE_ID_TITAN_200V3 0xA306
Yegor Yefremov1e9deb12011-12-27 15:47:37 +01001862#define PCI_DEVICE_ID_TITAN_400V3 0xA310
1863#define PCI_DEVICE_ID_TITAN_410V3 0xA312
1864#define PCI_DEVICE_ID_TITAN_800V3 0xA314
1865#define PCI_DEVICE_ID_TITAN_800V3B 0xA315
Lytochkin Borise8470032010-07-26 10:02:26 +04001866#define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538
Scott Kilauaa273ae2011-05-11 15:41:59 -05001867#define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04001868#define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
Dan Williamsbc02d152012-04-06 11:49:50 -07001869#define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
Alan Cox27788c52012-09-04 16:21:06 +01001870#define PCI_VENDOR_ID_WCH 0x4348
Wang YanQing8b5c9132013-03-05 23:16:48 +08001871#define PCI_DEVICE_ID_WCH_CH352_2S 0x3253
Alan Cox27788c52012-09-04 16:21:06 +01001872#define PCI_DEVICE_ID_WCH_CH353_4S 0x3453
1873#define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046
Ezequiel Garciafeb58142014-05-24 15:24:51 -03001874#define PCI_DEVICE_ID_WCH_CH353_1S1P 0x5053
Alan Cox27788c52012-09-04 16:21:06 +01001875#define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053
Alexandr Petrenko55c368c2016-05-23 10:04:54 +03001876#define PCI_DEVICE_ID_WCH_CH355_4S 0x7173
Alan Cox66835492012-08-16 12:01:33 +01001877#define PCI_VENDOR_ID_AGESTAR 0x5372
1878#define PCI_DEVICE_ID_AGESTAR_9375 0x6872
Alan Coxeb26dfe2012-07-12 13:00:31 +01001879#define PCI_VENDOR_ID_ASIX 0x9710
Stephen Hurdebebd492013-01-17 14:14:53 -08001880#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
Ian Abbott57c1f0e2013-07-16 16:14:40 +01001881#define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e
Matt Schulte14faa8c2012-11-21 10:35:15 -06001882
Sergej Pupykin2fdd8c82014-11-06 14:36:31 +03001883#define PCIE_VENDOR_ID_WCH 0x1c00
1884#define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03001885#define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470
Du Huanpeng04b6ff52020-08-22 09:47:28 +08001886#define PCIE_DEVICE_ID_WCH_CH384_8S 0x3853
Jeremy McNicoll7dde5572016-02-02 13:00:45 -08001887#define PCIE_DEVICE_ID_WCH_CH382_2S 0x3253
Linus Torvalds1da177e2005-04-16 15:20:36 -07001888
Jimi Damonc8d19242016-07-20 17:00:40 -07001889#define PCI_VENDOR_ID_ACCESIO 0x494f
1890#define PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SDB 0x1051
1891#define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2S 0x1053
1892#define PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB 0x105C
1893#define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4S 0x105E
1894#define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_2DB 0x1091
1895#define PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_2 0x1093
1896#define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB 0x1099
1897#define PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_4 0x109B
1898#define PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SMDB 0x10D1
1899#define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2SM 0x10D3
1900#define PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB 0x10DA
1901#define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4SM 0x10DC
1902#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_1 0x1108
1903#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_2 0x1110
1904#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_2 0x1111
1905#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4 0x1118
1906#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_4 0x1119
1907#define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2S 0x1152
1908#define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4S 0x115A
1909#define PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_2 0x1190
1910#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_2 0x1191
1911#define PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4 0x1198
1912#define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_4 0x1199
1913#define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2SM 0x11D0
1914#define PCI_DEVICE_ID_ACCESIO_PCIE_COM422_4 0x105A
1915#define PCI_DEVICE_ID_ACCESIO_PCIE_COM485_4 0x105B
1916#define PCI_DEVICE_ID_ACCESIO_PCIE_COM422_8 0x106A
1917#define PCI_DEVICE_ID_ACCESIO_PCIE_COM485_8 0x106B
1918#define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4 0x1098
1919#define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_8 0x10A9
1920#define PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SM 0x10D9
1921#define PCI_DEVICE_ID_ACCESIO_PCIE_COM_8SM 0x10E9
1922#define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM 0x11D8
1923
1924
Kai-Heng Fengd193db72019-08-17 00:51:24 +08001925#define PCI_DEVICE_ID_MOXA_CP102E 0x1024
1926#define PCI_DEVICE_ID_MOXA_CP102EL 0x1025
1927#define PCI_DEVICE_ID_MOXA_CP104EL_A 0x1045
1928#define PCI_DEVICE_ID_MOXA_CP114EL 0x1144
1929#define PCI_DEVICE_ID_MOXA_CP116E_A_A 0x1160
1930#define PCI_DEVICE_ID_MOXA_CP116E_A_B 0x1161
1931#define PCI_DEVICE_ID_MOXA_CP118EL_A 0x1182
1932#define PCI_DEVICE_ID_MOXA_CP118E_A_I 0x1183
1933#define PCI_DEVICE_ID_MOXA_CP132EL 0x1322
1934#define PCI_DEVICE_ID_MOXA_CP134EL_A 0x1342
1935#define PCI_DEVICE_ID_MOXA_CP138E_A 0x1381
1936#define PCI_DEVICE_ID_MOXA_CP168EL_A 0x1683
Jimi Damonc8d19242016-07-20 17:00:40 -07001937
Catalin(ux) M BOIEb76c5a02008-07-23 21:29:46 -07001938/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
1939#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
Scott Ashcroftd13402a2013-03-03 21:35:06 +00001940#define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
Catalin(ux) M BOIEb76c5a02008-07-23 21:29:46 -07001941
Linus Torvalds1da177e2005-04-16 15:20:36 -07001942/*
1943 * Master list of serial port init/setup/exit quirks.
1944 * This does not describe the general nature of the port.
1945 * (ie, baud base, number and location of ports, etc)
1946 *
1947 * This list is ordered alphabetically by vendor then device.
1948 * Specific entries must come before more generic entries.
1949 */
Geert Uytterhoevenc3ae3dc2020-12-11 14:39:07 +01001950static struct pci_serial_quirk pci_serial_quirks[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001951 /*
Krauth.Julien02c9b5c2008-02-04 22:27:49 -08001952 * ADDI-DATA GmbH communication cards <info@addi-data.com>
1953 */
1954 {
Ian Abbott086231f2013-07-16 16:14:39 +01001955 .vendor = PCI_VENDOR_ID_AMCC,
Ian Abbott57c1f0e2013-07-16 16:14:40 +01001956 .device = PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800,
Krauth.Julien02c9b5c2008-02-04 22:27:49 -08001957 .subvendor = PCI_ANY_ID,
1958 .subdevice = PCI_ANY_ID,
1959 .setup = addidata_apci7800_setup,
1960 },
1961 /*
Russell King61a116e2006-07-03 15:22:35 +01001962 * AFAVLAB cards - these may be called via parport_serial
Linus Torvalds1da177e2005-04-16 15:20:36 -07001963 * It is not clear whether this applies to all products.
1964 */
1965 {
1966 .vendor = PCI_VENDOR_ID_AFAVLAB,
1967 .device = PCI_ANY_ID,
1968 .subvendor = PCI_ANY_ID,
1969 .subdevice = PCI_ANY_ID,
1970 .setup = afavlab_setup,
1971 },
1972 /*
1973 * HP Diva
1974 */
1975 {
1976 .vendor = PCI_VENDOR_ID_HP,
1977 .device = PCI_DEVICE_ID_HP_DIVA,
1978 .subvendor = PCI_ANY_ID,
1979 .subdevice = PCI_ANY_ID,
1980 .init = pci_hp_diva_init,
1981 .setup = pci_hp_diva_setup,
1982 },
1983 /*
Randy Wrighte0e24202021-05-14 10:26:54 -06001984 * HPE PCI serial device
1985 */
1986 {
1987 .vendor = PCI_VENDOR_ID_HP_3PAR,
1988 .device = PCI_DEVICE_ID_HPE_PCI_SERIAL,
1989 .subvendor = PCI_ANY_ID,
1990 .subdevice = PCI_ANY_ID,
1991 .setup = pci_hp_diva_setup,
1992 },
1993 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07001994 * Intel
1995 */
1996 {
1997 .vendor = PCI_VENDOR_ID_INTEL,
1998 .device = PCI_DEVICE_ID_INTEL_80960_RP,
1999 .subvendor = 0xe4bf,
2000 .subdevice = PCI_ANY_ID,
2001 .init = pci_inteli960ni_init,
2002 .setup = pci_default_setup,
2003 },
Mauro Carvalho Chehabb6adea32009-02-20 15:38:52 -08002004 {
2005 .vendor = PCI_VENDOR_ID_INTEL,
2006 .device = PCI_DEVICE_ID_INTEL_8257X_SOL,
2007 .subvendor = PCI_ANY_ID,
2008 .subdevice = PCI_ANY_ID,
2009 .setup = skip_tx_en_setup,
2010 },
2011 {
2012 .vendor = PCI_VENDOR_ID_INTEL,
2013 .device = PCI_DEVICE_ID_INTEL_82573L_SOL,
2014 .subvendor = PCI_ANY_ID,
2015 .subdevice = PCI_ANY_ID,
2016 .setup = skip_tx_en_setup,
2017 },
2018 {
2019 .vendor = PCI_VENDOR_ID_INTEL,
2020 .device = PCI_DEVICE_ID_INTEL_82573E_SOL,
2021 .subvendor = PCI_ANY_ID,
2022 .subdevice = PCI_ANY_ID,
2023 .setup = skip_tx_en_setup,
2024 },
Dirk Brandewie095e24b2010-11-17 07:35:20 -08002025 {
2026 .vendor = PCI_VENDOR_ID_INTEL,
2027 .device = PCI_DEVICE_ID_INTEL_CE4100_UART,
2028 .subvendor = PCI_ANY_ID,
2029 .subdevice = PCI_ANY_ID,
2030 .setup = ce4100_serial_setup,
2031 },
Dan Williamsbc02d152012-04-06 11:49:50 -07002032 {
2033 .vendor = PCI_VENDOR_ID_INTEL,
2034 .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT,
2035 .subvendor = PCI_ANY_ID,
2036 .subdevice = PCI_ANY_ID,
2037 .setup = kt_serial_setup,
2038 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002039 /*
Niels de Vos84f8c6f2007-08-22 14:01:14 -07002040 * ITE
2041 */
2042 {
2043 .vendor = PCI_VENDOR_ID_ITE,
2044 .device = PCI_DEVICE_ID_ITE_8872,
2045 .subvendor = PCI_ANY_ID,
2046 .subdevice = PCI_ANY_ID,
2047 .init = pci_ite887x_init,
2048 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002049 .exit = pci_ite887x_exit,
Niels de Vos84f8c6f2007-08-22 14:01:14 -07002050 },
2051 /*
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01002052 * National Instruments
2053 */
2054 {
2055 .vendor = PCI_VENDOR_ID_NI,
Will Page04bf7e72009-04-06 17:32:15 +01002056 .device = PCI_DEVICE_ID_NI_PCI23216,
2057 .subvendor = PCI_ANY_ID,
2058 .subdevice = PCI_ANY_ID,
2059 .init = pci_ni8420_init,
2060 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002061 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002062 },
2063 {
2064 .vendor = PCI_VENDOR_ID_NI,
2065 .device = PCI_DEVICE_ID_NI_PCI2328,
2066 .subvendor = PCI_ANY_ID,
2067 .subdevice = PCI_ANY_ID,
2068 .init = pci_ni8420_init,
2069 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002070 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002071 },
2072 {
2073 .vendor = PCI_VENDOR_ID_NI,
2074 .device = PCI_DEVICE_ID_NI_PCI2324,
2075 .subvendor = PCI_ANY_ID,
2076 .subdevice = PCI_ANY_ID,
2077 .init = pci_ni8420_init,
2078 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002079 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002080 },
2081 {
2082 .vendor = PCI_VENDOR_ID_NI,
2083 .device = PCI_DEVICE_ID_NI_PCI2322,
2084 .subvendor = PCI_ANY_ID,
2085 .subdevice = PCI_ANY_ID,
2086 .init = pci_ni8420_init,
2087 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002088 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002089 },
2090 {
2091 .vendor = PCI_VENDOR_ID_NI,
2092 .device = PCI_DEVICE_ID_NI_PCI2324I,
2093 .subvendor = PCI_ANY_ID,
2094 .subdevice = PCI_ANY_ID,
2095 .init = pci_ni8420_init,
2096 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002097 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002098 },
2099 {
2100 .vendor = PCI_VENDOR_ID_NI,
2101 .device = PCI_DEVICE_ID_NI_PCI2322I,
2102 .subvendor = PCI_ANY_ID,
2103 .subdevice = PCI_ANY_ID,
2104 .init = pci_ni8420_init,
2105 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002106 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002107 },
2108 {
2109 .vendor = PCI_VENDOR_ID_NI,
2110 .device = PCI_DEVICE_ID_NI_PXI8420_23216,
2111 .subvendor = PCI_ANY_ID,
2112 .subdevice = PCI_ANY_ID,
2113 .init = pci_ni8420_init,
2114 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002115 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002116 },
2117 {
2118 .vendor = PCI_VENDOR_ID_NI,
2119 .device = PCI_DEVICE_ID_NI_PXI8420_2328,
2120 .subvendor = PCI_ANY_ID,
2121 .subdevice = PCI_ANY_ID,
2122 .init = pci_ni8420_init,
2123 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002124 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002125 },
2126 {
2127 .vendor = PCI_VENDOR_ID_NI,
2128 .device = PCI_DEVICE_ID_NI_PXI8420_2324,
2129 .subvendor = PCI_ANY_ID,
2130 .subdevice = PCI_ANY_ID,
2131 .init = pci_ni8420_init,
2132 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002133 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002134 },
2135 {
2136 .vendor = PCI_VENDOR_ID_NI,
2137 .device = PCI_DEVICE_ID_NI_PXI8420_2322,
2138 .subvendor = PCI_ANY_ID,
2139 .subdevice = PCI_ANY_ID,
2140 .init = pci_ni8420_init,
2141 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002142 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002143 },
2144 {
2145 .vendor = PCI_VENDOR_ID_NI,
2146 .device = PCI_DEVICE_ID_NI_PXI8422_2324,
2147 .subvendor = PCI_ANY_ID,
2148 .subdevice = PCI_ANY_ID,
2149 .init = pci_ni8420_init,
2150 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002151 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002152 },
2153 {
2154 .vendor = PCI_VENDOR_ID_NI,
2155 .device = PCI_DEVICE_ID_NI_PXI8422_2322,
2156 .subvendor = PCI_ANY_ID,
2157 .subdevice = PCI_ANY_ID,
2158 .init = pci_ni8420_init,
2159 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002160 .exit = pci_ni8420_exit,
Will Page04bf7e72009-04-06 17:32:15 +01002161 },
2162 {
2163 .vendor = PCI_VENDOR_ID_NI,
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01002164 .device = PCI_ANY_ID,
2165 .subvendor = PCI_ANY_ID,
2166 .subdevice = PCI_ANY_ID,
2167 .init = pci_ni8430_init,
2168 .setup = pci_ni8430_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002169 .exit = pci_ni8430_exit,
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01002170 },
Alan Cox55c7c0f2012-11-29 09:03:00 +10302171 /* Quatech */
2172 {
2173 .vendor = PCI_VENDOR_ID_QUATECH,
2174 .device = PCI_ANY_ID,
2175 .subvendor = PCI_ANY_ID,
2176 .subdevice = PCI_ANY_ID,
2177 .init = pci_quatech_init,
2178 .setup = pci_quatech_setup,
Greg Kroah-Hartmand73dfc62013-01-15 22:44:48 -08002179 .exit = pci_quatech_exit,
Alan Cox55c7c0f2012-11-29 09:03:00 +10302180 },
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01002181 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002182 * Panacom
2183 */
2184 {
2185 .vendor = PCI_VENDOR_ID_PANACOM,
2186 .device = PCI_DEVICE_ID_PANACOM_QUADMODEM,
2187 .subvendor = PCI_ANY_ID,
2188 .subdevice = PCI_ANY_ID,
2189 .init = pci_plx9050_init,
2190 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002191 .exit = pci_plx9050_exit,
Alan Cox5756ee92008-02-08 04:18:51 -08002192 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002193 {
2194 .vendor = PCI_VENDOR_ID_PANACOM,
2195 .device = PCI_DEVICE_ID_PANACOM_DUALMODEM,
2196 .subvendor = PCI_ANY_ID,
2197 .subdevice = PCI_ANY_ID,
2198 .init = pci_plx9050_init,
2199 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002200 .exit = pci_plx9050_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002201 },
2202 /*
Angelo Butti5c31ef92016-11-07 16:39:03 +01002203 * Pericom (Only 7954 - It have a offset jump for port 4)
2204 */
2205 {
2206 .vendor = PCI_VENDOR_ID_PERICOM,
2207 .device = PCI_DEVICE_ID_PERICOM_PI7C9X7954,
2208 .subvendor = PCI_ANY_ID,
2209 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002210 .setup = pci_pericom_setup_four_at_eight,
Angelo Butti5c31ef92016-11-07 16:39:03 +01002211 },
2212 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002213 * PLX
2214 */
2215 {
2216 .vendor = PCI_VENDOR_ID_PLX,
2217 .device = PCI_DEVICE_ID_PLX_9050,
Bjorn Helgaasadd7b582005-10-24 22:11:57 +01002218 .subvendor = PCI_SUBVENDOR_ID_EXSYS,
2219 .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055,
2220 .init = pci_plx9050_init,
2221 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002222 .exit = pci_plx9050_exit,
Bjorn Helgaasadd7b582005-10-24 22:11:57 +01002223 },
2224 {
2225 .vendor = PCI_VENDOR_ID_PLX,
2226 .device = PCI_DEVICE_ID_PLX_9050,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002227 .subvendor = PCI_SUBVENDOR_ID_KEYSPAN,
2228 .subdevice = PCI_SUBDEVICE_ID_KEYSPAN_SX2,
2229 .init = pci_plx9050_init,
2230 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002231 .exit = pci_plx9050_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002232 },
2233 {
2234 .vendor = PCI_VENDOR_ID_PLX,
2235 .device = PCI_DEVICE_ID_PLX_ROMULUS,
2236 .subvendor = PCI_VENDOR_ID_PLX,
2237 .subdevice = PCI_DEVICE_ID_PLX_ROMULUS,
2238 .init = pci_plx9050_init,
2239 .setup = pci_default_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002240 .exit = pci_plx9050_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002241 },
Jay Dolan78d38202019-02-12 21:43:12 -08002242 {
2243 .vendor = PCI_VENDOR_ID_ACCESIO,
2244 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB,
2245 .subvendor = PCI_ANY_ID,
2246 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002247 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002248 },
2249 {
2250 .vendor = PCI_VENDOR_ID_ACCESIO,
2251 .device = PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4S,
2252 .subvendor = PCI_ANY_ID,
2253 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002254 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002255 },
2256 {
2257 .vendor = PCI_VENDOR_ID_ACCESIO,
2258 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB,
2259 .subvendor = PCI_ANY_ID,
2260 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002261 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002262 },
2263 {
2264 .vendor = PCI_VENDOR_ID_ACCESIO,
2265 .device = PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_4,
2266 .subvendor = PCI_ANY_ID,
2267 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002268 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002269 },
2270 {
2271 .vendor = PCI_VENDOR_ID_ACCESIO,
2272 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB,
2273 .subvendor = PCI_ANY_ID,
2274 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002275 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002276 },
2277 {
2278 .vendor = PCI_VENDOR_ID_ACCESIO,
2279 .device = PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4SM,
2280 .subvendor = PCI_ANY_ID,
2281 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002282 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002283 },
2284 {
2285 .vendor = PCI_VENDOR_ID_ACCESIO,
2286 .device = PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4,
2287 .subvendor = PCI_ANY_ID,
2288 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002289 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002290 },
2291 {
2292 .vendor = PCI_VENDOR_ID_ACCESIO,
2293 .device = PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_4,
2294 .subvendor = PCI_ANY_ID,
2295 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002296 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002297 },
2298 {
2299 .vendor = PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4S,
2300 .device = PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4,
2301 .subvendor = PCI_ANY_ID,
2302 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002303 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002304 },
2305 {
2306 .vendor = PCI_VENDOR_ID_ACCESIO,
2307 .device = PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_4,
2308 .subvendor = PCI_ANY_ID,
2309 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002310 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002311 },
2312 {
2313 .vendor = PCI_VENDOR_ID_ACCESIO,
2314 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM422_4,
2315 .subvendor = PCI_ANY_ID,
2316 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002317 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002318 },
2319 {
2320 .vendor = PCI_VENDOR_ID_ACCESIO,
2321 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM485_4,
2322 .subvendor = PCI_ANY_ID,
2323 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002324 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002325 },
2326 {
2327 .vendor = PCI_VENDOR_ID_ACCESIO,
2328 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4,
2329 .subvendor = PCI_ANY_ID,
2330 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002331 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002332 },
2333 {
2334 .vendor = PCI_VENDOR_ID_ACCESIO,
2335 .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SM,
2336 .subvendor = PCI_ANY_ID,
2337 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002338 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002339 },
2340 {
2341 .vendor = PCI_VENDOR_ID_ACCESIO,
2342 .device = PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM,
2343 .subvendor = PCI_ANY_ID,
2344 .subdevice = PCI_ANY_ID,
Jay Dolan6bf4e422019-06-11 04:47:15 -07002345 .setup = pci_pericom_setup_four_at_eight,
Jay Dolan78d38202019-02-12 21:43:12 -08002346 },
Jay Dolan6bf4e422019-06-11 04:47:15 -07002347 {
2348 .vendor = PCI_VENDOR_ID_ACCESIO,
2349 .device = PCI_ANY_ID,
2350 .subvendor = PCI_ANY_ID,
2351 .subdevice = PCI_ANY_ID,
2352 .setup = pci_pericom_setup,
2353 }, /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002354 * SBS Technologies, Inc., PMC-OCTALPRO 232
2355 */
2356 {
2357 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2358 .device = PCI_DEVICE_ID_OCTPRO,
2359 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2360 .subdevice = PCI_SUBDEVICE_ID_OCTPRO232,
2361 .init = sbs_init,
2362 .setup = sbs_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002363 .exit = sbs_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002364 },
2365 /*
2366 * SBS Technologies, Inc., PMC-OCTALPRO 422
2367 */
2368 {
2369 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2370 .device = PCI_DEVICE_ID_OCTPRO,
2371 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2372 .subdevice = PCI_SUBDEVICE_ID_OCTPRO422,
2373 .init = sbs_init,
2374 .setup = sbs_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002375 .exit = sbs_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002376 },
2377 /*
2378 * SBS Technologies, Inc., P-Octal 232
2379 */
2380 {
2381 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2382 .device = PCI_DEVICE_ID_OCTPRO,
2383 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2384 .subdevice = PCI_SUBDEVICE_ID_POCTAL232,
2385 .init = sbs_init,
2386 .setup = sbs_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002387 .exit = sbs_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002388 },
2389 /*
2390 * SBS Technologies, Inc., P-Octal 422
2391 */
2392 {
2393 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2394 .device = PCI_DEVICE_ID_OCTPRO,
2395 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2396 .subdevice = PCI_SUBDEVICE_ID_POCTAL422,
2397 .init = sbs_init,
2398 .setup = sbs_setup,
Bill Pemberton2d47b712012-11-19 13:21:34 -05002399 .exit = sbs_exit,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002400 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002401 /*
Russell King61a116e2006-07-03 15:22:35 +01002402 * SIIG cards - these may be called via parport_serial
Linus Torvalds1da177e2005-04-16 15:20:36 -07002403 */
2404 {
2405 .vendor = PCI_VENDOR_ID_SIIG,
Russell King67d74b82005-07-27 11:33:03 +01002406 .device = PCI_ANY_ID,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002407 .subvendor = PCI_ANY_ID,
2408 .subdevice = PCI_ANY_ID,
Russell King67d74b82005-07-27 11:33:03 +01002409 .init = pci_siig_init,
Andrey Panin3ec9c592006-02-02 20:15:09 +00002410 .setup = pci_siig_setup,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002411 },
2412 /*
2413 * Titan cards
2414 */
2415 {
2416 .vendor = PCI_VENDOR_ID_TITAN,
2417 .device = PCI_DEVICE_ID_TITAN_400L,
2418 .subvendor = PCI_ANY_ID,
2419 .subdevice = PCI_ANY_ID,
2420 .setup = titan_400l_800l_setup,
2421 },
2422 {
2423 .vendor = PCI_VENDOR_ID_TITAN,
2424 .device = PCI_DEVICE_ID_TITAN_800L,
2425 .subvendor = PCI_ANY_ID,
2426 .subdevice = PCI_ANY_ID,
2427 .setup = titan_400l_800l_setup,
2428 },
2429 /*
2430 * Timedia cards
2431 */
2432 {
2433 .vendor = PCI_VENDOR_ID_TIMEDIA,
2434 .device = PCI_DEVICE_ID_TIMEDIA_1889,
2435 .subvendor = PCI_VENDOR_ID_TIMEDIA,
2436 .subdevice = PCI_ANY_ID,
Frédéric Brièreb9b24552011-05-29 15:08:04 -04002437 .probe = pci_timedia_probe,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002438 .init = pci_timedia_init,
2439 .setup = pci_timedia_setup,
2440 },
2441 {
2442 .vendor = PCI_VENDOR_ID_TIMEDIA,
2443 .device = PCI_ANY_ID,
2444 .subvendor = PCI_ANY_ID,
2445 .subdevice = PCI_ANY_ID,
2446 .setup = pci_timedia_setup,
2447 },
2448 /*
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08002449 * Sunix PCI serial boards
Stephen Chiversabd7bac2013-01-28 19:49:20 +11002450 */
2451 {
2452 .vendor = PCI_VENDOR_ID_SUNIX,
2453 .device = PCI_DEVICE_ID_SUNIX_1999,
2454 .subvendor = PCI_VENDOR_ID_SUNIX,
2455 .subdevice = PCI_ANY_ID,
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08002456 .setup = pci_sunix_setup,
Stephen Chiversabd7bac2013-01-28 19:49:20 +11002457 },
2458 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002459 * Xircom cards
2460 */
2461 {
2462 .vendor = PCI_VENDOR_ID_XIRCOM,
2463 .device = PCI_DEVICE_ID_XIRCOM_X3201_MDM,
2464 .subvendor = PCI_ANY_ID,
2465 .subdevice = PCI_ANY_ID,
2466 .init = pci_xircom_init,
2467 .setup = pci_default_setup,
2468 },
2469 /*
Russell King61a116e2006-07-03 15:22:35 +01002470 * Netmos cards - these may be called via parport_serial
Linus Torvalds1da177e2005-04-16 15:20:36 -07002471 */
2472 {
2473 .vendor = PCI_VENDOR_ID_NETMOS,
2474 .device = PCI_ANY_ID,
2475 .subvendor = PCI_ANY_ID,
2476 .subdevice = PCI_ANY_ID,
2477 .init = pci_netmos_init,
Nicos Gollan7808edc2011-05-05 21:00:37 +02002478 .setup = pci_netmos_9900_setup,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002479 },
2480 /*
Mike Skoog1bc8cde2014-10-16 13:10:01 -07002481 * EndRun Technologies
2482 */
2483 {
2484 .vendor = PCI_VENDOR_ID_ENDRUN,
2485 .device = PCI_ANY_ID,
2486 .subvendor = PCI_ANY_ID,
2487 .subdevice = PCI_ANY_ID,
2488 .init = pci_endrun_init,
2489 .setup = pci_default_setup,
2490 },
2491 /*
Scott Kilauaa273ae2011-05-11 15:41:59 -05002492 * For Oxford Semiconductor Tornado based devices
Russell King9f2a0362009-01-02 13:44:20 +00002493 */
2494 {
2495 .vendor = PCI_VENDOR_ID_OXSEMI,
2496 .device = PCI_ANY_ID,
2497 .subvendor = PCI_ANY_ID,
2498 .subdevice = PCI_ANY_ID,
2499 .init = pci_oxsemi_tornado_init,
2500 .setup = pci_default_setup,
2501 },
2502 {
2503 .vendor = PCI_VENDOR_ID_MAINPINE,
2504 .device = PCI_ANY_ID,
2505 .subvendor = PCI_ANY_ID,
2506 .subdevice = PCI_ANY_ID,
2507 .init = pci_oxsemi_tornado_init,
2508 .setup = pci_default_setup,
2509 },
Scott Kilauaa273ae2011-05-11 15:41:59 -05002510 {
2511 .vendor = PCI_VENDOR_ID_DIGI,
2512 .device = PCIE_DEVICE_ID_NEO_2_OX_IBM,
2513 .subvendor = PCI_SUBVENDOR_ID_IBM,
2514 .subdevice = PCI_ANY_ID,
2515 .init = pci_oxsemi_tornado_init,
2516 .setup = pci_default_setup,
2517 },
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002518 {
2519 .vendor = PCI_VENDOR_ID_INTEL,
2520 .device = 0x8811,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002521 .subvendor = PCI_ANY_ID,
2522 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002523 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002524 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002525 },
2526 {
2527 .vendor = PCI_VENDOR_ID_INTEL,
2528 .device = 0x8812,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002529 .subvendor = PCI_ANY_ID,
2530 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002531 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002532 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002533 },
2534 {
2535 .vendor = PCI_VENDOR_ID_INTEL,
2536 .device = 0x8813,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002537 .subvendor = PCI_ANY_ID,
2538 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002539 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002540 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002541 },
2542 {
2543 .vendor = PCI_VENDOR_ID_INTEL,
2544 .device = 0x8814,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002545 .subvendor = PCI_ANY_ID,
2546 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002547 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002548 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002549 },
2550 {
2551 .vendor = 0x10DB,
2552 .device = 0x8027,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002553 .subvendor = PCI_ANY_ID,
2554 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002555 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002556 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002557 },
2558 {
2559 .vendor = 0x10DB,
2560 .device = 0x8028,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002561 .subvendor = PCI_ANY_ID,
2562 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002563 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002564 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002565 },
2566 {
2567 .vendor = 0x10DB,
2568 .device = 0x8029,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002569 .subvendor = PCI_ANY_ID,
2570 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002571 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002572 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002573 },
2574 {
2575 .vendor = 0x10DB,
2576 .device = 0x800C,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002577 .subvendor = PCI_ANY_ID,
2578 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002579 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002580 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002581 },
2582 {
2583 .vendor = 0x10DB,
2584 .device = 0x800D,
Arnaud Patardaaa10eb2012-04-25 12:17:24 +02002585 .subvendor = PCI_ANY_ID,
2586 .subdevice = PCI_ANY_ID,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002587 .init = pci_eg20t_init,
Tomoya MORINAGA64d91cf2011-10-07 13:39:49 +09002588 .setup = pci_default_setup,
Tomoya MORINAGAeb7073d2011-06-02 11:31:29 +09002589 },
Russell King9f2a0362009-01-02 13:44:20 +00002590 /*
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04002591 * Cronyx Omega PCI (PLX-chip based)
2592 */
2593 {
2594 .vendor = PCI_VENDOR_ID_PLX,
2595 .device = PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
2596 .subvendor = PCI_ANY_ID,
2597 .subdevice = PCI_ANY_ID,
2598 .setup = pci_omegapci_setup,
Alan Coxeb26dfe2012-07-12 13:00:31 +01002599 },
Ezequiel Garciafeb58142014-05-24 15:24:51 -03002600 /* WCH CH353 1S1P card (16550 clone) */
2601 {
2602 .vendor = PCI_VENDOR_ID_WCH,
2603 .device = PCI_DEVICE_ID_WCH_CH353_1S1P,
2604 .subvendor = PCI_ANY_ID,
2605 .subdevice = PCI_ANY_ID,
2606 .setup = pci_wch_ch353_setup,
2607 },
Guainluca Anzolin6971c632012-09-04 15:56:12 +01002608 /* WCH CH353 2S1P card (16550 clone) */
2609 {
Alan Cox27788c52012-09-04 16:21:06 +01002610 .vendor = PCI_VENDOR_ID_WCH,
2611 .device = PCI_DEVICE_ID_WCH_CH353_2S1P,
2612 .subvendor = PCI_ANY_ID,
2613 .subdevice = PCI_ANY_ID,
2614 .setup = pci_wch_ch353_setup,
2615 },
2616 /* WCH CH353 4S card (16550 clone) */
2617 {
2618 .vendor = PCI_VENDOR_ID_WCH,
2619 .device = PCI_DEVICE_ID_WCH_CH353_4S,
2620 .subvendor = PCI_ANY_ID,
2621 .subdevice = PCI_ANY_ID,
2622 .setup = pci_wch_ch353_setup,
2623 },
2624 /* WCH CH353 2S1PF card (16550 clone) */
2625 {
2626 .vendor = PCI_VENDOR_ID_WCH,
2627 .device = PCI_DEVICE_ID_WCH_CH353_2S1PF,
2628 .subvendor = PCI_ANY_ID,
2629 .subdevice = PCI_ANY_ID,
Guainluca Anzolin6971c632012-09-04 15:56:12 +01002630 .setup = pci_wch_ch353_setup,
2631 },
Wang YanQing8b5c9132013-03-05 23:16:48 +08002632 /* WCH CH352 2S card (16550 clone) */
2633 {
2634 .vendor = PCI_VENDOR_ID_WCH,
2635 .device = PCI_DEVICE_ID_WCH_CH352_2S,
2636 .subvendor = PCI_ANY_ID,
2637 .subdevice = PCI_ANY_ID,
2638 .setup = pci_wch_ch353_setup,
2639 },
Alexandr Petrenko55c368c2016-05-23 10:04:54 +03002640 /* WCH CH355 4S card (16550 clone) */
2641 {
2642 .vendor = PCI_VENDOR_ID_WCH,
2643 .device = PCI_DEVICE_ID_WCH_CH355_4S,
2644 .subvendor = PCI_ANY_ID,
2645 .subdevice = PCI_ANY_ID,
2646 .setup = pci_wch_ch355_setup,
2647 },
Jeremy McNicoll7dde5572016-02-02 13:00:45 -08002648 /* WCH CH382 2S card (16850 clone) */
2649 {
2650 .vendor = PCIE_VENDOR_ID_WCH,
2651 .device = PCIE_DEVICE_ID_WCH_CH382_2S,
2652 .subvendor = PCI_ANY_ID,
2653 .subdevice = PCI_ANY_ID,
2654 .setup = pci_wch_ch38x_setup,
2655 },
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03002656 /* WCH CH382 2S1P card (16850 clone) */
Sergej Pupykin2fdd8c82014-11-06 14:36:31 +03002657 {
2658 .vendor = PCIE_VENDOR_ID_WCH,
2659 .device = PCIE_DEVICE_ID_WCH_CH382_2S1P,
2660 .subvendor = PCI_ANY_ID,
2661 .subdevice = PCI_ANY_ID,
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03002662 .setup = pci_wch_ch38x_setup,
2663 },
2664 /* WCH CH384 4S card (16850 clone) */
2665 {
2666 .vendor = PCIE_VENDOR_ID_WCH,
2667 .device = PCIE_DEVICE_ID_WCH_CH384_4S,
2668 .subvendor = PCI_ANY_ID,
2669 .subdevice = PCI_ANY_ID,
2670 .setup = pci_wch_ch38x_setup,
Sergej Pupykin2fdd8c82014-11-06 14:36:31 +03002671 },
Du Huanpeng04b6ff52020-08-22 09:47:28 +08002672 /* WCH CH384 8S card (16850 clone) */
2673 {
2674 .vendor = PCIE_VENDOR_ID_WCH,
2675 .device = PCIE_DEVICE_ID_WCH_CH384_8S,
2676 .subvendor = PCI_ANY_ID,
2677 .subdevice = PCI_ANY_ID,
2678 .init = pci_wch_ch38x_init,
2679 .exit = pci_wch_ch38x_exit,
2680 .setup = pci_wch_ch38x_setup,
2681 },
Alan Coxeb26dfe2012-07-12 13:00:31 +01002682 /*
2683 * ASIX devices with FIFO bug
2684 */
2685 {
2686 .vendor = PCI_VENDOR_ID_ASIX,
2687 .device = PCI_ANY_ID,
2688 .subvendor = PCI_ANY_ID,
2689 .subdevice = PCI_ANY_ID,
2690 .setup = pci_asix_setup,
2691 },
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04002692 /*
Stephen Hurdebebd492013-01-17 14:14:53 -08002693 * Broadcom TruManage (NetXtreme)
2694 */
2695 {
2696 .vendor = PCI_VENDOR_ID_BROADCOM,
2697 .device = PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
2698 .subvendor = PCI_ANY_ID,
2699 .subdevice = PCI_ANY_ID,
2700 .setup = pci_brcm_trumanage_setup,
2701 },
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07002702 {
2703 .vendor = 0x1c29,
2704 .device = 0x1104,
2705 .subvendor = PCI_ANY_ID,
2706 .subdevice = PCI_ANY_ID,
2707 .setup = pci_fintek_setup,
Peter Hung6a8bc232015-04-01 14:00:21 +08002708 .init = pci_fintek_init,
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07002709 },
2710 {
2711 .vendor = 0x1c29,
2712 .device = 0x1108,
2713 .subvendor = PCI_ANY_ID,
2714 .subdevice = PCI_ANY_ID,
2715 .setup = pci_fintek_setup,
Peter Hung6a8bc232015-04-01 14:00:21 +08002716 .init = pci_fintek_init,
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07002717 },
2718 {
2719 .vendor = 0x1c29,
2720 .device = 0x1112,
2721 .subvendor = PCI_ANY_ID,
2722 .subdevice = PCI_ANY_ID,
2723 .setup = pci_fintek_setup,
Peter Hung6a8bc232015-04-01 14:00:21 +08002724 .init = pci_fintek_init,
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07002725 },
Kai-Heng Fengd193db72019-08-17 00:51:24 +08002726 /*
2727 * MOXA
2728 */
2729 {
2730 .vendor = PCI_VENDOR_ID_MOXA,
2731 .device = PCI_ANY_ID,
2732 .subvendor = PCI_ANY_ID,
2733 .subdevice = PCI_ANY_ID,
2734 .setup = pci_moxa_setup,
2735 },
Ji-Ze Hong (Peter Hong)68e26a82019-08-16 13:27:29 +08002736 {
2737 .vendor = 0x1c29,
2738 .device = 0x1204,
2739 .subvendor = PCI_ANY_ID,
2740 .subdevice = PCI_ANY_ID,
2741 .setup = pci_fintek_f815xxa_setup,
2742 .init = pci_fintek_f815xxa_init,
2743 },
2744 {
2745 .vendor = 0x1c29,
2746 .device = 0x1208,
2747 .subvendor = PCI_ANY_ID,
2748 .subdevice = PCI_ANY_ID,
2749 .setup = pci_fintek_f815xxa_setup,
2750 .init = pci_fintek_f815xxa_init,
2751 },
2752 {
2753 .vendor = 0x1c29,
2754 .device = 0x1212,
2755 .subvendor = PCI_ANY_ID,
2756 .subdevice = PCI_ANY_ID,
2757 .setup = pci_fintek_f815xxa_setup,
2758 .init = pci_fintek_f815xxa_init,
2759 },
Stephen Hurdebebd492013-01-17 14:14:53 -08002760
2761 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002762 * Default "match everything" terminator entry
2763 */
2764 {
2765 .vendor = PCI_ANY_ID,
2766 .device = PCI_ANY_ID,
2767 .subvendor = PCI_ANY_ID,
2768 .subdevice = PCI_ANY_ID,
2769 .setup = pci_default_setup,
2770 }
2771};
2772
2773static inline int quirk_id_matches(u32 quirk_id, u32 dev_id)
2774{
2775 return quirk_id == PCI_ANY_ID || quirk_id == dev_id;
2776}
2777
2778static struct pci_serial_quirk *find_quirk(struct pci_dev *dev)
2779{
2780 struct pci_serial_quirk *quirk;
2781
2782 for (quirk = pci_serial_quirks; ; quirk++)
2783 if (quirk_id_matches(quirk->vendor, dev->vendor) &&
2784 quirk_id_matches(quirk->device, dev->device) &&
2785 quirk_id_matches(quirk->subvendor, dev->subsystem_vendor) &&
2786 quirk_id_matches(quirk->subdevice, dev->subsystem_device))
Alan Cox5756ee92008-02-08 04:18:51 -08002787 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002788 return quirk;
2789}
2790
Linus Torvalds1da177e2005-04-16 15:20:36 -07002791/*
2792 * This is the configuration table for all of the PCI serial boards
2793 * which we support. It is directly indexed by the pci_board_num_t enum
2794 * value, which is encoded in the pci_device_id PCI probe table's
2795 * driver_data member.
2796 *
2797 * The makeup of these names are:
Gareth Howlett26e92862006-01-04 17:00:42 +00002798 * pbn_bn{_bt}_n_baud{_offsetinhex}
Linus Torvalds1da177e2005-04-16 15:20:36 -07002799 *
Gareth Howlett26e92862006-01-04 17:00:42 +00002800 * bn = PCI BAR number
2801 * bt = Index using PCI BARs
2802 * n = number of serial ports
2803 * baud = baud rate
2804 * offsetinhex = offset for each sequential port (in hex)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002805 *
Gareth Howlett26e92862006-01-04 17:00:42 +00002806 * This table is sorted by (in order): bn, bt, baud, offsetindex, n.
Russell Kingf1690f32005-05-06 10:19:09 +01002807 *
Linus Torvalds1da177e2005-04-16 15:20:36 -07002808 * Please note: in theory if n = 1, _bt infix should make no difference.
2809 * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
2810 */
2811enum pci_board_num_t {
2812 pbn_default = 0,
2813
2814 pbn_b0_1_115200,
2815 pbn_b0_2_115200,
2816 pbn_b0_4_115200,
2817 pbn_b0_5_115200,
Alan Coxbf0df632007-10-16 01:24:00 -07002818 pbn_b0_8_115200,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002819
2820 pbn_b0_1_921600,
2821 pbn_b0_2_921600,
2822 pbn_b0_4_921600,
2823
David Ransondb1de152005-07-27 11:43:55 -07002824 pbn_b0_2_1130000,
2825
Andrey Paninfbc0dc02005-07-18 11:38:09 +01002826 pbn_b0_4_1152000,
2827
Ian Abbott1c9c8582017-02-03 20:25:00 +00002828 pbn_b0_4_1250000,
2829
Gareth Howlett26e92862006-01-04 17:00:42 +00002830 pbn_b0_2_1843200,
2831 pbn_b0_4_1843200,
2832
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02002833 pbn_b0_1_3906250,
Lee Howard7106b4e2008-10-21 13:48:58 +01002834
Linus Torvalds1da177e2005-04-16 15:20:36 -07002835 pbn_b0_bt_1_115200,
2836 pbn_b0_bt_2_115200,
Ira W. Snyderac6ec5b2009-12-21 16:26:45 -08002837 pbn_b0_bt_4_115200,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002838 pbn_b0_bt_8_115200,
2839
2840 pbn_b0_bt_1_460800,
2841 pbn_b0_bt_2_460800,
2842 pbn_b0_bt_4_460800,
2843
2844 pbn_b0_bt_1_921600,
2845 pbn_b0_bt_2_921600,
2846 pbn_b0_bt_4_921600,
2847 pbn_b0_bt_8_921600,
2848
2849 pbn_b1_1_115200,
2850 pbn_b1_2_115200,
2851 pbn_b1_4_115200,
2852 pbn_b1_8_115200,
Will Page04bf7e72009-04-06 17:32:15 +01002853 pbn_b1_16_115200,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002854
2855 pbn_b1_1_921600,
2856 pbn_b1_2_921600,
2857 pbn_b1_4_921600,
2858 pbn_b1_8_921600,
2859
Gareth Howlett26e92862006-01-04 17:00:42 +00002860 pbn_b1_2_1250000,
2861
Niels de Vos84f8c6f2007-08-22 14:01:14 -07002862 pbn_b1_bt_1_115200,
Will Page04bf7e72009-04-06 17:32:15 +01002863 pbn_b1_bt_2_115200,
2864 pbn_b1_bt_4_115200,
2865
Linus Torvalds1da177e2005-04-16 15:20:36 -07002866 pbn_b1_bt_2_921600,
2867
2868 pbn_b1_1_1382400,
2869 pbn_b1_2_1382400,
2870 pbn_b1_4_1382400,
2871 pbn_b1_8_1382400,
2872
2873 pbn_b2_1_115200,
Peter Horton737c1752006-08-26 09:07:36 +01002874 pbn_b2_2_115200,
Matthias Fuchsa9cccd32007-02-10 01:46:05 -08002875 pbn_b2_4_115200,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002876 pbn_b2_8_115200,
2877
2878 pbn_b2_1_460800,
2879 pbn_b2_4_460800,
2880 pbn_b2_8_460800,
2881 pbn_b2_16_460800,
2882
2883 pbn_b2_1_921600,
2884 pbn_b2_4_921600,
2885 pbn_b2_8_921600,
2886
Lytochkin Borise8470032010-07-26 10:02:26 +04002887 pbn_b2_8_1152000,
2888
Linus Torvalds1da177e2005-04-16 15:20:36 -07002889 pbn_b2_bt_1_115200,
2890 pbn_b2_bt_2_115200,
2891 pbn_b2_bt_4_115200,
2892
2893 pbn_b2_bt_2_921600,
2894 pbn_b2_bt_4_921600,
2895
Alon Bar-Levd9004eb2006-01-18 11:47:33 +00002896 pbn_b3_2_115200,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002897 pbn_b3_4_115200,
2898 pbn_b3_8_115200,
2899
Yegor Yefremov66169ad2010-06-04 09:58:18 +02002900 pbn_b4_bt_2_921600,
2901 pbn_b4_bt_4_921600,
2902 pbn_b4_bt_8_921600,
2903
Linus Torvalds1da177e2005-04-16 15:20:36 -07002904 /*
2905 * Board-specific versions.
2906 */
2907 pbn_panacom,
2908 pbn_panacom2,
2909 pbn_panacom4,
2910 pbn_plx_romulus,
Mike Skoog1bc8cde2014-10-16 13:10:01 -07002911 pbn_endrun_2_4000000,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002912 pbn_oxsemi,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02002913 pbn_oxsemi_1_3906250,
2914 pbn_oxsemi_2_3906250,
2915 pbn_oxsemi_4_3906250,
2916 pbn_oxsemi_8_3906250,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002917 pbn_intel_i960,
2918 pbn_sgi_ioc3,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002919 pbn_computone_4,
2920 pbn_computone_6,
2921 pbn_computone_8,
2922 pbn_sbsxrsio,
Olof Johanssonaa798502007-08-22 14:01:55 -07002923 pbn_pasemi_1682M,
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01002924 pbn_ni8430_2,
2925 pbn_ni8430_4,
2926 pbn_ni8430_8,
2927 pbn_ni8430_16,
Krauth.Julien1b62cbf2009-10-26 16:50:04 -07002928 pbn_ADDIDATA_PCIe_1_3906250,
2929 pbn_ADDIDATA_PCIe_2_3906250,
2930 pbn_ADDIDATA_PCIe_4_3906250,
2931 pbn_ADDIDATA_PCIe_8_3906250,
Dirk Brandewie095e24b2010-11-17 07:35:20 -08002932 pbn_ce4100_1_115200,
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04002933 pbn_omegapci,
Nicos Gollan7808edc2011-05-05 21:00:37 +02002934 pbn_NETMOS9900_2s_115200,
Stephen Hurdebebd492013-01-17 14:14:53 -08002935 pbn_brcm_trumanage,
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07002936 pbn_fintek_4,
2937 pbn_fintek_8,
2938 pbn_fintek_12,
Ji-Ze Hong (Peter Hong)68e26a82019-08-16 13:27:29 +08002939 pbn_fintek_F81504A,
2940 pbn_fintek_F81508A,
2941 pbn_fintek_F81512A,
Jeremy McNicoll7dde5572016-02-02 13:00:45 -08002942 pbn_wch382_2,
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03002943 pbn_wch384_4,
Du Huanpeng04b6ff52020-08-22 09:47:28 +08002944 pbn_wch384_8,
Adam Lee89c043a2015-08-03 13:28:13 +08002945 pbn_pericom_PI7C9X7951,
2946 pbn_pericom_PI7C9X7952,
2947 pbn_pericom_PI7C9X7954,
2948 pbn_pericom_PI7C9X7958,
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08002949 pbn_sunix_pci_1s,
2950 pbn_sunix_pci_2s,
2951 pbn_sunix_pci_4s,
2952 pbn_sunix_pci_8s,
2953 pbn_sunix_pci_16s,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02002954 pbn_titan_1_4000000,
2955 pbn_titan_2_4000000,
2956 pbn_titan_4_4000000,
2957 pbn_titan_8_4000000,
Kai-Heng Fengd193db72019-08-17 00:51:24 +08002958 pbn_moxa8250_2p,
2959 pbn_moxa8250_4p,
2960 pbn_moxa8250_8p,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002961};
2962
2963/*
2964 * uart_offset - the space between channels
2965 * reg_shift - describes how the UART registers are mapped
2966 * to PCI memory by the card.
2967 * For example IER register on SBS, Inc. PMC-OctPro is located at
2968 * offset 0x10 from the UART base, while UART_IER is defined as 1
2969 * in include/linux/serial_reg.h,
2970 * see first lines of serial_in() and serial_out() in 8250.c
2971*/
2972
Bill Pembertonde88b342012-11-19 13:24:32 -05002973static struct pciserial_board pci_boards[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002974 [pbn_default] = {
2975 .flags = FL_BASE0,
2976 .num_ports = 1,
2977 .base_baud = 115200,
2978 .uart_offset = 8,
2979 },
2980 [pbn_b0_1_115200] = {
2981 .flags = FL_BASE0,
2982 .num_ports = 1,
2983 .base_baud = 115200,
2984 .uart_offset = 8,
2985 },
2986 [pbn_b0_2_115200] = {
2987 .flags = FL_BASE0,
2988 .num_ports = 2,
2989 .base_baud = 115200,
2990 .uart_offset = 8,
2991 },
2992 [pbn_b0_4_115200] = {
2993 .flags = FL_BASE0,
2994 .num_ports = 4,
2995 .base_baud = 115200,
2996 .uart_offset = 8,
2997 },
2998 [pbn_b0_5_115200] = {
2999 .flags = FL_BASE0,
3000 .num_ports = 5,
3001 .base_baud = 115200,
3002 .uart_offset = 8,
3003 },
Alan Coxbf0df632007-10-16 01:24:00 -07003004 [pbn_b0_8_115200] = {
3005 .flags = FL_BASE0,
3006 .num_ports = 8,
3007 .base_baud = 115200,
3008 .uart_offset = 8,
3009 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003010 [pbn_b0_1_921600] = {
3011 .flags = FL_BASE0,
3012 .num_ports = 1,
3013 .base_baud = 921600,
3014 .uart_offset = 8,
3015 },
3016 [pbn_b0_2_921600] = {
3017 .flags = FL_BASE0,
3018 .num_ports = 2,
3019 .base_baud = 921600,
3020 .uart_offset = 8,
3021 },
3022 [pbn_b0_4_921600] = {
3023 .flags = FL_BASE0,
3024 .num_ports = 4,
3025 .base_baud = 921600,
3026 .uart_offset = 8,
3027 },
David Ransondb1de152005-07-27 11:43:55 -07003028
3029 [pbn_b0_2_1130000] = {
3030 .flags = FL_BASE0,
3031 .num_ports = 2,
3032 .base_baud = 1130000,
3033 .uart_offset = 8,
3034 },
3035
Andrey Paninfbc0dc02005-07-18 11:38:09 +01003036 [pbn_b0_4_1152000] = {
3037 .flags = FL_BASE0,
3038 .num_ports = 4,
3039 .base_baud = 1152000,
3040 .uart_offset = 8,
3041 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003042
Ian Abbott1c9c8582017-02-03 20:25:00 +00003043 [pbn_b0_4_1250000] = {
3044 .flags = FL_BASE0,
3045 .num_ports = 4,
3046 .base_baud = 1250000,
3047 .uart_offset = 8,
3048 },
3049
Gareth Howlett26e92862006-01-04 17:00:42 +00003050 [pbn_b0_2_1843200] = {
3051 .flags = FL_BASE0,
3052 .num_ports = 2,
3053 .base_baud = 1843200,
3054 .uart_offset = 8,
3055 },
3056 [pbn_b0_4_1843200] = {
3057 .flags = FL_BASE0,
3058 .num_ports = 4,
3059 .base_baud = 1843200,
3060 .uart_offset = 8,
3061 },
3062
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003063 [pbn_b0_1_3906250] = {
Lee Howard7106b4e2008-10-21 13:48:58 +01003064 .flags = FL_BASE0,
3065 .num_ports = 1,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003066 .base_baud = 3906250,
Lee Howard7106b4e2008-10-21 13:48:58 +01003067 .uart_offset = 8,
3068 },
Gareth Howlett26e92862006-01-04 17:00:42 +00003069
Linus Torvalds1da177e2005-04-16 15:20:36 -07003070 [pbn_b0_bt_1_115200] = {
3071 .flags = FL_BASE0|FL_BASE_BARS,
3072 .num_ports = 1,
3073 .base_baud = 115200,
3074 .uart_offset = 8,
3075 },
3076 [pbn_b0_bt_2_115200] = {
3077 .flags = FL_BASE0|FL_BASE_BARS,
3078 .num_ports = 2,
3079 .base_baud = 115200,
3080 .uart_offset = 8,
3081 },
Ira W. Snyderac6ec5b2009-12-21 16:26:45 -08003082 [pbn_b0_bt_4_115200] = {
3083 .flags = FL_BASE0|FL_BASE_BARS,
3084 .num_ports = 4,
3085 .base_baud = 115200,
3086 .uart_offset = 8,
3087 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003088 [pbn_b0_bt_8_115200] = {
3089 .flags = FL_BASE0|FL_BASE_BARS,
3090 .num_ports = 8,
3091 .base_baud = 115200,
3092 .uart_offset = 8,
3093 },
3094
3095 [pbn_b0_bt_1_460800] = {
3096 .flags = FL_BASE0|FL_BASE_BARS,
3097 .num_ports = 1,
3098 .base_baud = 460800,
3099 .uart_offset = 8,
3100 },
3101 [pbn_b0_bt_2_460800] = {
3102 .flags = FL_BASE0|FL_BASE_BARS,
3103 .num_ports = 2,
3104 .base_baud = 460800,
3105 .uart_offset = 8,
3106 },
3107 [pbn_b0_bt_4_460800] = {
3108 .flags = FL_BASE0|FL_BASE_BARS,
3109 .num_ports = 4,
3110 .base_baud = 460800,
3111 .uart_offset = 8,
3112 },
3113
3114 [pbn_b0_bt_1_921600] = {
3115 .flags = FL_BASE0|FL_BASE_BARS,
3116 .num_ports = 1,
3117 .base_baud = 921600,
3118 .uart_offset = 8,
3119 },
3120 [pbn_b0_bt_2_921600] = {
3121 .flags = FL_BASE0|FL_BASE_BARS,
3122 .num_ports = 2,
3123 .base_baud = 921600,
3124 .uart_offset = 8,
3125 },
3126 [pbn_b0_bt_4_921600] = {
3127 .flags = FL_BASE0|FL_BASE_BARS,
3128 .num_ports = 4,
3129 .base_baud = 921600,
3130 .uart_offset = 8,
3131 },
3132 [pbn_b0_bt_8_921600] = {
3133 .flags = FL_BASE0|FL_BASE_BARS,
3134 .num_ports = 8,
3135 .base_baud = 921600,
3136 .uart_offset = 8,
3137 },
3138
3139 [pbn_b1_1_115200] = {
3140 .flags = FL_BASE1,
3141 .num_ports = 1,
3142 .base_baud = 115200,
3143 .uart_offset = 8,
3144 },
3145 [pbn_b1_2_115200] = {
3146 .flags = FL_BASE1,
3147 .num_ports = 2,
3148 .base_baud = 115200,
3149 .uart_offset = 8,
3150 },
3151 [pbn_b1_4_115200] = {
3152 .flags = FL_BASE1,
3153 .num_ports = 4,
3154 .base_baud = 115200,
3155 .uart_offset = 8,
3156 },
3157 [pbn_b1_8_115200] = {
3158 .flags = FL_BASE1,
3159 .num_ports = 8,
3160 .base_baud = 115200,
3161 .uart_offset = 8,
3162 },
Will Page04bf7e72009-04-06 17:32:15 +01003163 [pbn_b1_16_115200] = {
3164 .flags = FL_BASE1,
3165 .num_ports = 16,
3166 .base_baud = 115200,
3167 .uart_offset = 8,
3168 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003169
3170 [pbn_b1_1_921600] = {
3171 .flags = FL_BASE1,
3172 .num_ports = 1,
3173 .base_baud = 921600,
3174 .uart_offset = 8,
3175 },
3176 [pbn_b1_2_921600] = {
3177 .flags = FL_BASE1,
3178 .num_ports = 2,
3179 .base_baud = 921600,
3180 .uart_offset = 8,
3181 },
3182 [pbn_b1_4_921600] = {
3183 .flags = FL_BASE1,
3184 .num_ports = 4,
3185 .base_baud = 921600,
3186 .uart_offset = 8,
3187 },
3188 [pbn_b1_8_921600] = {
3189 .flags = FL_BASE1,
3190 .num_ports = 8,
3191 .base_baud = 921600,
3192 .uart_offset = 8,
3193 },
Gareth Howlett26e92862006-01-04 17:00:42 +00003194 [pbn_b1_2_1250000] = {
3195 .flags = FL_BASE1,
3196 .num_ports = 2,
3197 .base_baud = 1250000,
3198 .uart_offset = 8,
3199 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003200
Niels de Vos84f8c6f2007-08-22 14:01:14 -07003201 [pbn_b1_bt_1_115200] = {
3202 .flags = FL_BASE1|FL_BASE_BARS,
3203 .num_ports = 1,
3204 .base_baud = 115200,
3205 .uart_offset = 8,
3206 },
Will Page04bf7e72009-04-06 17:32:15 +01003207 [pbn_b1_bt_2_115200] = {
3208 .flags = FL_BASE1|FL_BASE_BARS,
3209 .num_ports = 2,
3210 .base_baud = 115200,
3211 .uart_offset = 8,
3212 },
3213 [pbn_b1_bt_4_115200] = {
3214 .flags = FL_BASE1|FL_BASE_BARS,
3215 .num_ports = 4,
3216 .base_baud = 115200,
3217 .uart_offset = 8,
3218 },
Niels de Vos84f8c6f2007-08-22 14:01:14 -07003219
Linus Torvalds1da177e2005-04-16 15:20:36 -07003220 [pbn_b1_bt_2_921600] = {
3221 .flags = FL_BASE1|FL_BASE_BARS,
3222 .num_ports = 2,
3223 .base_baud = 921600,
3224 .uart_offset = 8,
3225 },
3226
3227 [pbn_b1_1_1382400] = {
3228 .flags = FL_BASE1,
3229 .num_ports = 1,
3230 .base_baud = 1382400,
3231 .uart_offset = 8,
3232 },
3233 [pbn_b1_2_1382400] = {
3234 .flags = FL_BASE1,
3235 .num_ports = 2,
3236 .base_baud = 1382400,
3237 .uart_offset = 8,
3238 },
3239 [pbn_b1_4_1382400] = {
3240 .flags = FL_BASE1,
3241 .num_ports = 4,
3242 .base_baud = 1382400,
3243 .uart_offset = 8,
3244 },
3245 [pbn_b1_8_1382400] = {
3246 .flags = FL_BASE1,
3247 .num_ports = 8,
3248 .base_baud = 1382400,
3249 .uart_offset = 8,
3250 },
3251
3252 [pbn_b2_1_115200] = {
3253 .flags = FL_BASE2,
3254 .num_ports = 1,
3255 .base_baud = 115200,
3256 .uart_offset = 8,
3257 },
Peter Horton737c1752006-08-26 09:07:36 +01003258 [pbn_b2_2_115200] = {
3259 .flags = FL_BASE2,
3260 .num_ports = 2,
3261 .base_baud = 115200,
3262 .uart_offset = 8,
3263 },
Matthias Fuchsa9cccd32007-02-10 01:46:05 -08003264 [pbn_b2_4_115200] = {
3265 .flags = FL_BASE2,
3266 .num_ports = 4,
3267 .base_baud = 115200,
3268 .uart_offset = 8,
3269 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003270 [pbn_b2_8_115200] = {
3271 .flags = FL_BASE2,
3272 .num_ports = 8,
3273 .base_baud = 115200,
3274 .uart_offset = 8,
3275 },
3276
3277 [pbn_b2_1_460800] = {
3278 .flags = FL_BASE2,
3279 .num_ports = 1,
3280 .base_baud = 460800,
3281 .uart_offset = 8,
3282 },
3283 [pbn_b2_4_460800] = {
3284 .flags = FL_BASE2,
3285 .num_ports = 4,
3286 .base_baud = 460800,
3287 .uart_offset = 8,
3288 },
3289 [pbn_b2_8_460800] = {
3290 .flags = FL_BASE2,
3291 .num_ports = 8,
3292 .base_baud = 460800,
3293 .uart_offset = 8,
3294 },
3295 [pbn_b2_16_460800] = {
3296 .flags = FL_BASE2,
3297 .num_ports = 16,
3298 .base_baud = 460800,
3299 .uart_offset = 8,
3300 },
3301
3302 [pbn_b2_1_921600] = {
3303 .flags = FL_BASE2,
3304 .num_ports = 1,
3305 .base_baud = 921600,
3306 .uart_offset = 8,
3307 },
3308 [pbn_b2_4_921600] = {
3309 .flags = FL_BASE2,
3310 .num_ports = 4,
3311 .base_baud = 921600,
3312 .uart_offset = 8,
3313 },
3314 [pbn_b2_8_921600] = {
3315 .flags = FL_BASE2,
3316 .num_ports = 8,
3317 .base_baud = 921600,
3318 .uart_offset = 8,
3319 },
3320
Lytochkin Borise8470032010-07-26 10:02:26 +04003321 [pbn_b2_8_1152000] = {
3322 .flags = FL_BASE2,
3323 .num_ports = 8,
3324 .base_baud = 1152000,
3325 .uart_offset = 8,
3326 },
3327
Linus Torvalds1da177e2005-04-16 15:20:36 -07003328 [pbn_b2_bt_1_115200] = {
3329 .flags = FL_BASE2|FL_BASE_BARS,
3330 .num_ports = 1,
3331 .base_baud = 115200,
3332 .uart_offset = 8,
3333 },
3334 [pbn_b2_bt_2_115200] = {
3335 .flags = FL_BASE2|FL_BASE_BARS,
3336 .num_ports = 2,
3337 .base_baud = 115200,
3338 .uart_offset = 8,
3339 },
3340 [pbn_b2_bt_4_115200] = {
3341 .flags = FL_BASE2|FL_BASE_BARS,
3342 .num_ports = 4,
3343 .base_baud = 115200,
3344 .uart_offset = 8,
3345 },
3346
3347 [pbn_b2_bt_2_921600] = {
3348 .flags = FL_BASE2|FL_BASE_BARS,
3349 .num_ports = 2,
3350 .base_baud = 921600,
3351 .uart_offset = 8,
3352 },
3353 [pbn_b2_bt_4_921600] = {
3354 .flags = FL_BASE2|FL_BASE_BARS,
3355 .num_ports = 4,
3356 .base_baud = 921600,
3357 .uart_offset = 8,
3358 },
3359
Alon Bar-Levd9004eb2006-01-18 11:47:33 +00003360 [pbn_b3_2_115200] = {
3361 .flags = FL_BASE3,
3362 .num_ports = 2,
3363 .base_baud = 115200,
3364 .uart_offset = 8,
3365 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003366 [pbn_b3_4_115200] = {
3367 .flags = FL_BASE3,
3368 .num_ports = 4,
3369 .base_baud = 115200,
3370 .uart_offset = 8,
3371 },
3372 [pbn_b3_8_115200] = {
3373 .flags = FL_BASE3,
3374 .num_ports = 8,
3375 .base_baud = 115200,
3376 .uart_offset = 8,
3377 },
3378
Yegor Yefremov66169ad2010-06-04 09:58:18 +02003379 [pbn_b4_bt_2_921600] = {
3380 .flags = FL_BASE4,
3381 .num_ports = 2,
3382 .base_baud = 921600,
3383 .uart_offset = 8,
3384 },
3385 [pbn_b4_bt_4_921600] = {
3386 .flags = FL_BASE4,
3387 .num_ports = 4,
3388 .base_baud = 921600,
3389 .uart_offset = 8,
3390 },
3391 [pbn_b4_bt_8_921600] = {
3392 .flags = FL_BASE4,
3393 .num_ports = 8,
3394 .base_baud = 921600,
3395 .uart_offset = 8,
3396 },
3397
Linus Torvalds1da177e2005-04-16 15:20:36 -07003398 /*
3399 * Entries following this are board-specific.
3400 */
3401
3402 /*
3403 * Panacom - IOMEM
3404 */
3405 [pbn_panacom] = {
3406 .flags = FL_BASE2,
3407 .num_ports = 2,
3408 .base_baud = 921600,
3409 .uart_offset = 0x400,
3410 .reg_shift = 7,
3411 },
3412 [pbn_panacom2] = {
3413 .flags = FL_BASE2|FL_BASE_BARS,
3414 .num_ports = 2,
3415 .base_baud = 921600,
3416 .uart_offset = 0x400,
3417 .reg_shift = 7,
3418 },
3419 [pbn_panacom4] = {
3420 .flags = FL_BASE2|FL_BASE_BARS,
3421 .num_ports = 4,
3422 .base_baud = 921600,
3423 .uart_offset = 0x400,
3424 .reg_shift = 7,
3425 },
3426
3427 /* I think this entry is broken - the first_offset looks wrong --rmk */
3428 [pbn_plx_romulus] = {
3429 .flags = FL_BASE2,
3430 .num_ports = 4,
3431 .base_baud = 921600,
3432 .uart_offset = 8 << 2,
3433 .reg_shift = 2,
3434 .first_offset = 0x03,
3435 },
3436
3437 /*
Mike Skoog1bc8cde2014-10-16 13:10:01 -07003438 * EndRun Technologies
3439 * Uses the size of PCI Base region 0 to
3440 * signal now many ports are available
3441 * 2 port 952 Uart support
3442 */
3443 [pbn_endrun_2_4000000] = {
3444 .flags = FL_BASE0,
3445 .num_ports = 2,
3446 .base_baud = 4000000,
3447 .uart_offset = 0x200,
3448 .first_offset = 0x1000,
3449 },
3450
3451 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003452 * This board uses the size of PCI Base region 0 to
3453 * signal now many ports are available
3454 */
3455 [pbn_oxsemi] = {
3456 .flags = FL_BASE0|FL_REGION_SZ_CAP,
3457 .num_ports = 32,
3458 .base_baud = 115200,
3459 .uart_offset = 8,
3460 },
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003461 [pbn_oxsemi_1_3906250] = {
Lee Howard7106b4e2008-10-21 13:48:58 +01003462 .flags = FL_BASE0,
3463 .num_ports = 1,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003464 .base_baud = 3906250,
Lee Howard7106b4e2008-10-21 13:48:58 +01003465 .uart_offset = 0x200,
3466 .first_offset = 0x1000,
3467 },
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003468 [pbn_oxsemi_2_3906250] = {
Lee Howard7106b4e2008-10-21 13:48:58 +01003469 .flags = FL_BASE0,
3470 .num_ports = 2,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003471 .base_baud = 3906250,
Lee Howard7106b4e2008-10-21 13:48:58 +01003472 .uart_offset = 0x200,
3473 .first_offset = 0x1000,
3474 },
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003475 [pbn_oxsemi_4_3906250] = {
Lee Howard7106b4e2008-10-21 13:48:58 +01003476 .flags = FL_BASE0,
3477 .num_ports = 4,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003478 .base_baud = 3906250,
Lee Howard7106b4e2008-10-21 13:48:58 +01003479 .uart_offset = 0x200,
3480 .first_offset = 0x1000,
3481 },
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003482 [pbn_oxsemi_8_3906250] = {
Lee Howard7106b4e2008-10-21 13:48:58 +01003483 .flags = FL_BASE0,
3484 .num_ports = 8,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02003485 .base_baud = 3906250,
Lee Howard7106b4e2008-10-21 13:48:58 +01003486 .uart_offset = 0x200,
3487 .first_offset = 0x1000,
3488 },
3489
Linus Torvalds1da177e2005-04-16 15:20:36 -07003490
3491 /*
3492 * EKF addition for i960 Boards form EKF with serial port.
3493 * Max 256 ports.
3494 */
3495 [pbn_intel_i960] = {
3496 .flags = FL_BASE0,
3497 .num_ports = 32,
3498 .base_baud = 921600,
3499 .uart_offset = 8 << 2,
3500 .reg_shift = 2,
3501 .first_offset = 0x10000,
3502 },
3503 [pbn_sgi_ioc3] = {
3504 .flags = FL_BASE0|FL_NOIRQ,
3505 .num_ports = 1,
3506 .base_baud = 458333,
3507 .uart_offset = 8,
3508 .reg_shift = 0,
3509 .first_offset = 0x20178,
3510 },
3511
3512 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003513 * Computone - uses IOMEM.
3514 */
3515 [pbn_computone_4] = {
3516 .flags = FL_BASE0,
3517 .num_ports = 4,
3518 .base_baud = 921600,
3519 .uart_offset = 0x40,
3520 .reg_shift = 2,
3521 .first_offset = 0x200,
3522 },
3523 [pbn_computone_6] = {
3524 .flags = FL_BASE0,
3525 .num_ports = 6,
3526 .base_baud = 921600,
3527 .uart_offset = 0x40,
3528 .reg_shift = 2,
3529 .first_offset = 0x200,
3530 },
3531 [pbn_computone_8] = {
3532 .flags = FL_BASE0,
3533 .num_ports = 8,
3534 .base_baud = 921600,
3535 .uart_offset = 0x40,
3536 .reg_shift = 2,
3537 .first_offset = 0x200,
3538 },
3539 [pbn_sbsxrsio] = {
3540 .flags = FL_BASE0,
3541 .num_ports = 8,
3542 .base_baud = 460800,
3543 .uart_offset = 256,
3544 .reg_shift = 4,
3545 },
3546 /*
Olof Johanssonaa798502007-08-22 14:01:55 -07003547 * PA Semi PWRficient PA6T-1682M on-chip UART
3548 */
3549 [pbn_pasemi_1682M] = {
3550 .flags = FL_BASE0,
3551 .num_ports = 1,
3552 .base_baud = 8333333,
3553 },
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01003554 /*
3555 * National Instruments 843x
3556 */
3557 [pbn_ni8430_16] = {
3558 .flags = FL_BASE0,
3559 .num_ports = 16,
3560 .base_baud = 3686400,
3561 .uart_offset = 0x10,
3562 .first_offset = 0x800,
3563 },
3564 [pbn_ni8430_8] = {
3565 .flags = FL_BASE0,
3566 .num_ports = 8,
3567 .base_baud = 3686400,
3568 .uart_offset = 0x10,
3569 .first_offset = 0x800,
3570 },
3571 [pbn_ni8430_4] = {
3572 .flags = FL_BASE0,
3573 .num_ports = 4,
3574 .base_baud = 3686400,
3575 .uart_offset = 0x10,
3576 .first_offset = 0x800,
3577 },
3578 [pbn_ni8430_2] = {
3579 .flags = FL_BASE0,
3580 .num_ports = 2,
3581 .base_baud = 3686400,
3582 .uart_offset = 0x10,
3583 .first_offset = 0x800,
3584 },
Krauth.Julien1b62cbf2009-10-26 16:50:04 -07003585 /*
3586 * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com>
3587 */
3588 [pbn_ADDIDATA_PCIe_1_3906250] = {
3589 .flags = FL_BASE0,
3590 .num_ports = 1,
3591 .base_baud = 3906250,
3592 .uart_offset = 0x200,
3593 .first_offset = 0x1000,
3594 },
3595 [pbn_ADDIDATA_PCIe_2_3906250] = {
3596 .flags = FL_BASE0,
3597 .num_ports = 2,
3598 .base_baud = 3906250,
3599 .uart_offset = 0x200,
3600 .first_offset = 0x1000,
3601 },
3602 [pbn_ADDIDATA_PCIe_4_3906250] = {
3603 .flags = FL_BASE0,
3604 .num_ports = 4,
3605 .base_baud = 3906250,
3606 .uart_offset = 0x200,
3607 .first_offset = 0x1000,
3608 },
3609 [pbn_ADDIDATA_PCIe_8_3906250] = {
3610 .flags = FL_BASE0,
3611 .num_ports = 8,
3612 .base_baud = 3906250,
3613 .uart_offset = 0x200,
3614 .first_offset = 0x1000,
3615 },
Dirk Brandewie095e24b2010-11-17 07:35:20 -08003616 [pbn_ce4100_1_115200] = {
Maxime Bizon08ec2122012-10-19 10:45:07 +02003617 .flags = FL_BASE_BARS,
3618 .num_ports = 2,
Dirk Brandewie095e24b2010-11-17 07:35:20 -08003619 .base_baud = 921600,
3620 .reg_shift = 2,
3621 },
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04003622 [pbn_omegapci] = {
3623 .flags = FL_BASE0,
3624 .num_ports = 8,
3625 .base_baud = 115200,
3626 .uart_offset = 0x200,
3627 },
Nicos Gollan7808edc2011-05-05 21:00:37 +02003628 [pbn_NETMOS9900_2s_115200] = {
3629 .flags = FL_BASE0,
3630 .num_ports = 2,
3631 .base_baud = 115200,
3632 },
Stephen Hurdebebd492013-01-17 14:14:53 -08003633 [pbn_brcm_trumanage] = {
3634 .flags = FL_BASE0,
3635 .num_ports = 1,
3636 .reg_shift = 2,
3637 .base_baud = 115200,
3638 },
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07003639 [pbn_fintek_4] = {
3640 .num_ports = 4,
3641 .uart_offset = 8,
3642 .base_baud = 115200,
3643 .first_offset = 0x40,
3644 },
3645 [pbn_fintek_8] = {
3646 .num_ports = 8,
3647 .uart_offset = 8,
3648 .base_baud = 115200,
3649 .first_offset = 0x40,
3650 },
3651 [pbn_fintek_12] = {
3652 .num_ports = 12,
3653 .uart_offset = 8,
3654 .base_baud = 115200,
3655 .first_offset = 0x40,
3656 },
Ji-Ze Hong (Peter Hong)68e26a82019-08-16 13:27:29 +08003657 [pbn_fintek_F81504A] = {
3658 .num_ports = 4,
3659 .uart_offset = 8,
3660 .base_baud = 115200,
3661 },
3662 [pbn_fintek_F81508A] = {
3663 .num_ports = 8,
3664 .uart_offset = 8,
3665 .base_baud = 115200,
3666 },
3667 [pbn_fintek_F81512A] = {
3668 .num_ports = 12,
3669 .uart_offset = 8,
3670 .base_baud = 115200,
3671 },
Jeremy McNicoll7dde5572016-02-02 13:00:45 -08003672 [pbn_wch382_2] = {
3673 .flags = FL_BASE0,
3674 .num_ports = 2,
3675 .base_baud = 115200,
3676 .uart_offset = 8,
3677 .first_offset = 0xC0,
3678 },
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03003679 [pbn_wch384_4] = {
3680 .flags = FL_BASE0,
3681 .num_ports = 4,
3682 .base_baud = 115200,
3683 .uart_offset = 8,
3684 .first_offset = 0xC0,
3685 },
Du Huanpeng04b6ff52020-08-22 09:47:28 +08003686 [pbn_wch384_8] = {
3687 .flags = FL_BASE0,
3688 .num_ports = 8,
3689 .base_baud = 115200,
3690 .uart_offset = 8,
3691 .first_offset = 0x00,
3692 },
Adam Lee89c043a2015-08-03 13:28:13 +08003693 /*
3694 * Pericom PI7C9X795[1248] Uno/Dual/Quad/Octal UART
3695 */
3696 [pbn_pericom_PI7C9X7951] = {
3697 .flags = FL_BASE0,
3698 .num_ports = 1,
3699 .base_baud = 921600,
3700 .uart_offset = 0x8,
3701 },
3702 [pbn_pericom_PI7C9X7952] = {
3703 .flags = FL_BASE0,
3704 .num_ports = 2,
3705 .base_baud = 921600,
3706 .uart_offset = 0x8,
3707 },
3708 [pbn_pericom_PI7C9X7954] = {
3709 .flags = FL_BASE0,
3710 .num_ports = 4,
3711 .base_baud = 921600,
3712 .uart_offset = 0x8,
3713 },
3714 [pbn_pericom_PI7C9X7958] = {
3715 .flags = FL_BASE0,
3716 .num_ports = 8,
3717 .base_baud = 921600,
3718 .uart_offset = 0x8,
3719 },
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08003720 [pbn_sunix_pci_1s] = {
3721 .num_ports = 1,
3722 .base_baud = 921600,
3723 .uart_offset = 0x8,
3724 },
3725 [pbn_sunix_pci_2s] = {
3726 .num_ports = 2,
3727 .base_baud = 921600,
3728 .uart_offset = 0x8,
3729 },
3730 [pbn_sunix_pci_4s] = {
3731 .num_ports = 4,
3732 .base_baud = 921600,
3733 .uart_offset = 0x8,
3734 },
3735 [pbn_sunix_pci_8s] = {
3736 .num_ports = 8,
3737 .base_baud = 921600,
3738 .uart_offset = 0x8,
3739 },
3740 [pbn_sunix_pci_16s] = {
3741 .num_ports = 16,
3742 .base_baud = 921600,
3743 .uart_offset = 0x8,
3744 },
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02003745 [pbn_titan_1_4000000] = {
3746 .flags = FL_BASE0,
3747 .num_ports = 1,
3748 .base_baud = 4000000,
3749 .uart_offset = 0x200,
3750 .first_offset = 0x1000,
3751 },
3752 [pbn_titan_2_4000000] = {
3753 .flags = FL_BASE0,
3754 .num_ports = 2,
3755 .base_baud = 4000000,
3756 .uart_offset = 0x200,
3757 .first_offset = 0x1000,
3758 },
3759 [pbn_titan_4_4000000] = {
3760 .flags = FL_BASE0,
3761 .num_ports = 4,
3762 .base_baud = 4000000,
3763 .uart_offset = 0x200,
3764 .first_offset = 0x1000,
3765 },
3766 [pbn_titan_8_4000000] = {
3767 .flags = FL_BASE0,
3768 .num_ports = 8,
3769 .base_baud = 4000000,
3770 .uart_offset = 0x200,
3771 .first_offset = 0x1000,
3772 },
Kai-Heng Fengd193db72019-08-17 00:51:24 +08003773 [pbn_moxa8250_2p] = {
3774 .flags = FL_BASE1,
3775 .num_ports = 2,
3776 .base_baud = 921600,
3777 .uart_offset = 0x200,
3778 },
3779 [pbn_moxa8250_4p] = {
3780 .flags = FL_BASE1,
3781 .num_ports = 4,
3782 .base_baud = 921600,
3783 .uart_offset = 0x200,
3784 },
3785 [pbn_moxa8250_8p] = {
3786 .flags = FL_BASE1,
3787 .num_ports = 8,
3788 .base_baud = 921600,
3789 .uart_offset = 0x200,
3790 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07003791};
3792
Guainluca Anzolin6971c632012-09-04 15:56:12 +01003793static const struct pci_device_id blacklist[] = {
3794 /* softmodems */
Alan Cox5756ee92008-02-08 04:18:51 -08003795 { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */
Maciej Szmigieroebf7c062010-10-26 21:48:21 +02003796 { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */
3797 { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */
Guainluca Anzolin6971c632012-09-04 15:56:12 +01003798
3799 /* multi-io cards handled by parport_serial */
3800 { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */
Ezequiel Garciafeb58142014-05-24 15:24:51 -03003801 { PCI_DEVICE(0x4348, 0x5053), }, /* WCH CH353 1S1P */
Sergej Pupykin2fdd8c82014-11-06 14:36:31 +03003802 { PCI_DEVICE(0x1c00, 0x3250), }, /* WCH CH382 2S1P */
Heikki Krogerusd9eda9b2015-10-13 13:29:02 +03003803
3804 /* Intel platforms with MID UART */
3805 { PCI_VDEVICE(INTEL, 0x081b), },
3806 { PCI_VDEVICE(INTEL, 0x081c), },
3807 { PCI_VDEVICE(INTEL, 0x081d), },
3808 { PCI_VDEVICE(INTEL, 0x1191), },
Andy Shevchenkodaf39302017-09-22 15:11:56 +03003809 { PCI_VDEVICE(INTEL, 0x18d8), },
Heikki Krogerus6ede6dc2015-10-13 13:29:06 +03003810 { PCI_VDEVICE(INTEL, 0x19d8), },
Andy Shevchenkoa13e19c2016-08-17 19:20:27 +03003811
3812 /* Intel platforms with DesignWare UART */
Andy Shevchenko6bb5d752016-08-17 19:20:28 +03003813 { PCI_VDEVICE(INTEL, 0x0936), },
Andy Shevchenkoa13e19c2016-08-17 19:20:27 +03003814 { PCI_VDEVICE(INTEL, 0x0f0a), },
3815 { PCI_VDEVICE(INTEL, 0x0f0c), },
3816 { PCI_VDEVICE(INTEL, 0x228a), },
3817 { PCI_VDEVICE(INTEL, 0x228c), },
Andy Shevchenko7f0909d2021-07-13 13:17:39 +03003818 { PCI_VDEVICE(INTEL, 0x4b96), },
3819 { PCI_VDEVICE(INTEL, 0x4b97), },
3820 { PCI_VDEVICE(INTEL, 0x4b98), },
3821 { PCI_VDEVICE(INTEL, 0x4b99), },
3822 { PCI_VDEVICE(INTEL, 0x4b9a), },
3823 { PCI_VDEVICE(INTEL, 0x4b9b), },
Andy Shevchenkoa13e19c2016-08-17 19:20:27 +03003824 { PCI_VDEVICE(INTEL, 0x9ce3), },
3825 { PCI_VDEVICE(INTEL, 0x9ce4), },
Sudip Mukherjee5d1a2382017-01-30 22:28:22 +00003826
3827 /* Exar devices */
3828 { PCI_VDEVICE(EXAR, PCI_ANY_ID), },
Jan Kiszkafc6cc962017-02-08 17:09:06 +01003829 { PCI_VDEVICE(COMMTECH, PCI_ANY_ID), },
Heikki Krogerus54b2f302019-01-24 23:51:22 +02003830
3831 /* End of the black list */
3832 { }
Christian Schmidt436bbd42007-08-22 14:01:19 -07003833};
3834
Andy Shevchenko7d8905d2017-07-24 20:28:32 +03003835static int serial_pci_is_class_communication(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003836{
Linus Torvalds1da177e2005-04-16 15:20:36 -07003837 /*
3838 * If it is not a communications device or the programming
3839 * interface is greater than 6, give up.
Linus Torvalds1da177e2005-04-16 15:20:36 -07003840 */
3841 if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
Andy Shevchenkoe7f3e992018-02-02 20:39:13 +02003842 ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MULTISERIAL) &&
Linus Torvalds1da177e2005-04-16 15:20:36 -07003843 ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
3844 (dev->class & 0xff) > 6)
3845 return -ENODEV;
3846
Andy Shevchenko7d8905d2017-07-24 20:28:32 +03003847 return 0;
3848}
3849
Andy Shevchenko7d8905d2017-07-24 20:28:32 +03003850/*
3851 * Given a complete unknown PCI device, try to use some heuristics to
3852 * guess what the configuration might be, based on the pitiful PCI
3853 * serial specs. Returns 0 on success, -ENODEV on failure.
3854 */
3855static int
3856serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
3857{
3858 int num_iomem, num_port, first_port = -1, i;
Andy Shevchenko824d17c2019-01-24 23:51:21 +02003859 int rc;
3860
3861 rc = serial_pci_is_class_communication(dev);
3862 if (rc)
3863 return rc;
Andy Shevchenko7d8905d2017-07-24 20:28:32 +03003864
Andy Shevchenkoe7f3e992018-02-02 20:39:13 +02003865 /*
3866 * Should we try to make guesses for multiport serial devices later?
3867 */
3868 if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_MULTISERIAL)
3869 return -ENODEV;
3870
Linus Torvalds1da177e2005-04-16 15:20:36 -07003871 num_iomem = num_port = 0;
Denis Efremovc9c13ba2019-09-28 02:43:08 +03003872 for (i = 0; i < PCI_STD_NUM_BARS; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003873 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
3874 num_port++;
3875 if (first_port == -1)
3876 first_port = i;
3877 }
3878 if (pci_resource_flags(dev, i) & IORESOURCE_MEM)
3879 num_iomem++;
3880 }
3881
3882 /*
3883 * If there is 1 or 0 iomem regions, and exactly one port,
3884 * use it. We guess the number of ports based on the IO
3885 * region size.
3886 */
3887 if (num_iomem <= 1 && num_port == 1) {
3888 board->flags = first_port;
3889 board->num_ports = pci_resource_len(dev, first_port) / 8;
3890 return 0;
3891 }
3892
3893 /*
3894 * Now guess if we've got a board which indexes by BARs.
3895 * Each IO BAR should be 8 bytes, and they should follow
3896 * consecutively.
3897 */
3898 first_port = -1;
3899 num_port = 0;
Denis Efremovc9c13ba2019-09-28 02:43:08 +03003900 for (i = 0; i < PCI_STD_NUM_BARS; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003901 if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
3902 pci_resource_len(dev, i) == 8 &&
3903 (first_port == -1 || (first_port + num_port) == i)) {
3904 num_port++;
3905 if (first_port == -1)
3906 first_port = i;
3907 }
3908 }
3909
3910 if (num_port > 1) {
3911 board->flags = first_port | FL_BASE_BARS;
3912 board->num_ports = num_port;
3913 return 0;
3914 }
3915
3916 return -ENODEV;
3917}
3918
3919static inline int
Russell King975a1a7d2009-01-02 13:44:27 +00003920serial_pci_matches(const struct pciserial_board *board,
3921 const struct pciserial_board *guessed)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003922{
3923 return
3924 board->num_ports == guessed->num_ports &&
3925 board->base_baud == guessed->base_baud &&
3926 board->uart_offset == guessed->uart_offset &&
3927 board->reg_shift == guessed->reg_shift &&
3928 board->first_offset == guessed->first_offset;
3929}
3930
Russell King241fc432005-07-27 11:35:54 +01003931struct serial_private *
Russell King975a1a7d2009-01-02 13:44:27 +00003932pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
Russell King241fc432005-07-27 11:35:54 +01003933{
Alan Cox2655a2c2012-07-12 12:59:50 +01003934 struct uart_8250_port uart;
Russell King241fc432005-07-27 11:35:54 +01003935 struct serial_private *priv;
3936 struct pci_serial_quirk *quirk;
3937 int rc, nr_ports, i;
3938
3939 nr_ports = board->num_ports;
3940
3941 /*
3942 * Find an init and setup quirks.
3943 */
3944 quirk = find_quirk(dev);
3945
3946 /*
3947 * Run the new-style initialization function.
3948 * The initialization function returns:
3949 * <0 - error
3950 * 0 - use board->num_ports
3951 * >0 - number of ports
3952 */
3953 if (quirk->init) {
3954 rc = quirk->init(dev);
3955 if (rc < 0) {
3956 priv = ERR_PTR(rc);
3957 goto err_out;
3958 }
3959 if (rc)
3960 nr_ports = rc;
3961 }
3962
Len Baker42c457c2021-09-05 17:57:28 +02003963 priv = kzalloc(struct_size(priv, line, nr_ports), GFP_KERNEL);
Russell King241fc432005-07-27 11:35:54 +01003964 if (!priv) {
3965 priv = ERR_PTR(-ENOMEM);
3966 goto err_deinit;
3967 }
3968
Russell King241fc432005-07-27 11:35:54 +01003969 priv->dev = dev;
3970 priv->quirk = quirk;
3971
Alan Cox2655a2c2012-07-12 12:59:50 +01003972 memset(&uart, 0, sizeof(uart));
3973 uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
3974 uart.port.uartclk = board->base_baud * 16;
Ralf Ramsauer84284132019-08-12 13:21:52 +02003975
Christian Gmeiner9808f9b2021-05-27 11:54:40 +02003976 if (board->flags & FL_NOIRQ) {
3977 uart.port.irq = 0;
Ralf Ramsauer84284132019-08-12 13:21:52 +02003978 } else {
Christian Gmeiner9808f9b2021-05-27 11:54:40 +02003979 if (pci_match_id(pci_use_msi, dev)) {
Andy Shevchenko11773842021-10-22 16:51:47 +03003980 pci_dbg(dev, "Using MSI(-X) interrupts\n");
Christian Gmeiner9808f9b2021-05-27 11:54:40 +02003981 pci_set_master(dev);
Mario Kleiner341abd62021-07-29 06:33:06 +02003982 uart.port.flags &= ~UPF_SHARE_IRQ;
Christian Gmeiner9808f9b2021-05-27 11:54:40 +02003983 rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES);
3984 } else {
Andy Shevchenko11773842021-10-22 16:51:47 +03003985 pci_dbg(dev, "Using legacy interrupts\n");
Christian Gmeiner9808f9b2021-05-27 11:54:40 +02003986 rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY);
3987 }
3988 if (rc < 0) {
3989 kfree(priv);
3990 priv = ERR_PTR(rc);
3991 goto err_deinit;
3992 }
3993
3994 uart.port.irq = pci_irq_vector(dev, 0);
Ralf Ramsauer84284132019-08-12 13:21:52 +02003995 }
3996
Alan Cox2655a2c2012-07-12 12:59:50 +01003997 uart.port.dev = &dev->dev;
Russell King241fc432005-07-27 11:35:54 +01003998
3999 for (i = 0; i < nr_ports; i++) {
Alan Cox2655a2c2012-07-12 12:59:50 +01004000 if (quirk->setup(priv, board, &uart, i))
Russell King241fc432005-07-27 11:35:54 +01004001 break;
4002
Andy Shevchenko11773842021-10-22 16:51:47 +03004003 pci_dbg(dev, "Setup PCI port: port %lx, irq %d, type %d\n",
Greg Kroah-Hartmanaf8c5b82013-09-28 13:01:59 -07004004 uart.port.iobase, uart.port.irq, uart.port.iotype);
Alan Cox5756ee92008-02-08 04:18:51 -08004005
Alan Cox2655a2c2012-07-12 12:59:50 +01004006 priv->line[i] = serial8250_register_8250_port(&uart);
Russell King241fc432005-07-27 11:35:54 +01004007 if (priv->line[i] < 0) {
Andy Shevchenko11773842021-10-22 16:51:47 +03004008 pci_err(dev,
Greg Kroah-Hartmanaf8c5b82013-09-28 13:01:59 -07004009 "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
4010 uart.port.iobase, uart.port.irq,
4011 uart.port.iotype, priv->line[i]);
Russell King241fc432005-07-27 11:35:54 +01004012 break;
4013 }
4014 }
Russell King241fc432005-07-27 11:35:54 +01004015 priv->nr = i;
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -02004016 priv->board = board;
Russell King241fc432005-07-27 11:35:54 +01004017 return priv;
4018
Alan Cox5756ee92008-02-08 04:18:51 -08004019err_deinit:
Russell King241fc432005-07-27 11:35:54 +01004020 if (quirk->exit)
4021 quirk->exit(dev);
Alan Cox5756ee92008-02-08 04:18:51 -08004022err_out:
Russell King241fc432005-07-27 11:35:54 +01004023 return priv;
4024}
4025EXPORT_SYMBOL_GPL(pciserial_init_ports);
4026
Wei Yongjun80cd94e2017-02-05 16:12:34 +00004027static void pciserial_detach_ports(struct serial_private *priv)
Russell King241fc432005-07-27 11:35:54 +01004028{
4029 struct pci_serial_quirk *quirk;
4030 int i;
4031
4032 for (i = 0; i < priv->nr; i++)
4033 serial8250_unregister_port(priv->line[i]);
4034
Russell King241fc432005-07-27 11:35:54 +01004035 /*
4036 * Find the exit quirks.
4037 */
4038 quirk = find_quirk(priv->dev);
4039 if (quirk->exit)
4040 quirk->exit(priv->dev);
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -02004041}
Russell King241fc432005-07-27 11:35:54 +01004042
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -02004043void pciserial_remove_ports(struct serial_private *priv)
4044{
4045 pciserial_detach_ports(priv);
Russell King241fc432005-07-27 11:35:54 +01004046 kfree(priv);
4047}
4048EXPORT_SYMBOL_GPL(pciserial_remove_ports);
4049
4050void pciserial_suspend_ports(struct serial_private *priv)
4051{
4052 int i;
4053
4054 for (i = 0; i < priv->nr; i++)
4055 if (priv->line[i] >= 0)
4056 serial8250_suspend_port(priv->line[i]);
Dan Williams5f1a3892012-04-10 14:11:03 -07004057
4058 /*
4059 * Ensure that every init quirk is properly torn down
4060 */
4061 if (priv->quirk->exit)
4062 priv->quirk->exit(priv->dev);
Russell King241fc432005-07-27 11:35:54 +01004063}
4064EXPORT_SYMBOL_GPL(pciserial_suspend_ports);
4065
4066void pciserial_resume_ports(struct serial_private *priv)
4067{
4068 int i;
4069
4070 /*
4071 * Ensure that the board is correctly configured.
4072 */
4073 if (priv->quirk->init)
4074 priv->quirk->init(priv->dev);
4075
4076 for (i = 0; i < priv->nr; i++)
4077 if (priv->line[i] >= 0)
4078 serial8250_resume_port(priv->line[i]);
4079}
4080EXPORT_SYMBOL_GPL(pciserial_resume_ports);
4081
Linus Torvalds1da177e2005-04-16 15:20:36 -07004082/*
4083 * Probe one serial board. Unfortunately, there is no rhyme nor reason
4084 * to the arrangement of serial ports on a PCI card.
4085 */
Bill Pemberton9671f092012-11-19 13:21:50 -05004086static int
Linus Torvalds1da177e2005-04-16 15:20:36 -07004087pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
4088{
Frédéric Brière5bf8f502011-05-29 15:08:03 -04004089 struct pci_serial_quirk *quirk;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004090 struct serial_private *priv;
Russell King975a1a7d2009-01-02 13:44:27 +00004091 const struct pciserial_board *board;
Heikki Krogerus54b2f302019-01-24 23:51:22 +02004092 const struct pci_device_id *exclude;
Russell King975a1a7d2009-01-02 13:44:27 +00004093 struct pciserial_board tmp;
Russell King241fc432005-07-27 11:35:54 +01004094 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004095
Frédéric Brière5bf8f502011-05-29 15:08:03 -04004096 quirk = find_quirk(dev);
4097 if (quirk->probe) {
4098 rc = quirk->probe(dev);
4099 if (rc)
4100 return rc;
4101 }
4102
Linus Torvalds1da177e2005-04-16 15:20:36 -07004103 if (ent->driver_data >= ARRAY_SIZE(pci_boards)) {
Andy Shevchenko11773842021-10-22 16:51:47 +03004104 pci_err(dev, "invalid driver_data: %ld\n", ent->driver_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004105 return -EINVAL;
4106 }
4107
4108 board = &pci_boards[ent->driver_data];
4109
Heikki Krogerus54b2f302019-01-24 23:51:22 +02004110 exclude = pci_match_id(blacklist, dev);
4111 if (exclude)
4112 return -ENODEV;
Andy Shevchenko7d8905d2017-07-24 20:28:32 +03004113
Andy Shevchenko3f64b1d2016-02-15 18:01:51 +02004114 rc = pcim_enable_device(dev);
Michael Reed28071902011-05-31 12:06:28 -05004115 pci_save_state(dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004116 if (rc)
4117 return rc;
4118
4119 if (ent->driver_data == pbn_default) {
4120 /*
4121 * Use a copy of the pci_board entry for this;
4122 * avoid changing entries in the table.
4123 */
Russell King1c7c1fe2005-07-27 11:31:19 +01004124 memcpy(&tmp, board, sizeof(struct pciserial_board));
Linus Torvalds1da177e2005-04-16 15:20:36 -07004125 board = &tmp;
4126
4127 /*
4128 * We matched one of our class entries. Try to
4129 * determine the parameters of this board.
4130 */
Russell King975a1a7d2009-01-02 13:44:27 +00004131 rc = serial_pci_guess_board(dev, &tmp);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004132 if (rc)
Andy Shevchenko3f64b1d2016-02-15 18:01:51 +02004133 return rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004134 } else {
4135 /*
4136 * We matched an explicit entry. If we are able to
4137 * detect this boards settings with our heuristic,
4138 * then we no longer need this entry.
4139 */
Russell King1c7c1fe2005-07-27 11:31:19 +01004140 memcpy(&tmp, &pci_boards[pbn_default],
4141 sizeof(struct pciserial_board));
Linus Torvalds1da177e2005-04-16 15:20:36 -07004142 rc = serial_pci_guess_board(dev, &tmp);
4143 if (rc == 0 && serial_pci_matches(board, &tmp))
4144 moan_device("Redundant entry in serial pci_table.",
4145 dev);
4146 }
4147
Russell King241fc432005-07-27 11:35:54 +01004148 priv = pciserial_init_ports(dev, board);
Andy Shevchenko3f64b1d2016-02-15 18:01:51 +02004149 if (IS_ERR(priv))
4150 return PTR_ERR(priv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004151
Andy Shevchenko3f64b1d2016-02-15 18:01:51 +02004152 pci_set_drvdata(dev, priv);
4153 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004154}
4155
Bill Pembertonae8d8a12012-11-19 13:26:18 -05004156static void pciserial_remove_one(struct pci_dev *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004157{
4158 struct serial_private *priv = pci_get_drvdata(dev);
4159
Russell King241fc432005-07-27 11:35:54 +01004160 pciserial_remove_ports(priv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004161}
4162
Andy Shevchenko61702c32015-02-02 14:53:26 +02004163#ifdef CONFIG_PM_SLEEP
4164static int pciserial_suspend_one(struct device *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004165{
Chuhong Yuan76b41062019-07-24 21:17:58 +08004166 struct serial_private *priv = dev_get_drvdata(dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004167
Russell King241fc432005-07-27 11:35:54 +01004168 if (priv)
4169 pciserial_suspend_ports(priv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004170
Linus Torvalds1da177e2005-04-16 15:20:36 -07004171 return 0;
4172}
4173
Andy Shevchenko61702c32015-02-02 14:53:26 +02004174static int pciserial_resume_one(struct device *dev)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004175{
Andy Shevchenko61702c32015-02-02 14:53:26 +02004176 struct pci_dev *pdev = to_pci_dev(dev);
4177 struct serial_private *priv = pci_get_drvdata(pdev);
Dirk Hohndelccb9d592007-10-29 06:28:17 -07004178 int err;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004179
4180 if (priv) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004181 /*
4182 * The device may have been disabled. Re-enable it.
4183 */
Andy Shevchenko61702c32015-02-02 14:53:26 +02004184 err = pci_enable_device(pdev);
Alan Cox40836c42008-10-13 10:36:11 +01004185 /* FIXME: We cannot simply error out here */
Dirk Hohndelccb9d592007-10-29 06:28:17 -07004186 if (err)
Andy Shevchenko11773842021-10-22 16:51:47 +03004187 pci_err(pdev, "Unable to re-enable ports, trying to continue.\n");
Russell King241fc432005-07-27 11:35:54 +01004188 pciserial_resume_ports(priv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004189 }
4190 return 0;
4191}
Alexey Dobriyan1d5e7992006-09-25 16:51:27 -07004192#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -07004193
Andy Shevchenko61702c32015-02-02 14:53:26 +02004194static SIMPLE_DEV_PM_OPS(pciserial_pm_ops, pciserial_suspend_one,
4195 pciserial_resume_one);
4196
Arvind Yadavc40f7162017-07-23 15:31:06 +05304197static const struct pci_device_id serial_pci_tbl[] = {
Michael Bramer78d70d42009-01-27 11:51:16 +00004198 /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */
4199 { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3620,
4200 PCI_DEVICE_ID_ADVANTECH_PCI3620, 0x0001, 0, 0,
4201 pbn_b2_8_921600 },
Thomee Wright0c6d7742014-05-19 20:30:51 +00004202 /* Advantech also use 0x3618 and 0xf618 */
4203 { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3618,
4204 PCI_DEVICE_ID_ADVANTECH_PCI3618, PCI_ANY_ID, 0, 0,
4205 pbn_b0_4_921600 },
4206 { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCIf618,
4207 PCI_DEVICE_ID_ADVANTECH_PCI3618, PCI_ANY_ID, 0, 0,
4208 pbn_b0_4_921600 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004209 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
4210 PCI_SUBVENDOR_ID_CONNECT_TECH,
4211 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
4212 pbn_b1_8_1382400 },
4213 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
4214 PCI_SUBVENDOR_ID_CONNECT_TECH,
4215 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
4216 pbn_b1_4_1382400 },
4217 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
4218 PCI_SUBVENDOR_ID_CONNECT_TECH,
4219 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
4220 pbn_b1_2_1382400 },
4221 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4222 PCI_SUBVENDOR_ID_CONNECT_TECH,
4223 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
4224 pbn_b1_8_1382400 },
4225 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4226 PCI_SUBVENDOR_ID_CONNECT_TECH,
4227 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
4228 pbn_b1_4_1382400 },
4229 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4230 PCI_SUBVENDOR_ID_CONNECT_TECH,
4231 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
4232 pbn_b1_2_1382400 },
4233 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4234 PCI_SUBVENDOR_ID_CONNECT_TECH,
4235 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485, 0, 0,
4236 pbn_b1_8_921600 },
4237 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4238 PCI_SUBVENDOR_ID_CONNECT_TECH,
4239 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4, 0, 0,
4240 pbn_b1_8_921600 },
4241 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4242 PCI_SUBVENDOR_ID_CONNECT_TECH,
4243 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485, 0, 0,
4244 pbn_b1_4_921600 },
4245 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4246 PCI_SUBVENDOR_ID_CONNECT_TECH,
4247 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2, 0, 0,
4248 pbn_b1_4_921600 },
4249 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4250 PCI_SUBVENDOR_ID_CONNECT_TECH,
4251 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485, 0, 0,
4252 pbn_b1_2_921600 },
4253 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4254 PCI_SUBVENDOR_ID_CONNECT_TECH,
4255 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6, 0, 0,
4256 pbn_b1_8_921600 },
4257 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4258 PCI_SUBVENDOR_ID_CONNECT_TECH,
4259 PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1, 0, 0,
4260 pbn_b1_8_921600 },
4261 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4262 PCI_SUBVENDOR_ID_CONNECT_TECH,
4263 PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1, 0, 0,
4264 pbn_b1_4_921600 },
Gareth Howlett26e92862006-01-04 17:00:42 +00004265 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
4266 PCI_SUBVENDOR_ID_CONNECT_TECH,
4267 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ, 0, 0,
4268 pbn_b1_2_1250000 },
4269 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
4270 PCI_SUBVENDOR_ID_CONNECT_TECH,
4271 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2, 0, 0,
4272 pbn_b0_2_1843200 },
4273 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
4274 PCI_SUBVENDOR_ID_CONNECT_TECH,
4275 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0,
4276 pbn_b0_4_1843200 },
Yoichi Yuasa85d14942006-02-08 21:46:24 +00004277 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
4278 PCI_VENDOR_ID_AFAVLAB,
4279 PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0,
4280 pbn_b0_4_1152000 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004281 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530,
Alan Cox5756ee92008-02-08 04:18:51 -08004282 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004283 pbn_b2_bt_1_115200 },
4284 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM2,
Alan Cox5756ee92008-02-08 04:18:51 -08004285 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004286 pbn_b2_bt_2_115200 },
4287 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM422,
Alan Cox5756ee92008-02-08 04:18:51 -08004288 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004289 pbn_b2_bt_4_115200 },
4290 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM232,
Alan Cox5756ee92008-02-08 04:18:51 -08004291 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004292 pbn_b2_bt_2_115200 },
4293 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM4,
Alan Cox5756ee92008-02-08 04:18:51 -08004294 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004295 pbn_b2_bt_4_115200 },
4296 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
Alan Cox5756ee92008-02-08 04:18:51 -08004297 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004298 pbn_b2_8_115200 },
Flavio Leitnere65f0f82009-01-02 13:50:43 +00004299 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_7803,
4300 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4301 pbn_b2_8_460800 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004302 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
4303 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4304 pbn_b2_8_115200 },
4305
4306 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2,
4307 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4308 pbn_b2_bt_2_115200 },
4309 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM200,
4310 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4311 pbn_b2_bt_2_921600 },
4312 /*
4313 * VScom SPCOM800, from sl@s.pl
4314 */
Alan Cox5756ee92008-02-08 04:18:51 -08004315 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM800,
4316 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004317 pbn_b2_8_921600 },
4318 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_1077,
Alan Cox5756ee92008-02-08 04:18:51 -08004319 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004320 pbn_b2_4_921600 },
Catalin(ux) M BOIEb76c5a02008-07-23 21:29:46 -07004321 /* Unknown card - subdevice 0x1584 */
4322 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4323 PCI_VENDOR_ID_PLX,
4324 PCI_SUBDEVICE_ID_UNKNOWN_0x1584, 0, 0,
Scott Ashcroftd13402a2013-03-03 21:35:06 +00004325 pbn_b2_4_115200 },
4326 /* Unknown card - subdevice 0x1588 */
4327 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4328 PCI_VENDOR_ID_PLX,
4329 PCI_SUBDEVICE_ID_UNKNOWN_0x1588, 0, 0,
4330 pbn_b2_8_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004331 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4332 PCI_SUBVENDOR_ID_KEYSPAN,
4333 PCI_SUBDEVICE_ID_KEYSPAN_SX2, 0, 0,
4334 pbn_panacom },
4335 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM,
4336 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4337 pbn_panacom4 },
4338 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM,
4339 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4340 pbn_panacom2 },
Matthias Fuchsa9cccd32007-02-10 01:46:05 -08004341 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
4342 PCI_VENDOR_ID_ESDGMBH,
4343 PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0,
4344 pbn_b2_4_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004345 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4346 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
Alan Cox5756ee92008-02-08 04:18:51 -08004347 PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004348 pbn_b2_4_460800 },
4349 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4350 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
Alan Cox5756ee92008-02-08 04:18:51 -08004351 PCI_SUBDEVICE_ID_CHASE_PCIFAST8, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004352 pbn_b2_8_460800 },
4353 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4354 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
Alan Cox5756ee92008-02-08 04:18:51 -08004355 PCI_SUBDEVICE_ID_CHASE_PCIFAST16, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004356 pbn_b2_16_460800 },
4357 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4358 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
Alan Cox5756ee92008-02-08 04:18:51 -08004359 PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004360 pbn_b2_16_460800 },
4361 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4362 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
Alan Cox5756ee92008-02-08 04:18:51 -08004363 PCI_SUBDEVICE_ID_CHASE_PCIRAS4, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004364 pbn_b2_4_460800 },
4365 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4366 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
Alan Cox5756ee92008-02-08 04:18:51 -08004367 PCI_SUBDEVICE_ID_CHASE_PCIRAS8, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004368 pbn_b2_8_460800 },
Bjorn Helgaasadd7b582005-10-24 22:11:57 +01004369 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4370 PCI_SUBVENDOR_ID_EXSYS,
4371 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0,
Shawn Bohreree4cd1b2012-05-28 15:20:47 -05004372 pbn_b2_4_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004373 /*
4374 * Megawolf Romulus PCI Serial Card, from Mike Hudson
4375 * (Exoray@isys.ca)
4376 */
4377 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_ROMULUS,
4378 0x10b5, 0x106a, 0, 0,
4379 pbn_plx_romulus },
Alan Cox55c7c0f2012-11-29 09:03:00 +10304380 /*
Mike Skoog1bc8cde2014-10-16 13:10:01 -07004381 * EndRun Technologies. PCI express device range.
4382 * EndRun PTP/1588 has 2 Native UARTs.
4383 */
4384 { PCI_VENDOR_ID_ENDRUN, PCI_DEVICE_ID_ENDRUN_1588,
4385 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4386 pbn_endrun_2_4000000 },
4387 /*
Alan Cox55c7c0f2012-11-29 09:03:00 +10304388 * Quatech cards. These actually have configurable clocks but for
4389 * now we just use the default.
4390 *
4391 * 100 series are RS232, 200 series RS422,
4392 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004393 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,
4394 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4395 pbn_b1_4_115200 },
4396 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100,
4397 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4398 pbn_b1_2_115200 },
Alan Cox55c7c0f2012-11-29 09:03:00 +10304399 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100E,
4400 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4401 pbn_b2_2_115200 },
4402 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC200,
4403 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4404 pbn_b1_2_115200 },
4405 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC200E,
4406 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4407 pbn_b2_2_115200 },
4408 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC200,
4409 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4410 pbn_b1_4_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004411 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D,
4412 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4413 pbn_b1_8_115200 },
4414 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M,
4415 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4416 pbn_b1_8_115200 },
Alan Cox55c7c0f2012-11-29 09:03:00 +10304417 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCP100,
4418 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4419 pbn_b1_4_115200 },
4420 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCP100,
4421 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4422 pbn_b1_2_115200 },
4423 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCP200,
4424 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4425 pbn_b1_4_115200 },
4426 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCP200,
4427 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4428 pbn_b1_2_115200 },
4429 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCLP100,
4430 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4431 pbn_b2_4_115200 },
4432 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCLP100,
4433 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4434 pbn_b2_2_115200 },
4435 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SSCLP100,
4436 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4437 pbn_b2_1_115200 },
4438 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCLP200,
4439 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4440 pbn_b2_4_115200 },
4441 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCLP200,
4442 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4443 pbn_b2_2_115200 },
4444 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SSCLP200,
4445 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4446 pbn_b2_1_115200 },
4447 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESCLP100,
4448 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4449 pbn_b0_8_115200 },
4450
Linus Torvalds1da177e2005-04-16 15:20:36 -07004451 { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954,
Alan Cox5756ee92008-02-08 04:18:51 -08004452 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4,
4453 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004454 pbn_b0_4_921600 },
4455 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
Alan Cox5756ee92008-02-08 04:18:51 -08004456 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL,
4457 0, 0,
Andrey Paninfbc0dc02005-07-18 11:38:09 +01004458 pbn_b0_4_1152000 },
Mikulas Patockac9bd9d02010-10-26 14:20:48 -04004459 { PCI_VENDOR_ID_OXSEMI, 0x9505,
4460 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4461 pbn_b0_bt_2_921600 },
David Ransondb1de152005-07-27 11:43:55 -07004462
4463 /*
4464 * The below card is a little controversial since it is the
4465 * subject of a PCI vendor/device ID clash. (See
4466 * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
4467 * For now just used the hex ID 0x950a.
4468 */
4469 { PCI_VENDOR_ID_OXSEMI, 0x950a,
Flavio Leitner26e82202012-09-21 21:04:34 -03004470 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_00,
4471 0, 0, pbn_b0_2_115200 },
4472 { PCI_VENDOR_ID_OXSEMI, 0x950a,
4473 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_30,
4474 0, 0, pbn_b0_2_115200 },
Niels de Vos39aced62009-01-02 13:46:58 +00004475 { PCI_VENDOR_ID_OXSEMI, 0x950a,
David Ransondb1de152005-07-27 11:43:55 -07004476 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4477 pbn_b0_2_1130000 },
Andre Przywara70fd8fd2009-06-11 12:41:57 +01004478 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_C950,
4479 PCI_VENDOR_ID_OXSEMI, PCI_SUBDEVICE_ID_OXSEMI_C950, 0, 0,
4480 pbn_b0_1_921600 },
Andrey Paninfbc0dc02005-07-18 11:38:09 +01004481 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004482 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4483 pbn_b0_4_115200 },
4484 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
4485 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4486 pbn_b0_bt_2_921600 },
Lytochkin Borise8470032010-07-26 10:02:26 +04004487 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI958,
Anton Wuerfel1a33e342016-01-14 16:08:10 +01004488 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Lytochkin Borise8470032010-07-26 10:02:26 +04004489 pbn_b2_8_1152000 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004490
4491 /*
Lee Howard7106b4e2008-10-21 13:48:58 +01004492 * Oxford Semiconductor Inc. Tornado PCI express device range.
4493 */
4494 { PCI_VENDOR_ID_OXSEMI, 0xc101, /* OXPCIe952 1 Legacy UART */
4495 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004496 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004497 { PCI_VENDOR_ID_OXSEMI, 0xc105, /* OXPCIe952 1 Legacy UART */
4498 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004499 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004500 { PCI_VENDOR_ID_OXSEMI, 0xc11b, /* OXPCIe952 1 Native UART */
4501 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004502 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004503 { PCI_VENDOR_ID_OXSEMI, 0xc11f, /* OXPCIe952 1 Native UART */
4504 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004505 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004506 { PCI_VENDOR_ID_OXSEMI, 0xc120, /* OXPCIe952 1 Legacy UART */
4507 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004508 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004509 { PCI_VENDOR_ID_OXSEMI, 0xc124, /* OXPCIe952 1 Legacy UART */
4510 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004511 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004512 { PCI_VENDOR_ID_OXSEMI, 0xc138, /* OXPCIe952 1 Native UART */
4513 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004514 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004515 { PCI_VENDOR_ID_OXSEMI, 0xc13d, /* OXPCIe952 1 Native UART */
4516 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004517 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004518 { PCI_VENDOR_ID_OXSEMI, 0xc140, /* OXPCIe952 1 Legacy UART */
4519 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004520 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004521 { PCI_VENDOR_ID_OXSEMI, 0xc141, /* OXPCIe952 1 Legacy UART */
4522 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004523 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004524 { PCI_VENDOR_ID_OXSEMI, 0xc144, /* OXPCIe952 1 Legacy UART */
4525 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004526 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004527 { PCI_VENDOR_ID_OXSEMI, 0xc145, /* OXPCIe952 1 Legacy UART */
4528 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004529 pbn_b0_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004530 { PCI_VENDOR_ID_OXSEMI, 0xc158, /* OXPCIe952 2 Native UART */
4531 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004532 pbn_oxsemi_2_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004533 { PCI_VENDOR_ID_OXSEMI, 0xc15d, /* OXPCIe952 2 Native UART */
4534 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004535 pbn_oxsemi_2_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004536 { PCI_VENDOR_ID_OXSEMI, 0xc208, /* OXPCIe954 4 Native UART */
4537 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004538 pbn_oxsemi_4_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004539 { PCI_VENDOR_ID_OXSEMI, 0xc20d, /* OXPCIe954 4 Native UART */
4540 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004541 pbn_oxsemi_4_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004542 { PCI_VENDOR_ID_OXSEMI, 0xc308, /* OXPCIe958 8 Native UART */
4543 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004544 pbn_oxsemi_8_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004545 { PCI_VENDOR_ID_OXSEMI, 0xc30d, /* OXPCIe958 8 Native UART */
4546 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004547 pbn_oxsemi_8_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004548 { PCI_VENDOR_ID_OXSEMI, 0xc40b, /* OXPCIe200 1 Native UART */
4549 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004550 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004551 { PCI_VENDOR_ID_OXSEMI, 0xc40f, /* OXPCIe200 1 Native UART */
4552 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004553 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004554 { PCI_VENDOR_ID_OXSEMI, 0xc41b, /* OXPCIe200 1 Native UART */
4555 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004556 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004557 { PCI_VENDOR_ID_OXSEMI, 0xc41f, /* OXPCIe200 1 Native UART */
4558 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004559 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004560 { PCI_VENDOR_ID_OXSEMI, 0xc42b, /* OXPCIe200 1 Native UART */
4561 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004562 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004563 { PCI_VENDOR_ID_OXSEMI, 0xc42f, /* OXPCIe200 1 Native UART */
4564 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004565 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004566 { PCI_VENDOR_ID_OXSEMI, 0xc43b, /* OXPCIe200 1 Native UART */
4567 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004568 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004569 { PCI_VENDOR_ID_OXSEMI, 0xc43f, /* OXPCIe200 1 Native UART */
4570 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004571 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004572 { PCI_VENDOR_ID_OXSEMI, 0xc44b, /* OXPCIe200 1 Native UART */
4573 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004574 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004575 { PCI_VENDOR_ID_OXSEMI, 0xc44f, /* OXPCIe200 1 Native UART */
4576 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004577 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004578 { PCI_VENDOR_ID_OXSEMI, 0xc45b, /* OXPCIe200 1 Native UART */
4579 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004580 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004581 { PCI_VENDOR_ID_OXSEMI, 0xc45f, /* OXPCIe200 1 Native UART */
4582 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004583 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004584 { PCI_VENDOR_ID_OXSEMI, 0xc46b, /* OXPCIe200 1 Native UART */
4585 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004586 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004587 { PCI_VENDOR_ID_OXSEMI, 0xc46f, /* OXPCIe200 1 Native UART */
4588 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004589 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004590 { PCI_VENDOR_ID_OXSEMI, 0xc47b, /* OXPCIe200 1 Native UART */
4591 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004592 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004593 { PCI_VENDOR_ID_OXSEMI, 0xc47f, /* OXPCIe200 1 Native UART */
4594 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004595 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004596 { PCI_VENDOR_ID_OXSEMI, 0xc48b, /* OXPCIe200 1 Native UART */
4597 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004598 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004599 { PCI_VENDOR_ID_OXSEMI, 0xc48f, /* OXPCIe200 1 Native UART */
4600 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004601 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004602 { PCI_VENDOR_ID_OXSEMI, 0xc49b, /* OXPCIe200 1 Native UART */
4603 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004604 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004605 { PCI_VENDOR_ID_OXSEMI, 0xc49f, /* OXPCIe200 1 Native UART */
4606 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004607 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004608 { PCI_VENDOR_ID_OXSEMI, 0xc4ab, /* OXPCIe200 1 Native UART */
4609 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004610 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004611 { PCI_VENDOR_ID_OXSEMI, 0xc4af, /* OXPCIe200 1 Native UART */
4612 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004613 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004614 { PCI_VENDOR_ID_OXSEMI, 0xc4bb, /* OXPCIe200 1 Native UART */
4615 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004616 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004617 { PCI_VENDOR_ID_OXSEMI, 0xc4bf, /* OXPCIe200 1 Native UART */
4618 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004619 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004620 { PCI_VENDOR_ID_OXSEMI, 0xc4cb, /* OXPCIe200 1 Native UART */
4621 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004622 pbn_oxsemi_1_3906250 },
Lee Howard7106b4e2008-10-21 13:48:58 +01004623 { PCI_VENDOR_ID_OXSEMI, 0xc4cf, /* OXPCIe200 1 Native UART */
4624 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004625 pbn_oxsemi_1_3906250 },
Lee Howardb80de362008-10-21 13:50:14 +01004626 /*
4627 * Mainpine Inc. IQ Express "Rev3" utilizing OxSemi Tornado
4628 */
4629 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 1 Port V.34 Super-G3 Fax */
4630 PCI_VENDOR_ID_MAINPINE, 0x4001, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004631 pbn_oxsemi_1_3906250 },
Lee Howardb80de362008-10-21 13:50:14 +01004632 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 2 Port V.34 Super-G3 Fax */
4633 PCI_VENDOR_ID_MAINPINE, 0x4002, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004634 pbn_oxsemi_2_3906250 },
Lee Howardb80de362008-10-21 13:50:14 +01004635 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 4 Port V.34 Super-G3 Fax */
4636 PCI_VENDOR_ID_MAINPINE, 0x4004, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004637 pbn_oxsemi_4_3906250 },
Lee Howardb80de362008-10-21 13:50:14 +01004638 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 8 Port V.34 Super-G3 Fax */
4639 PCI_VENDOR_ID_MAINPINE, 0x4008, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004640 pbn_oxsemi_8_3906250 },
Scott Kilauaa273ae2011-05-11 15:41:59 -05004641
4642 /*
4643 * Digi/IBM PCIe 2-port Async EIA-232 Adapter utilizing OxSemi Tornado
4644 */
4645 { PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_2_OX_IBM,
4646 PCI_SUBVENDOR_ID_IBM, PCI_ANY_ID, 0, 0,
Maciej W. Rozycki6cbe45d2021-06-10 20:39:03 +02004647 pbn_oxsemi_2_3906250 },
Scott Kilauaa273ae2011-05-11 15:41:59 -05004648
Lee Howard7106b4e2008-10-21 13:48:58 +01004649 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07004650 * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
4651 * from skokodyn@yahoo.com
4652 */
4653 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4654 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0,
4655 pbn_sbsxrsio },
4656 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4657 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0,
4658 pbn_sbsxrsio },
4659 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4660 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0,
4661 pbn_sbsxrsio },
4662 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4663 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0,
4664 pbn_sbsxrsio },
4665
4666 /*
4667 * Digitan DS560-558, from jimd@esoft.com
4668 */
4669 { PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM,
Alan Cox5756ee92008-02-08 04:18:51 -08004670 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004671 pbn_b1_1_115200 },
4672
4673 /*
4674 * Titan Electronic cards
4675 * The 400L and 800L have a custom setup quirk.
4676 */
4677 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100,
Alan Cox5756ee92008-02-08 04:18:51 -08004678 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004679 pbn_b0_1_921600 },
4680 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200,
Alan Cox5756ee92008-02-08 04:18:51 -08004681 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004682 pbn_b0_2_921600 },
4683 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400,
Alan Cox5756ee92008-02-08 04:18:51 -08004684 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004685 pbn_b0_4_921600 },
4686 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B,
Alan Cox5756ee92008-02-08 04:18:51 -08004687 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004688 pbn_b0_4_921600 },
4689 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100L,
4690 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4691 pbn_b1_1_921600 },
4692 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200L,
4693 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4694 pbn_b1_bt_2_921600 },
4695 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400L,
4696 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4697 pbn_b0_bt_4_921600 },
4698 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L,
4699 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4700 pbn_b0_bt_8_921600 },
Yegor Yefremov66169ad2010-06-04 09:58:18 +02004701 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200I,
4702 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4703 pbn_b4_bt_2_921600 },
4704 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400I,
4705 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4706 pbn_b4_bt_4_921600 },
4707 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800I,
4708 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4709 pbn_b4_bt_8_921600 },
4710 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400EH,
4711 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4712 pbn_b0_4_921600 },
4713 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EH,
4714 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4715 pbn_b0_4_921600 },
4716 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EHB,
4717 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4718 pbn_b0_4_921600 },
4719 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100E,
4720 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02004721 pbn_titan_1_4000000 },
Yegor Yefremov66169ad2010-06-04 09:58:18 +02004722 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200E,
4723 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02004724 pbn_titan_2_4000000 },
Yegor Yefremov66169ad2010-06-04 09:58:18 +02004725 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400E,
4726 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02004727 pbn_titan_4_4000000 },
Yegor Yefremov66169ad2010-06-04 09:58:18 +02004728 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800E,
4729 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02004730 pbn_titan_8_4000000 },
Yegor Yefremov66169ad2010-06-04 09:58:18 +02004731 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EI,
4732 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02004733 pbn_titan_2_4000000 },
Yegor Yefremov66169ad2010-06-04 09:58:18 +02004734 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI,
4735 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Maciej W. Rozyckif771a342021-06-10 20:38:59 +02004736 pbn_titan_2_4000000 },
Yegor Yefremov48c02472013-12-09 12:11:15 +01004737 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200V3,
4738 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4739 pbn_b0_bt_2_921600 },
Yegor Yefremov1e9deb12011-12-27 15:47:37 +01004740 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400V3,
4741 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4742 pbn_b0_4_921600 },
4743 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_410V3,
4744 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4745 pbn_b0_4_921600 },
4746 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3,
4747 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4748 pbn_b0_4_921600 },
4749 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3B,
4750 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4751 pbn_b0_4_921600 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004752
4753 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550,
4754 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4755 pbn_b2_1_460800 },
4756 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_650,
4757 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4758 pbn_b2_1_460800 },
4759 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_850,
4760 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4761 pbn_b2_1_460800 },
4762 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_550,
4763 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4764 pbn_b2_bt_2_921600 },
4765 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_650,
4766 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4767 pbn_b2_bt_2_921600 },
4768 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_850,
4769 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4770 pbn_b2_bt_2_921600 },
4771 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_550,
4772 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4773 pbn_b2_bt_4_921600 },
4774 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_650,
4775 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4776 pbn_b2_bt_4_921600 },
4777 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_850,
4778 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4779 pbn_b2_bt_4_921600 },
4780 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_550,
4781 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4782 pbn_b0_1_921600 },
4783 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_650,
4784 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4785 pbn_b0_1_921600 },
4786 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_850,
4787 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4788 pbn_b0_1_921600 },
4789 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_550,
4790 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4791 pbn_b0_bt_2_921600 },
4792 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_650,
4793 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4794 pbn_b0_bt_2_921600 },
4795 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_850,
4796 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4797 pbn_b0_bt_2_921600 },
4798 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_550,
4799 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4800 pbn_b0_bt_4_921600 },
4801 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_650,
4802 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4803 pbn_b0_bt_4_921600 },
4804 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850,
4805 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4806 pbn_b0_bt_4_921600 },
Andrey Panin3ec9c592006-02-02 20:15:09 +00004807 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550,
4808 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4809 pbn_b0_bt_8_921600 },
4810 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650,
4811 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4812 pbn_b0_bt_8_921600 },
4813 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850,
4814 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4815 pbn_b0_bt_8_921600 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004816
4817 /*
4818 * Computone devices submitted by Doug McNash dmcnash@computone.com
4819 */
4820 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
4821 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG4,
4822 0, 0, pbn_computone_4 },
4823 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
4824 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG8,
4825 0, 0, pbn_computone_8 },
4826 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
4827 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG6,
4828 0, 0, pbn_computone_6 },
4829
4830 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI95N,
4831 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4832 pbn_oxsemi },
4833 { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
4834 PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0,
4835 pbn_b0_bt_1_921600 },
4836
4837 /*
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08004838 * Sunix PCI serial boards
Stephen Chiversabd7bac2013-01-28 19:49:20 +11004839 */
4840 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08004841 PCI_VENDOR_ID_SUNIX, 0x0001, 0, 0,
4842 pbn_sunix_pci_1s },
Stephen Chiversabd7bac2013-01-28 19:49:20 +11004843 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
Kai-Heng Feng8515dbc2019-08-10 03:01:29 +08004844 PCI_VENDOR_ID_SUNIX, 0x0002, 0, 0,
4845 pbn_sunix_pci_2s },
4846 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4847 PCI_VENDOR_ID_SUNIX, 0x0004, 0, 0,
4848 pbn_sunix_pci_4s },
4849 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4850 PCI_VENDOR_ID_SUNIX, 0x0084, 0, 0,
4851 pbn_sunix_pci_4s },
4852 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4853 PCI_VENDOR_ID_SUNIX, 0x0008, 0, 0,
4854 pbn_sunix_pci_8s },
4855 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4856 PCI_VENDOR_ID_SUNIX, 0x0088, 0, 0,
4857 pbn_sunix_pci_8s },
4858 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4859 PCI_VENDOR_ID_SUNIX, 0x0010, 0, 0,
4860 pbn_sunix_pci_16s },
Stephen Chiversabd7bac2013-01-28 19:49:20 +11004861
4862 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07004863 * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org>
4864 */
4865 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
4866 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4867 pbn_b0_bt_8_115200 },
4868 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
4869 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4870 pbn_b0_bt_8_115200 },
4871
4872 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
4873 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4874 pbn_b0_bt_2_115200 },
4875 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_A,
4876 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4877 pbn_b0_bt_2_115200 },
4878 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_B,
4879 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4880 pbn_b0_bt_2_115200 },
Lennert Buytenhekb87e5e22009-11-11 14:26:42 -08004881 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_A,
4882 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4883 pbn_b0_bt_2_115200 },
4884 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_B,
4885 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4886 pbn_b0_bt_2_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07004887 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_A,
4888 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4889 pbn_b0_bt_4_460800 },
4890 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_B,
4891 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4892 pbn_b0_bt_4_460800 },
4893 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_PLUS,
4894 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4895 pbn_b0_bt_2_460800 },
4896 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_A,
4897 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4898 pbn_b0_bt_2_460800 },
4899 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_B,
4900 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4901 pbn_b0_bt_2_460800 },
4902 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_SSERIAL,
4903 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4904 pbn_b0_bt_1_115200 },
4905 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650,
4906 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4907 pbn_b0_bt_1_460800 },
4908
4909 /*
Russell King1fb8cac2006-12-13 14:45:46 +00004910 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
4911 * Cards are identified by their subsystem vendor IDs, which
4912 * (in hex) match the model number.
4913 *
4914 * Note that JC140x are RS422/485 cards which require ox950
4915 * ACR = 0x10, and as such are not currently fully supported.
4916 */
4917 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4918 0x1204, 0x0004, 0, 0,
4919 pbn_b0_4_921600 },
4920 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4921 0x1208, 0x0004, 0, 0,
4922 pbn_b0_4_921600 },
4923/* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4924 0x1402, 0x0002, 0, 0,
4925 pbn_b0_2_921600 }, */
4926/* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4927 0x1404, 0x0004, 0, 0,
4928 pbn_b0_4_921600 }, */
4929 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1,
4930 0x1208, 0x0004, 0, 0,
4931 pbn_b0_4_921600 },
4932
Kiros Yeh2a52fcb2009-12-21 16:26:48 -08004933 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2,
4934 0x1204, 0x0004, 0, 0,
4935 pbn_b0_4_921600 },
4936 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2,
4937 0x1208, 0x0004, 0, 0,
4938 pbn_b0_4_921600 },
4939 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF3,
4940 0x1208, 0x0004, 0, 0,
4941 pbn_b0_4_921600 },
Russell King1fb8cac2006-12-13 14:45:46 +00004942 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07004943 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
4944 */
4945 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4,
4946 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4947 pbn_b1_1_1382400 },
4948
4949 /*
4950 * Dell Remote Access Card III - Tim_T_Murphy@Dell.com
4951 */
4952 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII,
4953 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4954 pbn_b1_1_1382400 },
4955
4956 /*
4957 * RAStel 2 port modem, gerg@moreton.com.au
4958 */
4959 { PCI_VENDOR_ID_MORETON, PCI_DEVICE_ID_RASTEL_2PORT,
4960 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4961 pbn_b2_bt_2_115200 },
4962
4963 /*
4964 * EKF addition for i960 Boards form EKF with serial port
4965 */
4966 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80960_RP,
4967 0xE4BF, PCI_ANY_ID, 0, 0,
4968 pbn_intel_i960 },
4969
4970 /*
4971 * Xircom Cardbus/Ethernet combos
4972 */
4973 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_X3201_MDM,
4974 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4975 pbn_b0_1_115200 },
4976 /*
4977 * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry)
4978 */
4979 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_RBM56G,
4980 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4981 pbn_b0_1_115200 },
4982
4983 /*
4984 * Untested PCI modems, sent in from various folks...
4985 */
4986
4987 /*
4988 * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de>
4989 */
4990 { PCI_VENDOR_ID_ROCKWELL, 0x1004,
4991 0x1048, 0x1500, 0, 0,
4992 pbn_b1_1_115200 },
4993
4994 { PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
4995 0xFF00, 0, 0, 0,
4996 pbn_sgi_ioc3 },
4997
4998 /*
4999 * HP Diva card
5000 */
5001 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
5002 PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0,
5003 pbn_b1_1_115200 },
5004 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
5005 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5006 pbn_b0_5_115200 },
5007 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
5008 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5009 pbn_b2_1_115200 },
Randy Wrighte0e24202021-05-14 10:26:54 -06005010 /* HPE PCI serial device */
5011 { PCI_VENDOR_ID_HP_3PAR, PCI_DEVICE_ID_HPE_PCI_SERIAL,
5012 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5013 pbn_b1_1_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07005014
Alon Bar-Levd9004eb2006-01-18 11:47:33 +00005015 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM2,
5016 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5017 pbn_b3_2_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07005018 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM4,
5019 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5020 pbn_b3_4_115200 },
5021 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8,
5022 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5023 pbn_b3_8_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07005024 /*
Adam Lee89c043a2015-08-03 13:28:13 +08005025 * Pericom PI7C9X795[1248] Uno/Dual/Quad/Octal UART
5026 */
5027 { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7951,
5028 PCI_ANY_ID, PCI_ANY_ID,
5029 0,
5030 0, pbn_pericom_PI7C9X7951 },
5031 { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7952,
5032 PCI_ANY_ID, PCI_ANY_ID,
5033 0,
5034 0, pbn_pericom_PI7C9X7952 },
5035 { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7954,
5036 PCI_ANY_ID, PCI_ANY_ID,
5037 0,
5038 0, pbn_pericom_PI7C9X7954 },
5039 { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7958,
5040 PCI_ANY_ID, PCI_ANY_ID,
5041 0,
5042 0, pbn_pericom_PI7C9X7958 },
5043 /*
Jimi Damonc8d19242016-07-20 17:00:40 -07005044 * ACCES I/O Products quad
5045 */
5046 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SDB,
5047 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005048 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005049 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2S,
5050 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005051 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005052 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB,
5053 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5054 pbn_pericom_PI7C9X7954 },
5055 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4S,
5056 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5057 pbn_pericom_PI7C9X7954 },
5058 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_2DB,
5059 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005060 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005061 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_2,
5062 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005063 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005064 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB,
5065 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5066 pbn_pericom_PI7C9X7954 },
5067 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_4,
5068 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5069 pbn_pericom_PI7C9X7954 },
5070 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SMDB,
5071 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005072 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005073 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2SM,
5074 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005075 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005076 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB,
5077 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5078 pbn_pericom_PI7C9X7954 },
5079 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4SM,
5080 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5081 pbn_pericom_PI7C9X7954 },
5082 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_1,
5083 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005084 pbn_pericom_PI7C9X7951 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005085 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_2,
5086 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005087 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005088 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_2,
5089 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005090 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005091 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4,
5092 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5093 pbn_pericom_PI7C9X7954 },
5094 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_4,
5095 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5096 pbn_pericom_PI7C9X7954 },
5097 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2S,
5098 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005099 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005100 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4S,
5101 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5102 pbn_pericom_PI7C9X7954 },
5103 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_2,
5104 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005105 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005106 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_2,
5107 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005108 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005109 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4,
5110 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5111 pbn_pericom_PI7C9X7954 },
5112 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_4,
5113 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5114 pbn_pericom_PI7C9X7954 },
5115 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2SM,
5116 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005117 pbn_pericom_PI7C9X7952 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005118 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM422_4,
5119 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005120 pbn_pericom_PI7C9X7954 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005121 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM485_4,
5122 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005123 pbn_pericom_PI7C9X7954 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005124 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM422_8,
5125 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5126 pbn_pericom_PI7C9X7958 },
5127 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM485_8,
5128 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5129 pbn_pericom_PI7C9X7958 },
5130 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4,
5131 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005132 pbn_pericom_PI7C9X7954 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005133 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_8,
5134 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5135 pbn_pericom_PI7C9X7958 },
5136 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SM,
5137 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005138 pbn_pericom_PI7C9X7954 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005139 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_8SM,
5140 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5141 pbn_pericom_PI7C9X7958 },
5142 { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM,
5143 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
Jay Dolanb896b032019-02-12 21:43:11 -08005144 pbn_pericom_PI7C9X7954 },
Jimi Damonc8d19242016-07-20 17:00:40 -07005145 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07005146 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
5147 */
5148 { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
5149 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5150 pbn_b0_1_115200 },
Niels de Vos84f8c6f2007-08-22 14:01:14 -07005151 /*
5152 * ITE
5153 */
5154 { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872,
5155 PCI_ANY_ID, PCI_ANY_ID,
5156 0, 0,
5157 pbn_b1_bt_1_115200 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07005158
5159 /*
Peter Horton737c1752006-08-26 09:07:36 +01005160 * IntaShield IS-200
5161 */
5162 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
5163 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
5164 pbn_b2_2_115200 },
Ignacio García Pérez4b6f6ce2008-05-23 13:04:28 -07005165 /*
5166 * IntaShield IS-400
5167 */
5168 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400,
5169 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */
5170 pbn_b2_4_115200 },
Peter Horton737c1752006-08-26 09:07:36 +01005171 /*
Nikola Ciprich9f2068f2018-02-13 15:04:46 +01005172 * BrainBoxes UC-260
5173 */
5174 { PCI_VENDOR_ID_INTASHIELD, 0x0D21,
5175 PCI_ANY_ID, PCI_ANY_ID,
5176 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00,
5177 pbn_b2_4_115200 },
5178 { PCI_VENDOR_ID_INTASHIELD, 0x0E34,
5179 PCI_ANY_ID, PCI_ANY_ID,
5180 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00,
5181 pbn_b2_4_115200 },
5182 /*
Thomas Hoehn48212002007-02-10 01:46:05 -08005183 * Perle PCI-RAS cards
5184 */
5185 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
5186 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
5187 0, 0, pbn_b2_4_921600 },
5188 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
5189 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
5190 0, 0, pbn_b2_8_921600 },
Alan Coxbf0df632007-10-16 01:24:00 -07005191
5192 /*
5193 * Mainpine series cards: Fairly standard layout but fools
5194 * parts of the autodetect in some cases and uses otherwise
5195 * unmatched communications subclasses in the PCI Express case
5196 */
5197
5198 { /* RockForceDUO */
5199 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5200 PCI_VENDOR_ID_MAINPINE, 0x0200,
5201 0, 0, pbn_b0_2_115200 },
5202 { /* RockForceQUATRO */
5203 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5204 PCI_VENDOR_ID_MAINPINE, 0x0300,
5205 0, 0, pbn_b0_4_115200 },
5206 { /* RockForceDUO+ */
5207 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5208 PCI_VENDOR_ID_MAINPINE, 0x0400,
5209 0, 0, pbn_b0_2_115200 },
5210 { /* RockForceQUATRO+ */
5211 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5212 PCI_VENDOR_ID_MAINPINE, 0x0500,
5213 0, 0, pbn_b0_4_115200 },
5214 { /* RockForce+ */
5215 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5216 PCI_VENDOR_ID_MAINPINE, 0x0600,
5217 0, 0, pbn_b0_2_115200 },
5218 { /* RockForce+ */
5219 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5220 PCI_VENDOR_ID_MAINPINE, 0x0700,
5221 0, 0, pbn_b0_4_115200 },
5222 { /* RockForceOCTO+ */
5223 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5224 PCI_VENDOR_ID_MAINPINE, 0x0800,
5225 0, 0, pbn_b0_8_115200 },
5226 { /* RockForceDUO+ */
5227 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5228 PCI_VENDOR_ID_MAINPINE, 0x0C00,
5229 0, 0, pbn_b0_2_115200 },
5230 { /* RockForceQUARTRO+ */
5231 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5232 PCI_VENDOR_ID_MAINPINE, 0x0D00,
5233 0, 0, pbn_b0_4_115200 },
5234 { /* RockForceOCTO+ */
5235 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5236 PCI_VENDOR_ID_MAINPINE, 0x1D00,
5237 0, 0, pbn_b0_8_115200 },
5238 { /* RockForceD1 */
5239 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5240 PCI_VENDOR_ID_MAINPINE, 0x2000,
5241 0, 0, pbn_b0_1_115200 },
5242 { /* RockForceF1 */
5243 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5244 PCI_VENDOR_ID_MAINPINE, 0x2100,
5245 0, 0, pbn_b0_1_115200 },
5246 { /* RockForceD2 */
5247 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5248 PCI_VENDOR_ID_MAINPINE, 0x2200,
5249 0, 0, pbn_b0_2_115200 },
5250 { /* RockForceF2 */
5251 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5252 PCI_VENDOR_ID_MAINPINE, 0x2300,
5253 0, 0, pbn_b0_2_115200 },
5254 { /* RockForceD4 */
5255 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5256 PCI_VENDOR_ID_MAINPINE, 0x2400,
5257 0, 0, pbn_b0_4_115200 },
5258 { /* RockForceF4 */
5259 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5260 PCI_VENDOR_ID_MAINPINE, 0x2500,
5261 0, 0, pbn_b0_4_115200 },
5262 { /* RockForceD8 */
5263 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5264 PCI_VENDOR_ID_MAINPINE, 0x2600,
5265 0, 0, pbn_b0_8_115200 },
5266 { /* RockForceF8 */
5267 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5268 PCI_VENDOR_ID_MAINPINE, 0x2700,
5269 0, 0, pbn_b0_8_115200 },
5270 { /* IQ Express D1 */
5271 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5272 PCI_VENDOR_ID_MAINPINE, 0x3000,
5273 0, 0, pbn_b0_1_115200 },
5274 { /* IQ Express F1 */
5275 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5276 PCI_VENDOR_ID_MAINPINE, 0x3100,
5277 0, 0, pbn_b0_1_115200 },
5278 { /* IQ Express D2 */
5279 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5280 PCI_VENDOR_ID_MAINPINE, 0x3200,
5281 0, 0, pbn_b0_2_115200 },
5282 { /* IQ Express F2 */
5283 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5284 PCI_VENDOR_ID_MAINPINE, 0x3300,
5285 0, 0, pbn_b0_2_115200 },
5286 { /* IQ Express D4 */
5287 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5288 PCI_VENDOR_ID_MAINPINE, 0x3400,
5289 0, 0, pbn_b0_4_115200 },
5290 { /* IQ Express F4 */
5291 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5292 PCI_VENDOR_ID_MAINPINE, 0x3500,
5293 0, 0, pbn_b0_4_115200 },
5294 { /* IQ Express D8 */
5295 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5296 PCI_VENDOR_ID_MAINPINE, 0x3C00,
5297 0, 0, pbn_b0_8_115200 },
5298 { /* IQ Express F8 */
5299 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
5300 PCI_VENDOR_ID_MAINPINE, 0x3D00,
5301 0, 0, pbn_b0_8_115200 },
5302
5303
Thomas Hoehn48212002007-02-10 01:46:05 -08005304 /*
Olof Johanssonaa798502007-08-22 14:01:55 -07005305 * PA Semi PA6T-1682M on-chip UART
5306 */
5307 { PCI_VENDOR_ID_PASEMI, 0xa004,
5308 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5309 pbn_pasemi_1682M },
5310
5311 /*
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01005312 * National Instruments
5313 */
Will Page04bf7e72009-04-06 17:32:15 +01005314 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI23216,
5315 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5316 pbn_b1_16_115200 },
5317 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2328,
5318 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5319 pbn_b1_8_115200 },
5320 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324,
5321 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5322 pbn_b1_bt_4_115200 },
5323 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322,
5324 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5325 pbn_b1_bt_2_115200 },
5326 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324I,
5327 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5328 pbn_b1_bt_4_115200 },
5329 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322I,
5330 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5331 pbn_b1_bt_2_115200 },
5332 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_23216,
5333 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5334 pbn_b1_16_115200 },
5335 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2328,
5336 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5337 pbn_b1_8_115200 },
5338 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2324,
5339 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5340 pbn_b1_bt_4_115200 },
5341 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2322,
5342 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5343 pbn_b1_bt_2_115200 },
5344 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2324,
5345 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5346 pbn_b1_bt_4_115200 },
5347 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2322,
5348 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5349 pbn_b1_bt_2_115200 },
Shawn Bohrer46a0fac2009-04-06 17:32:07 +01005350 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2322,
5351 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5352 pbn_ni8430_2 },
5353 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2322,
5354 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5355 pbn_ni8430_2 },
5356 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2324,
5357 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5358 pbn_ni8430_4 },
5359 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2324,
5360 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5361 pbn_ni8430_4 },
5362 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2328,
5363 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5364 pbn_ni8430_8 },
5365 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2328,
5366 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5367 pbn_ni8430_8 },
5368 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_23216,
5369 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5370 pbn_ni8430_16 },
5371 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_23216,
5372 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5373 pbn_ni8430_16 },
5374 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2322,
5375 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5376 pbn_ni8430_2 },
5377 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2322,
5378 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5379 pbn_ni8430_2 },
5380 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2324,
5381 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5382 pbn_ni8430_4 },
5383 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324,
5384 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5385 pbn_ni8430_4 },
5386
5387 /*
Kai-Heng Fengd193db72019-08-17 00:51:24 +08005388 * MOXA
5389 */
5390 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP102E,
5391 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5392 pbn_moxa8250_2p },
5393 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP102EL,
5394 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5395 pbn_moxa8250_2p },
5396 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP104EL_A,
5397 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5398 pbn_moxa8250_4p },
5399 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP114EL,
5400 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5401 pbn_moxa8250_4p },
5402 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP116E_A_A,
5403 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5404 pbn_moxa8250_8p },
5405 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP116E_A_B,
5406 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5407 pbn_moxa8250_8p },
5408 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP118EL_A,
5409 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5410 pbn_moxa8250_8p },
5411 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP118E_A_I,
5412 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5413 pbn_moxa8250_8p },
5414 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP132EL,
5415 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5416 pbn_moxa8250_2p },
5417 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP134EL_A,
5418 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5419 pbn_moxa8250_4p },
5420 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP138E_A,
5421 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5422 pbn_moxa8250_8p },
5423 { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP168EL_A,
5424 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5425 pbn_moxa8250_8p },
5426
5427 /*
Krauth.Julien02c9b5c2008-02-04 22:27:49 -08005428 * ADDI-DATA GmbH communication cards <info@addi-data.com>
5429 */
5430 { PCI_VENDOR_ID_ADDIDATA,
5431 PCI_DEVICE_ID_ADDIDATA_APCI7500,
5432 PCI_ANY_ID,
5433 PCI_ANY_ID,
5434 0,
5435 0,
5436 pbn_b0_4_115200 },
5437
5438 { PCI_VENDOR_ID_ADDIDATA,
5439 PCI_DEVICE_ID_ADDIDATA_APCI7420,
5440 PCI_ANY_ID,
5441 PCI_ANY_ID,
5442 0,
5443 0,
5444 pbn_b0_2_115200 },
5445
5446 { PCI_VENDOR_ID_ADDIDATA,
5447 PCI_DEVICE_ID_ADDIDATA_APCI7300,
5448 PCI_ANY_ID,
5449 PCI_ANY_ID,
5450 0,
5451 0,
5452 pbn_b0_1_115200 },
5453
Ian Abbott086231f2013-07-16 16:14:39 +01005454 { PCI_VENDOR_ID_AMCC,
Ian Abbott57c1f0e2013-07-16 16:14:40 +01005455 PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800,
Krauth.Julien02c9b5c2008-02-04 22:27:49 -08005456 PCI_ANY_ID,
5457 PCI_ANY_ID,
5458 0,
5459 0,
5460 pbn_b1_8_115200 },
5461
5462 { PCI_VENDOR_ID_ADDIDATA,
5463 PCI_DEVICE_ID_ADDIDATA_APCI7500_2,
5464 PCI_ANY_ID,
5465 PCI_ANY_ID,
5466 0,
5467 0,
5468 pbn_b0_4_115200 },
5469
5470 { PCI_VENDOR_ID_ADDIDATA,
5471 PCI_DEVICE_ID_ADDIDATA_APCI7420_2,
5472 PCI_ANY_ID,
5473 PCI_ANY_ID,
5474 0,
5475 0,
5476 pbn_b0_2_115200 },
5477
5478 { PCI_VENDOR_ID_ADDIDATA,
5479 PCI_DEVICE_ID_ADDIDATA_APCI7300_2,
5480 PCI_ANY_ID,
5481 PCI_ANY_ID,
5482 0,
5483 0,
5484 pbn_b0_1_115200 },
5485
5486 { PCI_VENDOR_ID_ADDIDATA,
5487 PCI_DEVICE_ID_ADDIDATA_APCI7500_3,
5488 PCI_ANY_ID,
5489 PCI_ANY_ID,
5490 0,
5491 0,
5492 pbn_b0_4_115200 },
5493
5494 { PCI_VENDOR_ID_ADDIDATA,
5495 PCI_DEVICE_ID_ADDIDATA_APCI7420_3,
5496 PCI_ANY_ID,
5497 PCI_ANY_ID,
5498 0,
5499 0,
5500 pbn_b0_2_115200 },
5501
5502 { PCI_VENDOR_ID_ADDIDATA,
5503 PCI_DEVICE_ID_ADDIDATA_APCI7300_3,
5504 PCI_ANY_ID,
5505 PCI_ANY_ID,
5506 0,
5507 0,
5508 pbn_b0_1_115200 },
5509
5510 { PCI_VENDOR_ID_ADDIDATA,
5511 PCI_DEVICE_ID_ADDIDATA_APCI7800_3,
5512 PCI_ANY_ID,
5513 PCI_ANY_ID,
5514 0,
5515 0,
5516 pbn_b0_8_115200 },
5517
Krauth.Julien1b62cbf2009-10-26 16:50:04 -07005518 { PCI_VENDOR_ID_ADDIDATA,
5519 PCI_DEVICE_ID_ADDIDATA_APCIe7500,
5520 PCI_ANY_ID,
5521 PCI_ANY_ID,
5522 0,
5523 0,
5524 pbn_ADDIDATA_PCIe_4_3906250 },
5525
5526 { PCI_VENDOR_ID_ADDIDATA,
5527 PCI_DEVICE_ID_ADDIDATA_APCIe7420,
5528 PCI_ANY_ID,
5529 PCI_ANY_ID,
5530 0,
5531 0,
5532 pbn_ADDIDATA_PCIe_2_3906250 },
5533
5534 { PCI_VENDOR_ID_ADDIDATA,
5535 PCI_DEVICE_ID_ADDIDATA_APCIe7300,
5536 PCI_ANY_ID,
5537 PCI_ANY_ID,
5538 0,
5539 0,
5540 pbn_ADDIDATA_PCIe_1_3906250 },
5541
5542 { PCI_VENDOR_ID_ADDIDATA,
5543 PCI_DEVICE_ID_ADDIDATA_APCIe7800,
5544 PCI_ANY_ID,
5545 PCI_ANY_ID,
5546 0,
5547 0,
5548 pbn_ADDIDATA_PCIe_8_3906250 },
5549
Jiri Slaby25cf9bc2009-01-15 13:30:34 +00005550 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
5551 PCI_VENDOR_ID_IBM, 0x0299,
5552 0, 0, pbn_b0_bt_2_115200 },
5553
Stefan Seyfried972ce082013-07-01 09:14:21 +02005554 /*
5555 * other NetMos 9835 devices are most likely handled by the
5556 * parport_serial driver, check drivers/parport/parport_serial.c
5557 * before adding them here.
5558 */
5559
Michael Bueschc4285b42009-06-30 11:41:21 -07005560 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901,
5561 0xA000, 0x1000,
5562 0, 0, pbn_b0_1_115200 },
5563
Nicos Gollan7808edc2011-05-05 21:00:37 +02005564 /* the 9901 is a rebranded 9912 */
5565 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912,
5566 0xA000, 0x1000,
5567 0, 0, pbn_b0_1_115200 },
5568
5569 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922,
5570 0xA000, 0x1000,
5571 0, 0, pbn_b0_1_115200 },
5572
5573 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9904,
5574 0xA000, 0x1000,
5575 0, 0, pbn_b0_1_115200 },
5576
5577 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
5578 0xA000, 0x1000,
5579 0, 0, pbn_b0_1_115200 },
5580
5581 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
5582 0xA000, 0x3002,
5583 0, 0, pbn_NETMOS9900_2s_115200 },
5584
Krauth.Julien02c9b5c2008-02-04 22:27:49 -08005585 /*
Eric Smith44178172011-07-11 22:53:13 -06005586 * Best Connectivity and Rosewill PCI Multi I/O cards
Ira W. Snyderac6ec5b2009-12-21 16:26:45 -08005587 */
5588
5589 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
5590 0xA000, 0x1000,
5591 0, 0, pbn_b0_1_115200 },
5592
5593 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
Eric Smith44178172011-07-11 22:53:13 -06005594 0xA000, 0x3002,
5595 0, 0, pbn_b0_bt_2_115200 },
5596
5597 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
Ira W. Snyderac6ec5b2009-12-21 16:26:45 -08005598 0xA000, 0x3004,
5599 0, 0, pbn_b0_bt_4_115200 },
Dirk Brandewie095e24b2010-11-17 07:35:20 -08005600 /* Intel CE4100 */
5601 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100_UART,
5602 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5603 pbn_ce4100_1_115200 },
Mika Westerberg6c55d9b2016-01-29 16:49:47 +02005604
Antony Pavlovd9a0fbf2011-05-18 22:38:30 +04005605 /*
5606 * Cronyx Omega PCI
5607 */
5608 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
5609 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5610 pbn_omegapci },
Ira W. Snyderac6ec5b2009-12-21 16:26:45 -08005611
5612 /*
Stephen Hurdebebd492013-01-17 14:14:53 -08005613 * Broadcom TruManage
5614 */
5615 { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
5616 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5617 pbn_brcm_trumanage },
5618
5619 /*
Alan Cox66835492012-08-16 12:01:33 +01005620 * AgeStar as-prs2-009
5621 */
5622 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,
5623 PCI_ANY_ID, PCI_ANY_ID,
5624 0, 0, pbn_b0_bt_2_115200 },
Alan Cox27788c52012-09-04 16:21:06 +01005625
5626 /*
5627 * WCH CH353 series devices: The 2S1P is handled by parport_serial
5628 * so not listed here.
5629 */
5630 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_4S,
5631 PCI_ANY_ID, PCI_ANY_ID,
5632 0, 0, pbn_b0_bt_4_115200 },
5633
5634 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_2S1PF,
5635 PCI_ANY_ID, PCI_ANY_ID,
5636 0, 0, pbn_b0_bt_2_115200 },
5637
Alexandr Petrenko55c368c2016-05-23 10:04:54 +03005638 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH355_4S,
5639 PCI_ANY_ID, PCI_ANY_ID,
5640 0, 0, pbn_b0_bt_4_115200 },
5641
Jeremy McNicoll7dde5572016-02-02 13:00:45 -08005642 { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH382_2S,
5643 PCI_ANY_ID, PCI_ANY_ID,
5644 0, 0, pbn_wch382_2 },
5645
Sergej Pupykin72a3c0e2014-12-30 16:16:50 +03005646 { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH384_4S,
5647 PCI_ANY_ID, PCI_ANY_ID,
5648 0, 0, pbn_wch384_4 },
5649
Du Huanpeng04b6ff52020-08-22 09:47:28 +08005650 { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH384_8S,
5651 PCI_ANY_ID, PCI_ANY_ID,
5652 0, 0, pbn_wch384_8 },
Tobias Diedrich3c5a87b2020-09-14 19:36:28 +02005653 /*
5654 * Realtek RealManage
5655 */
5656 { PCI_VENDOR_ID_REALTEK, 0x816a,
5657 PCI_ANY_ID, PCI_ANY_ID,
5658 0, 0, pbn_b0_1_115200 },
5659
5660 { PCI_VENDOR_ID_REALTEK, 0x816b,
5661 PCI_ANY_ID, PCI_ANY_ID,
5662 0, 0, pbn_b0_1_115200 },
Du Huanpeng04b6ff52020-08-22 09:47:28 +08005663
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07005664 /* Fintek PCI serial cards */
5665 { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 },
5666 { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },
5667 { PCI_DEVICE(0x1c29, 0x1112), .driver_data = pbn_fintek_12 },
Ji-Ze Hong (Peter Hong)68e26a82019-08-16 13:27:29 +08005668 { PCI_DEVICE(0x1c29, 0x1204), .driver_data = pbn_fintek_F81504A },
5669 { PCI_DEVICE(0x1c29, 0x1208), .driver_data = pbn_fintek_F81508A },
5670 { PCI_DEVICE(0x1c29, 0x1212), .driver_data = pbn_fintek_F81512A },
Greg Kroah-Hartman2c62a3c2013-10-17 10:44:26 -07005671
Ian Abbott1c9c8582017-02-03 20:25:00 +00005672 /* MKS Tenta SCOM-080x serial cards */
5673 { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 },
5674 { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 },
5675
Matt Wilson3bfd1302017-11-13 11:31:31 -08005676 /* Amazon PCI serial device */
5677 { PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 },
5678
Matt Schulte14faa8c2012-11-21 10:35:15 -06005679 /*
Linus Torvalds1da177e2005-04-16 15:20:36 -07005680 * These entries match devices with class COMMUNICATION_SERIAL,
5681 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
5682 */
5683 { PCI_ANY_ID, PCI_ANY_ID,
5684 PCI_ANY_ID, PCI_ANY_ID,
5685 PCI_CLASS_COMMUNICATION_SERIAL << 8,
5686 0xffff00, pbn_default },
5687 { PCI_ANY_ID, PCI_ANY_ID,
5688 PCI_ANY_ID, PCI_ANY_ID,
5689 PCI_CLASS_COMMUNICATION_MODEM << 8,
5690 0xffff00, pbn_default },
5691 { PCI_ANY_ID, PCI_ANY_ID,
5692 PCI_ANY_ID, PCI_ANY_ID,
5693 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
5694 0xffff00, pbn_default },
5695 { 0, }
5696};
5697
Michael Reed28071902011-05-31 12:06:28 -05005698static pci_ers_result_t serial8250_io_error_detected(struct pci_dev *dev,
5699 pci_channel_state_t state)
5700{
5701 struct serial_private *priv = pci_get_drvdata(dev);
5702
5703 if (state == pci_channel_io_perm_failure)
5704 return PCI_ERS_RESULT_DISCONNECT;
5705
5706 if (priv)
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -02005707 pciserial_detach_ports(priv);
Michael Reed28071902011-05-31 12:06:28 -05005708
5709 pci_disable_device(dev);
5710
5711 return PCI_ERS_RESULT_NEED_RESET;
5712}
5713
5714static pci_ers_result_t serial8250_io_slot_reset(struct pci_dev *dev)
5715{
5716 int rc;
5717
5718 rc = pci_enable_device(dev);
5719
5720 if (rc)
5721 return PCI_ERS_RESULT_DISCONNECT;
5722
5723 pci_restore_state(dev);
5724 pci_save_state(dev);
5725
5726 return PCI_ERS_RESULT_RECOVERED;
5727}
5728
5729static void serial8250_io_resume(struct pci_dev *dev)
5730{
5731 struct serial_private *priv = pci_get_drvdata(dev);
Gabriel Krisman Bertazic130b662016-12-28 16:42:00 -02005732 struct serial_private *new;
Michael Reed28071902011-05-31 12:06:28 -05005733
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -02005734 if (!priv)
5735 return;
5736
Gabriel Krisman Bertazic130b662016-12-28 16:42:00 -02005737 new = pciserial_init_ports(dev, priv->board);
5738 if (!IS_ERR(new)) {
5739 pci_set_drvdata(dev, new);
5740 kfree(priv);
Gabriel Krisman Bertazif209fa02016-11-28 19:34:42 -02005741 }
Michael Reed28071902011-05-31 12:06:28 -05005742}
5743
Stephen Hemminger1d352032012-09-07 09:33:17 -07005744static const struct pci_error_handlers serial8250_err_handler = {
Michael Reed28071902011-05-31 12:06:28 -05005745 .error_detected = serial8250_io_error_detected,
5746 .slot_reset = serial8250_io_slot_reset,
5747 .resume = serial8250_io_resume,
5748};
5749
Linus Torvalds1da177e2005-04-16 15:20:36 -07005750static struct pci_driver serial_pci_driver = {
5751 .name = "serial",
5752 .probe = pciserial_init_one,
Bill Pemberton2d47b712012-11-19 13:21:34 -05005753 .remove = pciserial_remove_one,
Andy Shevchenko61702c32015-02-02 14:53:26 +02005754 .driver = {
5755 .pm = &pciserial_pm_ops,
5756 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07005757 .id_table = serial_pci_tbl,
Michael Reed28071902011-05-31 12:06:28 -05005758 .err_handler = &serial8250_err_handler,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005759};
5760
Wei Yongjun15a12e82012-10-26 23:04:22 +08005761module_pci_driver(serial_pci_driver);
Linus Torvalds1da177e2005-04-16 15:20:36 -07005762
5763MODULE_LICENSE("GPL");
5764MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
5765MODULE_DEVICE_TABLE(pci, serial_pci_tbl);