2 * Probe module for 8250/16550-type PCI serial ports.
4 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
6 * Copyright (C) 2001 Russell King, All Rights Reserved.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License.
13 #include <linux/module.h>
14 #include <linux/pci.h>
15 #include <linux/string.h>
16 #include <linux/kernel.h>
17 #include <linux/slab.h>
18 #include <linux/delay.h>
19 #include <linux/tty.h>
20 #include <linux/serial_reg.h>
21 #include <linux/serial_core.h>
22 #include <linux/8250_pci.h>
23 #include <linux/bitops.h>
25 #include <asm/byteorder.h>
31 * init function returns:
32 * > 0 - number of ports
33 * = 0 - use board->num_ports
36 struct pci_serial_quirk {
41 int (*probe)(struct pci_dev *dev);
42 int (*init)(struct pci_dev *dev);
43 int (*setup)(struct serial_private *,
44 const struct pciserial_board *,
45 struct uart_8250_port *, int);
46 void (*exit)(struct pci_dev *dev);
49 #define PCI_NUM_BAR_RESOURCES 6
51 struct serial_private {
54 void __iomem *remapped_bar[PCI_NUM_BAR_RESOURCES];
55 struct pci_serial_quirk *quirk;
59 static int pci_default_setup(struct serial_private*,
60 const struct pciserial_board*, struct uart_8250_port *, int);
62 static void moan_device(const char *str, struct pci_dev *dev)
66 "Please send the output of lspci -vv, this\n"
67 "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
68 "manufacturer and name of serial board or\n"
69 "modem board to rmk+serial@arm.linux.org.uk.\n",
70 pci_name(dev), str, dev->vendor, dev->device,
71 dev->subsystem_vendor, dev->subsystem_device);
75 setup_port(struct serial_private *priv, struct uart_8250_port *port,
76 int bar, int offset, int regshift)
78 struct pci_dev *dev = priv->dev;
79 unsigned long base, len;
81 if (bar >= PCI_NUM_BAR_RESOURCES)
84 base = pci_resource_start(dev, bar);
86 if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
87 len = pci_resource_len(dev, bar);
89 if (!priv->remapped_bar[bar])
90 priv->remapped_bar[bar] = ioremap_nocache(base, len);
91 if (!priv->remapped_bar[bar])
94 port->port.iotype = UPIO_MEM;
95 port->port.iobase = 0;
96 port->port.mapbase = base + offset;
97 port->port.membase = priv->remapped_bar[bar] + offset;
98 port->port.regshift = regshift;
100 port->port.iotype = UPIO_PORT;
101 port->port.iobase = base + offset;
102 port->port.mapbase = 0;
103 port->port.membase = NULL;
104 port->port.regshift = 0;
110 * ADDI-DATA GmbH communication cards <info@addi-data.com>
112 static int addidata_apci7800_setup(struct serial_private *priv,
113 const struct pciserial_board *board,
114 struct uart_8250_port *port, int idx)
116 unsigned int bar = 0, offset = board->first_offset;
117 bar = FL_GET_BASE(board->flags);
120 offset += idx * board->uart_offset;
121 } else if ((idx >= 2) && (idx < 4)) {
123 offset += ((idx - 2) * board->uart_offset);
124 } else if ((idx >= 4) && (idx < 6)) {
126 offset += ((idx - 4) * board->uart_offset);
127 } else if (idx >= 6) {
129 offset += ((idx - 6) * board->uart_offset);
132 return setup_port(priv, port, bar, offset, board->reg_shift);
136 * AFAVLAB uses a different mixture of BARs and offsets
137 * Not that ugly ;) -- HW
140 afavlab_setup(struct serial_private *priv, const struct pciserial_board *board,
141 struct uart_8250_port *port, int idx)
143 unsigned int bar, offset = board->first_offset;
145 bar = FL_GET_BASE(board->flags);
150 offset += (idx - 4) * board->uart_offset;
153 return setup_port(priv, port, bar, offset, board->reg_shift);
157 * HP's Remote Management Console. The Diva chip came in several
158 * different versions. N-class, L2000 and A500 have two Diva chips, each
159 * with 3 UARTs (the third UART on the second chip is unused). Superdome
160 * and Keystone have one Diva chip with 3 UARTs. Some later machines have
161 * one Diva chip, but it has been expanded to 5 UARTs.
163 static int pci_hp_diva_init(struct pci_dev *dev)
167 switch (dev->subsystem_device) {
168 case PCI_DEVICE_ID_HP_DIVA_TOSCA1:
169 case PCI_DEVICE_ID_HP_DIVA_HALFDOME:
170 case PCI_DEVICE_ID_HP_DIVA_KEYSTONE:
171 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
174 case PCI_DEVICE_ID_HP_DIVA_TOSCA2:
177 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
180 case PCI_DEVICE_ID_HP_DIVA_POWERBAR:
181 case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
190 * HP's Diva chip puts the 4th/5th serial port further out, and
191 * some serial ports are supposed to be hidden on certain models.
194 pci_hp_diva_setup(struct serial_private *priv,
195 const struct pciserial_board *board,
196 struct uart_8250_port *port, int idx)
198 unsigned int offset = board->first_offset;
199 unsigned int bar = FL_GET_BASE(board->flags);
201 switch (priv->dev->subsystem_device) {
202 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
206 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
216 offset += idx * board->uart_offset;
218 return setup_port(priv, port, bar, offset, board->reg_shift);
222 * Added for EKF Intel i960 serial boards
224 static int pci_inteli960ni_init(struct pci_dev *dev)
226 unsigned long oldval;
228 if (!(dev->subsystem_device & 0x1000))
231 /* is firmware started? */
232 pci_read_config_dword(dev, 0x44, (void *)&oldval);
233 if (oldval == 0x00001000L) { /* RESET value */
234 dev_dbg(&dev->dev, "Local i960 firmware missing\n");
241 * Some PCI serial cards using the PLX 9050 PCI interface chip require
242 * that the card interrupt be explicitly enabled or disabled. This
243 * seems to be mainly needed on card using the PLX which also use I/O
246 static int pci_plx9050_init(struct pci_dev *dev)
251 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) {
252 moan_device("no memory in bar 0", dev);
257 if (dev->vendor == PCI_VENDOR_ID_PANACOM ||
258 dev->subsystem_vendor == PCI_SUBVENDOR_ID_EXSYS)
261 if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
262 (dev->device == PCI_DEVICE_ID_PLX_ROMULUS))
264 * As the megawolf cards have the int pins active
265 * high, and have 2 UART chips, both ints must be
266 * enabled on the 9050. Also, the UARTS are set in
267 * 16450 mode by default, so we have to enable the
268 * 16C950 'enhanced' mode so that we can use the
273 * enable/disable interrupts
275 p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
278 writel(irq_config, p + 0x4c);
281 * Read the register back to ensure that it took effect.
289 static void pci_plx9050_exit(struct pci_dev *dev)
293 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0)
299 p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
304 * Read the register back to ensure that it took effect.
311 #define NI8420_INT_ENABLE_REG 0x38
312 #define NI8420_INT_ENABLE_BIT 0x2000
314 static void pci_ni8420_exit(struct pci_dev *dev)
317 unsigned long base, len;
318 unsigned int bar = 0;
320 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
321 moan_device("no memory in bar", dev);
325 base = pci_resource_start(dev, bar);
326 len = pci_resource_len(dev, bar);
327 p = ioremap_nocache(base, len);
331 /* Disable the CPU Interrupt */
332 writel(readl(p + NI8420_INT_ENABLE_REG) & ~(NI8420_INT_ENABLE_BIT),
333 p + NI8420_INT_ENABLE_REG);
339 #define MITE_IOWBSR1 0xc4
340 #define MITE_IOWCR1 0xf4
341 #define MITE_LCIMR1 0x08
342 #define MITE_LCIMR2 0x10
344 #define MITE_LCIMR2_CLR_CPU_IE (1 << 30)
346 static void pci_ni8430_exit(struct pci_dev *dev)
349 unsigned long base, len;
350 unsigned int bar = 0;
352 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
353 moan_device("no memory in bar", dev);
357 base = pci_resource_start(dev, bar);
358 len = pci_resource_len(dev, bar);
359 p = ioremap_nocache(base, len);
363 /* Disable the CPU Interrupt */
364 writel(MITE_LCIMR2_CLR_CPU_IE, p + MITE_LCIMR2);
368 /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
370 sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
371 struct uart_8250_port *port, int idx)
373 unsigned int bar, offset = board->first_offset;
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 */
386 return setup_port(priv, port, bar, offset, board->reg_shift);
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.
396 /* global control register offset for SBS PMC-OctalPro */
397 #define OCT_REG_CR_OFF 0x500
399 static int sbs_init(struct pci_dev *dev)
403 p = pci_ioremap_bar(dev, 0);
407 /* Set bit-4 Control Register (UART RESET) in to reset the uarts */
408 writeb(0x10, p + OCT_REG_CR_OFF);
410 writeb(0x0, p + OCT_REG_CR_OFF);
412 /* Set bit-2 (INTENABLE) of Control Register */
413 writeb(0x4, p + OCT_REG_CR_OFF);
420 * Disables the global interrupt of PMC-OctalPro
423 static void sbs_exit(struct pci_dev *dev)
427 p = pci_ioremap_bar(dev, 0);
428 /* FIXME: What if resource_len < OCT_REG_CR_OFF */
430 writeb(0, p + OCT_REG_CR_OFF);
435 * SIIG serial cards have an PCI interface chip which also controls
436 * the UART clocking frequency. Each UART can be clocked independently
437 * (except cards equipped with 4 UARTs) and initial clocking settings
438 * 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).
445 * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999
447 * 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.
452 * Note: all 10x cards have PCI device ids 0x10..
453 * all 20x cards have PCI device ids 0x20..
455 * There are also Quartet Serial cards which use Oxford Semiconductor
456 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
458 * Note: some SIIG cards are probed by the parport_serial object.
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)
464 static int pci_siig10x_init(struct pci_dev *dev)
469 switch (dev->device & 0xfff8) {
470 case PCI_DEVICE_ID_SIIG_1S_10x: /* 1S */
473 case PCI_DEVICE_ID_SIIG_2S_10x: /* 2S, 2S1P */
476 default: /* 1S1P, 4S */
481 p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
485 writew(readw(p + 0x28) & data, p + 0x28);
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)
494 static int pci_siig20x_init(struct pci_dev *dev)
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);
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);
511 static int pci_siig_init(struct pci_dev *dev)
513 unsigned int type = dev->device & 0xff00;
516 return pci_siig10x_init(dev);
517 else if (type == 0x2000)
518 return pci_siig20x_init(dev);
520 moan_device("Unknown SIIG card", dev);
524 static int pci_siig_setup(struct serial_private *priv,
525 const struct pciserial_board *board,
526 struct uart_8250_port *port, int idx)
528 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
532 offset = (idx - 4) * 8;
535 return setup_port(priv, port, bar, offset, 0);
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.
543 static const unsigned short timedia_single_port[] = {
544 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
547 static const unsigned short timedia_dual_port[] = {
548 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
549 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
550 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
551 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
555 static const unsigned short timedia_quad_port[] = {
556 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
557 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
558 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
562 static const unsigned short timedia_eight_port[] = {
563 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
564 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
567 static const struct timedia_struct {
569 const unsigned short *ids;
571 { 1, timedia_single_port },
572 { 2, timedia_dual_port },
573 { 4, timedia_quad_port },
574 { 8, timedia_eight_port }
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.
583 static int pci_timedia_probe(struct pci_dev *dev)
586 * Check the third digit of the subdevice ID
587 * (0,2,3,5,6: serial only -- 7,8,9: serial + parallel)
589 if ((dev->subsystem_device & 0x00f0) >= 0x70) {
591 "ignoring Timedia subdevice %04x for parport_serial\n",
592 dev->subsystem_device);
599 static int pci_timedia_init(struct pci_dev *dev)
601 const unsigned short *ids;
604 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
605 ids = timedia_data[i].ids;
606 for (j = 0; ids[j]; j++)
607 if (dev->subsystem_device == ids[j])
608 return timedia_data[i].num;
614 * Timedia/SUNIX uses a mixture of BARs and offsets
615 * Ugh, this is ugly as all hell --- TYT
618 pci_timedia_setup(struct serial_private *priv,
619 const struct pciserial_board *board,
620 struct uart_8250_port *port, int idx)
622 unsigned int bar = 0, offset = board->first_offset;
629 offset = board->uart_offset;
636 offset = board->uart_offset;
645 return setup_port(priv, port, bar, offset, board->reg_shift);
649 * Some Titan cards are also a little weird
652 titan_400l_800l_setup(struct serial_private *priv,
653 const struct pciserial_board *board,
654 struct uart_8250_port *port, int idx)
656 unsigned int bar, offset = board->first_offset;
667 offset = (idx - 2) * board->uart_offset;
670 return setup_port(priv, port, bar, offset, board->reg_shift);
673 static int pci_xircom_init(struct pci_dev *dev)
679 static int pci_ni8420_init(struct pci_dev *dev)
682 unsigned long base, len;
683 unsigned int bar = 0;
685 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
686 moan_device("no memory in bar", dev);
690 base = pci_resource_start(dev, bar);
691 len = pci_resource_len(dev, bar);
692 p = ioremap_nocache(base, len);
696 /* Enable CPU Interrupt */
697 writel(readl(p + NI8420_INT_ENABLE_REG) | NI8420_INT_ENABLE_BIT,
698 p + NI8420_INT_ENABLE_REG);
704 #define MITE_IOWBSR1_WSIZE 0xa
705 #define MITE_IOWBSR1_WIN_OFFSET 0x800
706 #define MITE_IOWBSR1_WENAB (1 << 7)
707 #define MITE_LCIMR1_IO_IE_0 (1 << 24)
708 #define MITE_LCIMR2_SET_CPU_IE (1 << 31)
709 #define MITE_IOWCR1_RAMSEL_MASK 0xfffffffe
711 static int pci_ni8430_init(struct pci_dev *dev)
714 unsigned long base, len;
716 unsigned int bar = 0;
718 if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) {
719 moan_device("no memory in bar", dev);
723 base = pci_resource_start(dev, bar);
724 len = pci_resource_len(dev, bar);
725 p = ioremap_nocache(base, len);
729 /* Set device window address and size in BAR0 */
730 device_window = ((base + MITE_IOWBSR1_WIN_OFFSET) & 0xffffff00)
731 | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE;
732 writel(device_window, p + MITE_IOWBSR1);
734 /* Set window access to go to RAMSEL IO address space */
735 writel((readl(p + MITE_IOWCR1) & MITE_IOWCR1_RAMSEL_MASK),
738 /* Enable IO Bus Interrupt 0 */
739 writel(MITE_LCIMR1_IO_IE_0, p + MITE_LCIMR1);
741 /* Enable CPU Interrupt */
742 writel(MITE_LCIMR2_SET_CPU_IE, p + MITE_LCIMR2);
748 /* UART Port Control Register */
749 #define NI8430_PORTCON 0x0f
750 #define NI8430_PORTCON_TXVR_ENABLE (1 << 3)
753 pci_ni8430_setup(struct serial_private *priv,
754 const struct pciserial_board *board,
755 struct uart_8250_port *port, int idx)
758 unsigned long base, len;
759 unsigned int bar, offset = board->first_offset;
761 if (idx >= board->num_ports)
764 bar = FL_GET_BASE(board->flags);
765 offset += idx * board->uart_offset;
767 base = pci_resource_start(priv->dev, bar);
768 len = pci_resource_len(priv->dev, bar);
769 p = ioremap_nocache(base, len);
771 /* enable the transceiver */
772 writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE,
773 p + offset + NI8430_PORTCON);
777 return setup_port(priv, port, bar, offset, board->reg_shift);
780 static int pci_netmos_9900_setup(struct serial_private *priv,
781 const struct pciserial_board *board,
782 struct uart_8250_port *port, int idx)
786 if ((priv->dev->subsystem_device & 0xff00) == 0x3000) {
787 /* netmos apparently orders BARs by datasheet layout, so serial
788 * ports get BARs 0 and 3 (or 1 and 4 for memmapped)
792 return setup_port(priv, port, bar, 0, board->reg_shift);
794 return pci_default_setup(priv, board, port, idx);
798 /* the 99xx series comes with a range of device IDs and a variety
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
806 static int pci_netmos_9900_numports(struct pci_dev *dev)
808 unsigned int c = dev->class;
810 unsigned short sub_serports;
816 } else if ((pi == 0) &&
817 (dev->device == PCI_DEVICE_ID_NETMOS_9900)) {
818 /* 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.
824 sub_serports = dev->subsystem_device & 0xf;
825 if (sub_serports > 0) {
828 dev_err(&dev->dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
833 moan_device("unknown NetMos/Mostech program interface", dev);
837 static int pci_netmos_init(struct pci_dev *dev)
839 /* subdevice 0x00PS means <P> parallel, <S> serial */
840 unsigned int num_serial = dev->subsystem_device & 0xf;
842 if ((dev->device == PCI_DEVICE_ID_NETMOS_9901) ||
843 (dev->device == PCI_DEVICE_ID_NETMOS_9865))
846 if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
847 dev->subsystem_device == 0x0299)
850 switch (dev->device) { /* FALLTHROUGH on all */
851 case PCI_DEVICE_ID_NETMOS_9904:
852 case PCI_DEVICE_ID_NETMOS_9912:
853 case PCI_DEVICE_ID_NETMOS_9922:
854 case PCI_DEVICE_ID_NETMOS_9900:
855 num_serial = pci_netmos_9900_numports(dev);
859 if (num_serial == 0 ) {
860 moan_device("unknown NetMos/Mostech device", dev);
871 * These chips are available with optionally one parallel port and up to
872 * two serial ports. Unfortunately they all have the same product id.
874 * Basic configuration is done over a region of 32 I/O ports. The base
875 * ioport is called INTA or INTC, depending on docs/other drivers.
877 * The region of the 32 I/O ports is configured in POSIO0R...
881 #define ITE_887x_MISCR 0x9c
882 #define ITE_887x_INTCBAR 0x78
883 #define ITE_887x_UARTBAR 0x7c
884 #define ITE_887x_PS0BAR 0x10
885 #define ITE_887x_POSIO0 0x60
888 #define ITE_887x_IOSIZE 32
889 /* I/O space size (bits 26-24; 8 bytes = 011b) */
890 #define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
891 /* I/O space size (bits 26-24; 32 bytes = 101b) */
892 #define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
893 /* Decoding speed (1 = slow, 2 = medium, 3 = fast) */
894 #define ITE_887x_POSIO_SPEED (3 << 29)
895 /* enable IO_Space bit */
896 #define ITE_887x_POSIO_ENABLE (1 << 31)
898 static int pci_ite887x_init(struct pci_dev *dev)
900 /* inta_addr are the configuration addresses of the ITE */
901 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
904 struct resource *iobase = NULL;
905 u32 miscr, uartbar, ioport;
907 /* search for the base-ioport */
909 while (inta_addr[i] && iobase == NULL) {
910 iobase = request_region(inta_addr[i], ITE_887x_IOSIZE,
912 if (iobase != NULL) {
913 /* write POSIO0R - speed | size | ioport */
914 pci_write_config_dword(dev, ITE_887x_POSIO0,
915 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
916 ITE_887x_POSIO_IOSIZE_32 | inta_addr[i]);
917 /* write INTCBAR - ioport */
918 pci_write_config_dword(dev, ITE_887x_INTCBAR,
920 ret = inb(inta_addr[i]);
922 /* ioport connected */
925 release_region(iobase->start, ITE_887x_IOSIZE);
932 dev_err(&dev->dev, "ite887x: could not find iobase\n");
936 /* start of undocumented type checking (see parport_pc.c) */
937 type = inb(iobase->start + 0x18) & 0x0f;
940 case 0x2: /* ITE8871 (1P) */
941 case 0xa: /* ITE8875 (1P) */
944 case 0xe: /* ITE8872 (2S1P) */
947 case 0x6: /* ITE8873 (1S) */
950 case 0x8: /* ITE8874 (2S) */
954 moan_device("Unknown ITE887x", dev);
958 /* configure all serial ports */
959 for (i = 0; i < ret; i++) {
960 /* read the I/O port from the device */
961 pci_read_config_dword(dev, ITE_887x_PS0BAR + (0x4 * (i + 1)),
963 ioport &= 0x0000FF00; /* the actual base address */
964 pci_write_config_dword(dev, ITE_887x_POSIO0 + (0x4 * (i + 1)),
965 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
966 ITE_887x_POSIO_IOSIZE_8 | ioport);
968 /* write the ioport to the UARTBAR */
969 pci_read_config_dword(dev, ITE_887x_UARTBAR, &uartbar);
970 uartbar &= ~(0xffff << (16 * i)); /* clear half the reg */
971 uartbar |= (ioport << (16 * i)); /* set the ioport */
972 pci_write_config_dword(dev, ITE_887x_UARTBAR, uartbar);
974 /* get current config */
975 pci_read_config_dword(dev, ITE_887x_MISCR, &miscr);
976 /* disable interrupts (UARTx_Routing[3:0]) */
977 miscr &= ~(0xf << (12 - 4 * i));
978 /* activate the UART (UARTx_En) */
979 miscr |= 1 << (23 - i);
980 /* write new config with activated UART */
981 pci_write_config_dword(dev, ITE_887x_MISCR, miscr);
985 /* the device has no UARTs if we get here */
986 release_region(iobase->start, ITE_887x_IOSIZE);
992 static void pci_ite887x_exit(struct pci_dev *dev)
995 /* the ioport is bit 0-15 in POSIO0R */
996 pci_read_config_dword(dev, ITE_887x_POSIO0, &ioport);
998 release_region(ioport, ITE_887x_IOSIZE);
1002 * Oxford Semiconductor Inc.
1003 * Check that device is part of the Tornado range of devices, then determine
1004 * the number of ports available on the device.
1006 static int pci_oxsemi_tornado_init(struct pci_dev *dev)
1009 unsigned long deviceID;
1010 unsigned int number_uarts = 0;
1012 /* OxSemi Tornado devices are all 0xCxxx */
1013 if (dev->vendor == PCI_VENDOR_ID_OXSEMI &&
1014 (dev->device & 0xF000) != 0xC000)
1017 p = pci_iomap(dev, 0, 5);
1021 deviceID = ioread32(p);
1022 /* Tornado device */
1023 if (deviceID == 0x07000200) {
1024 number_uarts = ioread8(p + 4);
1026 "%d ports detected on Oxford PCI Express device\n",
1029 pci_iounmap(dev, p);
1030 return number_uarts;
1033 static int pci_asix_setup(struct serial_private *priv,
1034 const struct pciserial_board *board,
1035 struct uart_8250_port *port, int idx)
1037 port->bugs |= UART_BUG_PARITY;
1038 return pci_default_setup(priv, board, port, idx);
1041 /* Quatech devices have their own extra interface features */
1043 struct quatech_feature {
1048 #define QPCR_TEST_FOR1 0x3F
1049 #define QPCR_TEST_GET1 0x00
1050 #define QPCR_TEST_FOR2 0x40
1051 #define QPCR_TEST_GET2 0x40
1052 #define QPCR_TEST_FOR3 0x80
1053 #define QPCR_TEST_GET3 0x40
1054 #define QPCR_TEST_FOR4 0xC0
1055 #define QPCR_TEST_GET4 0x80
1057 #define QOPR_CLOCK_X1 0x0000
1058 #define QOPR_CLOCK_X2 0x0001
1059 #define QOPR_CLOCK_X4 0x0002
1060 #define QOPR_CLOCK_X8 0x0003
1061 #define QOPR_CLOCK_RATE_MASK 0x0003
1064 static struct quatech_feature quatech_cards[] = {
1065 { PCI_DEVICE_ID_QUATECH_QSC100, 1 },
1066 { PCI_DEVICE_ID_QUATECH_DSC100, 1 },
1067 { PCI_DEVICE_ID_QUATECH_DSC100E, 0 },
1068 { PCI_DEVICE_ID_QUATECH_DSC200, 1 },
1069 { PCI_DEVICE_ID_QUATECH_DSC200E, 0 },
1070 { PCI_DEVICE_ID_QUATECH_ESC100D, 1 },
1071 { PCI_DEVICE_ID_QUATECH_ESC100M, 1 },
1072 { PCI_DEVICE_ID_QUATECH_QSCP100, 1 },
1073 { PCI_DEVICE_ID_QUATECH_DSCP100, 1 },
1074 { PCI_DEVICE_ID_QUATECH_QSCP200, 1 },
1075 { PCI_DEVICE_ID_QUATECH_DSCP200, 1 },
1076 { PCI_DEVICE_ID_QUATECH_ESCLP100, 0 },
1077 { PCI_DEVICE_ID_QUATECH_QSCLP100, 0 },
1078 { PCI_DEVICE_ID_QUATECH_DSCLP100, 0 },
1079 { PCI_DEVICE_ID_QUATECH_SSCLP100, 0 },
1080 { PCI_DEVICE_ID_QUATECH_QSCLP200, 0 },
1081 { PCI_DEVICE_ID_QUATECH_DSCLP200, 0 },
1082 { PCI_DEVICE_ID_QUATECH_SSCLP200, 0 },
1083 { PCI_DEVICE_ID_QUATECH_SPPXP_100, 0 },
1087 static int pci_quatech_amcc(u16 devid)
1089 struct quatech_feature *qf = &quatech_cards[0];
1091 if (qf->devid == devid)
1095 pr_err("quatech: unknown port type '0x%04X'.\n", devid);
1099 static int pci_quatech_rqopr(struct uart_8250_port *port)
1101 unsigned long base = port->port.iobase;
1104 LCR = inb(base + UART_LCR);
1105 outb(0xBF, base + UART_LCR);
1106 val = inb(base + UART_SCR);
1107 outb(LCR, base + UART_LCR);
1111 static void pci_quatech_wqopr(struct uart_8250_port *port, u8 qopr)
1113 unsigned long base = port->port.iobase;
1116 LCR = inb(base + UART_LCR);
1117 outb(0xBF, base + UART_LCR);
1118 val = inb(base + UART_SCR);
1119 outb(qopr, base + UART_SCR);
1120 outb(LCR, base + UART_LCR);
1123 static int pci_quatech_rqmcr(struct uart_8250_port *port)
1125 unsigned long base = port->port.iobase;
1128 LCR = inb(base + UART_LCR);
1129 outb(0xBF, base + UART_LCR);
1130 val = inb(base + UART_SCR);
1131 outb(val | 0x10, base + UART_SCR);
1132 qmcr = inb(base + UART_MCR);
1133 outb(val, base + UART_SCR);
1134 outb(LCR, base + UART_LCR);
1139 static void pci_quatech_wqmcr(struct uart_8250_port *port, u8 qmcr)
1141 unsigned long base = port->port.iobase;
1144 LCR = inb(base + UART_LCR);
1145 outb(0xBF, base + UART_LCR);
1146 val = inb(base + UART_SCR);
1147 outb(val | 0x10, base + UART_SCR);
1148 outb(qmcr, base + UART_MCR);
1149 outb(val, base + UART_SCR);
1150 outb(LCR, base + UART_LCR);
1153 static int pci_quatech_has_qmcr(struct uart_8250_port *port)
1155 unsigned long base = port->port.iobase;
1158 LCR = inb(base + UART_LCR);
1159 outb(0xBF, base + UART_LCR);
1160 val = inb(base + UART_SCR);
1162 outb(0x80, UART_LCR);
1163 if (!(inb(UART_SCR) & 0x20)) {
1164 outb(LCR, base + UART_LCR);
1171 static int pci_quatech_test(struct uart_8250_port *port)
1174 u8 qopr = pci_quatech_rqopr(port);
1175 pci_quatech_wqopr(port, qopr & QPCR_TEST_FOR1);
1176 reg = pci_quatech_rqopr(port) & 0xC0;
1177 if (reg != QPCR_TEST_GET1)
1179 pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR2);
1180 reg = pci_quatech_rqopr(port) & 0xC0;
1181 if (reg != QPCR_TEST_GET2)
1183 pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR3);
1184 reg = pci_quatech_rqopr(port) & 0xC0;
1185 if (reg != QPCR_TEST_GET3)
1187 pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR4);
1188 reg = pci_quatech_rqopr(port) & 0xC0;
1189 if (reg != QPCR_TEST_GET4)
1192 pci_quatech_wqopr(port, qopr);
1196 static int pci_quatech_clock(struct uart_8250_port *port)
1199 unsigned long clock;
1201 if (pci_quatech_test(port) < 0)
1204 qopr = pci_quatech_rqopr(port);
1206 pci_quatech_wqopr(port, qopr & ~QOPR_CLOCK_X8);
1207 reg = pci_quatech_rqopr(port);
1208 if (reg & QOPR_CLOCK_X8) {
1212 pci_quatech_wqopr(port, qopr | QOPR_CLOCK_X8);
1213 reg = pci_quatech_rqopr(port);
1214 if (!(reg & QOPR_CLOCK_X8)) {
1218 reg &= QOPR_CLOCK_X8;
1219 if (reg == QOPR_CLOCK_X2) {
1221 set = QOPR_CLOCK_X2;
1222 } else if (reg == QOPR_CLOCK_X4) {
1224 set = QOPR_CLOCK_X4;
1225 } else if (reg == QOPR_CLOCK_X8) {
1227 set = QOPR_CLOCK_X8;
1230 set = QOPR_CLOCK_X1;
1232 qopr &= ~QOPR_CLOCK_RATE_MASK;
1236 pci_quatech_wqopr(port, qopr);
1240 static int pci_quatech_rs422(struct uart_8250_port *port)
1245 if (!pci_quatech_has_qmcr(port))
1247 qmcr = pci_quatech_rqmcr(port);
1248 pci_quatech_wqmcr(port, 0xFF);
1249 if (pci_quatech_rqmcr(port))
1251 pci_quatech_wqmcr(port, qmcr);
1255 static int pci_quatech_init(struct pci_dev *dev)
1257 if (pci_quatech_amcc(dev->device)) {
1258 unsigned long base = pci_resource_start(dev, 0);
1261 outl(inl(base + 0x38) | 0x00002000, base + 0x38);
1262 tmp = inl(base + 0x3c);
1263 outl(tmp | 0x01000000, base + 0x3c);
1264 outl(tmp &= ~0x01000000, base + 0x3c);
1270 static int pci_quatech_setup(struct serial_private *priv,
1271 const struct pciserial_board *board,
1272 struct uart_8250_port *port, int idx)
1274 /* Needed by pci_quatech calls below */
1275 port->port.iobase = pci_resource_start(priv->dev, FL_GET_BASE(board->flags));
1276 /* Set up the clocking */
1277 port->port.uartclk = pci_quatech_clock(port);
1278 /* For now just warn about RS422 */
1279 if (pci_quatech_rs422(port))
1280 pr_warn("quatech: software control of RS422 features not currently supported.\n");
1281 return pci_default_setup(priv, board, port, idx);
1284 static void pci_quatech_exit(struct pci_dev *dev)
1288 static int pci_default_setup(struct serial_private *priv,
1289 const struct pciserial_board *board,
1290 struct uart_8250_port *port, int idx)
1292 unsigned int bar, offset = board->first_offset, maxnr;
1294 bar = FL_GET_BASE(board->flags);
1295 if (board->flags & FL_BASE_BARS)
1298 offset += idx * board->uart_offset;
1300 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1301 (board->reg_shift + 3);
1303 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1306 return setup_port(priv, port, bar, offset, board->reg_shift);
1309 static int pci_pericom_setup(struct serial_private *priv,
1310 const struct pciserial_board *board,
1311 struct uart_8250_port *port, int idx)
1313 unsigned int bar, offset = board->first_offset, maxnr;
1315 bar = FL_GET_BASE(board->flags);
1316 if (board->flags & FL_BASE_BARS)
1319 offset += idx * board->uart_offset;
1321 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1322 (board->reg_shift + 3);
1324 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1327 port->port.uartclk = 14745600;
1329 return setup_port(priv, port, bar, offset, board->reg_shift);
1333 ce4100_serial_setup(struct serial_private *priv,
1334 const struct pciserial_board *board,
1335 struct uart_8250_port *port, int idx)
1339 ret = setup_port(priv, port, idx, 0, board->reg_shift);
1340 port->port.iotype = UPIO_MEM32;
1341 port->port.type = PORT_XSCALE;
1342 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1343 port->port.regshift = 2;
1348 #define PCI_DEVICE_ID_INTEL_BYT_UART1 0x0f0a
1349 #define PCI_DEVICE_ID_INTEL_BYT_UART2 0x0f0c
1351 #define BYT_PRV_CLK 0x800
1352 #define BYT_PRV_CLK_EN (1 << 0)
1353 #define BYT_PRV_CLK_M_VAL_SHIFT 1
1354 #define BYT_PRV_CLK_N_VAL_SHIFT 16
1355 #define BYT_PRV_CLK_UPDATE (1 << 31)
1357 #define BYT_GENERAL_REG 0x808
1358 #define BYT_GENERAL_DIS_RTS_N_OVERRIDE (1 << 3)
1360 #define BYT_TX_OVF_INT 0x820
1361 #define BYT_TX_OVF_INT_MASK (1 << 1)
1364 byt_set_termios(struct uart_port *p, struct ktermios *termios,
1365 struct ktermios *old)
1367 unsigned int baud = tty_termios_baud_rate(termios);
1368 unsigned int m = 6912;
1369 unsigned int n = 15625;
1372 /* For baud rates 1M, 2M, 3M and 4M the dividers must be adjusted. */
1373 if (baud == 1000000 || baud == 2000000 || baud == 4000000) {
1377 p->uartclk = 64000000;
1378 } else if (baud == 3000000) {
1382 p->uartclk = 48000000;
1384 p->uartclk = 44236800;
1387 /* Reset the clock */
1388 reg = (m << BYT_PRV_CLK_M_VAL_SHIFT) | (n << BYT_PRV_CLK_N_VAL_SHIFT);
1389 writel(reg, p->membase + BYT_PRV_CLK);
1390 reg |= BYT_PRV_CLK_EN | BYT_PRV_CLK_UPDATE;
1391 writel(reg, p->membase + BYT_PRV_CLK);
1394 * If auto-handshake mechanism is not enabled,
1395 * disable rts_n override
1397 reg = readl(p->membase + BYT_GENERAL_REG);
1398 reg &= ~BYT_GENERAL_DIS_RTS_N_OVERRIDE;
1399 if (termios->c_cflag & CRTSCTS)
1400 reg |= BYT_GENERAL_DIS_RTS_N_OVERRIDE;
1401 writel(reg, p->membase + BYT_GENERAL_REG);
1403 serial8250_do_set_termios(p, termios, old);
1406 static bool byt_dma_filter(struct dma_chan *chan, void *param)
1408 return chan->chan_id == *(int *)param;
1412 byt_serial_setup(struct serial_private *priv,
1413 const struct pciserial_board *board,
1414 struct uart_8250_port *port, int idx)
1416 struct uart_8250_dma *dma;
1419 dma = devm_kzalloc(port->port.dev, sizeof(*dma), GFP_KERNEL);
1423 switch (priv->dev->device) {
1424 case PCI_DEVICE_ID_INTEL_BYT_UART1:
1425 dma->rx_chan_id = 3;
1426 dma->tx_chan_id = 2;
1428 case PCI_DEVICE_ID_INTEL_BYT_UART2:
1429 dma->rx_chan_id = 5;
1430 dma->tx_chan_id = 4;
1436 dma->rxconf.slave_id = dma->rx_chan_id;
1437 dma->rxconf.src_maxburst = 16;
1439 dma->txconf.slave_id = dma->tx_chan_id;
1440 dma->txconf.dst_maxburst = 16;
1442 dma->fn = byt_dma_filter;
1443 dma->rx_param = &dma->rx_chan_id;
1444 dma->tx_param = &dma->tx_chan_id;
1446 ret = pci_default_setup(priv, board, port, idx);
1447 port->port.iotype = UPIO_MEM;
1448 port->port.type = PORT_16550A;
1449 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1450 port->port.set_termios = byt_set_termios;
1451 port->port.fifosize = 64;
1452 port->tx_loadsz = 64;
1454 port->capabilities = UART_CAP_FIFO | UART_CAP_AFE;
1456 /* Disable Tx counter interrupts */
1457 writel(BYT_TX_OVF_INT_MASK, port->port.membase + BYT_TX_OVF_INT);
1463 pci_omegapci_setup(struct serial_private *priv,
1464 const struct pciserial_board *board,
1465 struct uart_8250_port *port, int idx)
1467 return setup_port(priv, port, 2, idx * 8, 0);
1471 pci_brcm_trumanage_setup(struct serial_private *priv,
1472 const struct pciserial_board *board,
1473 struct uart_8250_port *port, int idx)
1475 int ret = pci_default_setup(priv, board, port, idx);
1477 port->port.type = PORT_BRCM_TRUMANAGE;
1478 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1482 static int pci_fintek_setup(struct serial_private *priv,
1483 const struct pciserial_board *board,
1484 struct uart_8250_port *port, int idx)
1486 struct pci_dev *pdev = priv->dev;
1488 unsigned long iobase;
1489 unsigned long ciobase = 0;
1493 * We are supposed to be able to read these from the PCI config space,
1494 * but the values there don't seem to match what we need to use, so
1495 * just use these hard-coded values for now, as they are correct.
1498 case 0: iobase = 0xe000; config_base = 0x40; break;
1499 case 1: iobase = 0xe008; config_base = 0x48; break;
1500 case 2: iobase = 0xe010; config_base = 0x50; break;
1501 case 3: iobase = 0xe018; config_base = 0x58; break;
1502 case 4: iobase = 0xe020; config_base = 0x60; break;
1503 case 5: iobase = 0xe028; config_base = 0x68; break;
1504 case 6: iobase = 0xe030; config_base = 0x70; break;
1505 case 7: iobase = 0xe038; config_base = 0x78; break;
1506 case 8: iobase = 0xe040; config_base = 0x80; break;
1507 case 9: iobase = 0xe048; config_base = 0x88; break;
1508 case 10: iobase = 0xe050; config_base = 0x90; break;
1509 case 11: iobase = 0xe058; config_base = 0x98; break;
1511 /* Unknown number of ports, get out of here */
1516 base = pci_resource_start(priv->dev, 3);
1517 ciobase = (int)(base + (0x8 * idx));
1520 dev_dbg(&pdev->dev, "%s: idx=%d iobase=0x%lx ciobase=0x%lx config_base=0x%2x\n",
1521 __func__, idx, iobase, ciobase, config_base);
1523 /* Enable UART I/O port */
1524 pci_write_config_byte(pdev, config_base + 0x00, 0x01);
1526 /* Select 128-byte FIFO and 8x FIFO threshold */
1527 pci_write_config_byte(pdev, config_base + 0x01, 0x33);
1530 pci_write_config_byte(pdev, config_base + 0x04, (u8)(iobase & 0xff));
1533 pci_write_config_byte(pdev, config_base + 0x05, (u8)((iobase & 0xff00) >> 8));
1535 /* irq number, this usually fails, but the spec says to do it anyway. */
1536 pci_write_config_byte(pdev, config_base + 0x06, pdev->irq);
1538 port->port.iotype = UPIO_PORT;
1539 port->port.iobase = iobase;
1540 port->port.mapbase = 0;
1541 port->port.membase = NULL;
1542 port->port.regshift = 0;
1547 static int skip_tx_en_setup(struct serial_private *priv,
1548 const struct pciserial_board *board,
1549 struct uart_8250_port *port, int idx)
1551 port->port.flags |= UPF_NO_TXEN_TEST;
1552 dev_dbg(&priv->dev->dev,
1553 "serial8250: skipping TxEn test for device [%04x:%04x] subsystem [%04x:%04x]\n",
1554 priv->dev->vendor, priv->dev->device,
1555 priv->dev->subsystem_vendor, priv->dev->subsystem_device);
1557 return pci_default_setup(priv, board, port, idx);
1560 static void kt_handle_break(struct uart_port *p)
1562 struct uart_8250_port *up =
1563 container_of(p, struct uart_8250_port, port);
1565 * On receipt of a BI, serial device in Intel ME (Intel
1566 * management engine) needs to have its fifos cleared for sane
1567 * SOL (Serial Over Lan) output.
1569 serial8250_clear_and_reinit_fifos(up);
1572 static unsigned int kt_serial_in(struct uart_port *p, int offset)
1574 struct uart_8250_port *up =
1575 container_of(p, struct uart_8250_port, port);
1579 * When the Intel ME (management engine) gets reset its serial
1580 * port registers could return 0 momentarily. Functions like
1581 * serial8250_console_write, read and save the IER, perform
1582 * some operation and then restore it. In order to avoid
1583 * setting IER register inadvertently to 0, if the value read
1584 * is 0, double check with ier value in uart_8250_port and use
1585 * that instead. up->ier should be the same value as what is
1586 * currently configured.
1588 val = inb(p->iobase + offset);
1589 if (offset == UART_IER) {
1596 static int kt_serial_setup(struct serial_private *priv,
1597 const struct pciserial_board *board,
1598 struct uart_8250_port *port, int idx)
1600 port->port.flags |= UPF_BUG_THRE;
1601 port->port.serial_in = kt_serial_in;
1602 port->port.handle_break = kt_handle_break;
1603 return skip_tx_en_setup(priv, board, port, idx);
1606 static int pci_eg20t_init(struct pci_dev *dev)
1608 #if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE)
1616 pci_xr17c154_setup(struct serial_private *priv,
1617 const struct pciserial_board *board,
1618 struct uart_8250_port *port, int idx)
1620 port->port.flags |= UPF_EXAR_EFR;
1621 return pci_default_setup(priv, board, port, idx);
1625 pci_xr17v35x_setup(struct serial_private *priv,
1626 const struct pciserial_board *board,
1627 struct uart_8250_port *port, int idx)
1631 p = pci_ioremap_bar(priv->dev, 0);
1635 port->port.flags |= UPF_EXAR_EFR;
1638 * Setup Multipurpose Input/Output pins.
1641 writeb(0x00, p + 0x8f); /*MPIOINT[7:0]*/
1642 writeb(0x00, p + 0x90); /*MPIOLVL[7:0]*/
1643 writeb(0x00, p + 0x91); /*MPIO3T[7:0]*/
1644 writeb(0x00, p + 0x92); /*MPIOINV[7:0]*/
1645 writeb(0x00, p + 0x93); /*MPIOSEL[7:0]*/
1646 writeb(0x00, p + 0x94); /*MPIOOD[7:0]*/
1647 writeb(0x00, p + 0x95); /*MPIOINT[15:8]*/
1648 writeb(0x00, p + 0x96); /*MPIOLVL[15:8]*/
1649 writeb(0x00, p + 0x97); /*MPIO3T[15:8]*/
1650 writeb(0x00, p + 0x98); /*MPIOINV[15:8]*/
1651 writeb(0x00, p + 0x99); /*MPIOSEL[15:8]*/
1652 writeb(0x00, p + 0x9a); /*MPIOOD[15:8]*/
1654 writeb(0x00, p + UART_EXAR_8XMODE);
1655 writeb(UART_FCTR_EXAR_TRGD, p + UART_EXAR_FCTR);
1656 writeb(128, p + UART_EXAR_TXTRG);
1657 writeb(128, p + UART_EXAR_RXTRG);
1660 return pci_default_setup(priv, board, port, idx);
1663 #define PCI_DEVICE_ID_COMMTECH_4222PCI335 0x0004
1664 #define PCI_DEVICE_ID_COMMTECH_4224PCI335 0x0002
1665 #define PCI_DEVICE_ID_COMMTECH_2324PCI335 0x000a
1666 #define PCI_DEVICE_ID_COMMTECH_2328PCI335 0x000b
1669 pci_fastcom335_setup(struct serial_private *priv,
1670 const struct pciserial_board *board,
1671 struct uart_8250_port *port, int idx)
1675 p = pci_ioremap_bar(priv->dev, 0);
1679 port->port.flags |= UPF_EXAR_EFR;
1682 * Setup Multipurpose Input/Output pins.
1685 switch (priv->dev->device) {
1686 case PCI_DEVICE_ID_COMMTECH_4222PCI335:
1687 case PCI_DEVICE_ID_COMMTECH_4224PCI335:
1688 writeb(0x78, p + 0x90); /* MPIOLVL[7:0] */
1689 writeb(0x00, p + 0x92); /* MPIOINV[7:0] */
1690 writeb(0x00, p + 0x93); /* MPIOSEL[7:0] */
1692 case PCI_DEVICE_ID_COMMTECH_2324PCI335:
1693 case PCI_DEVICE_ID_COMMTECH_2328PCI335:
1694 writeb(0x00, p + 0x90); /* MPIOLVL[7:0] */
1695 writeb(0xc0, p + 0x92); /* MPIOINV[7:0] */
1696 writeb(0xc0, p + 0x93); /* MPIOSEL[7:0] */
1699 writeb(0x00, p + 0x8f); /* MPIOINT[7:0] */
1700 writeb(0x00, p + 0x91); /* MPIO3T[7:0] */
1701 writeb(0x00, p + 0x94); /* MPIOOD[7:0] */
1703 writeb(0x00, p + UART_EXAR_8XMODE);
1704 writeb(UART_FCTR_EXAR_TRGD, p + UART_EXAR_FCTR);
1705 writeb(32, p + UART_EXAR_TXTRG);
1706 writeb(32, p + UART_EXAR_RXTRG);
1709 return pci_default_setup(priv, board, port, idx);
1713 pci_wch_ch353_setup(struct serial_private *priv,
1714 const struct pciserial_board *board,
1715 struct uart_8250_port *port, int idx)
1717 port->port.flags |= UPF_FIXED_TYPE;
1718 port->port.type = PORT_16550A;
1719 return pci_default_setup(priv, board, port, idx);
1722 #define PCI_VENDOR_ID_SBSMODULARIO 0x124B
1723 #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
1724 #define PCI_DEVICE_ID_OCTPRO 0x0001
1725 #define PCI_SUBDEVICE_ID_OCTPRO232 0x0108
1726 #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
1727 #define PCI_SUBDEVICE_ID_POCTAL232 0x0308
1728 #define PCI_SUBDEVICE_ID_POCTAL422 0x0408
1729 #define PCI_SUBDEVICE_ID_SIIG_DUAL_00 0x2500
1730 #define PCI_SUBDEVICE_ID_SIIG_DUAL_30 0x2530
1731 #define PCI_VENDOR_ID_ADVANTECH 0x13fe
1732 #define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66
1733 #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620
1734 #define PCI_DEVICE_ID_TITAN_200I 0x8028
1735 #define PCI_DEVICE_ID_TITAN_400I 0x8048
1736 #define PCI_DEVICE_ID_TITAN_800I 0x8088
1737 #define PCI_DEVICE_ID_TITAN_800EH 0xA007
1738 #define PCI_DEVICE_ID_TITAN_800EHB 0xA008
1739 #define PCI_DEVICE_ID_TITAN_400EH 0xA009
1740 #define PCI_DEVICE_ID_TITAN_100E 0xA010
1741 #define PCI_DEVICE_ID_TITAN_200E 0xA012
1742 #define PCI_DEVICE_ID_TITAN_400E 0xA013
1743 #define PCI_DEVICE_ID_TITAN_800E 0xA014
1744 #define PCI_DEVICE_ID_TITAN_200EI 0xA016
1745 #define PCI_DEVICE_ID_TITAN_200EISI 0xA017
1746 #define PCI_DEVICE_ID_TITAN_200V3 0xA306
1747 #define PCI_DEVICE_ID_TITAN_400V3 0xA310
1748 #define PCI_DEVICE_ID_TITAN_410V3 0xA312
1749 #define PCI_DEVICE_ID_TITAN_800V3 0xA314
1750 #define PCI_DEVICE_ID_TITAN_800V3B 0xA315
1751 #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538
1752 #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
1753 #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
1754 #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
1755 #define PCI_VENDOR_ID_WCH 0x4348
1756 #define PCI_DEVICE_ID_WCH_CH352_2S 0x3253
1757 #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453
1758 #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046
1759 #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053
1760 #define PCI_VENDOR_ID_AGESTAR 0x5372
1761 #define PCI_DEVICE_ID_AGESTAR_9375 0x6872
1762 #define PCI_VENDOR_ID_ASIX 0x9710
1763 #define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020
1764 #define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
1765 #define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
1766 #define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
1767 #define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e
1769 #define PCI_VENDOR_ID_SUNIX 0x1fd4
1770 #define PCI_DEVICE_ID_SUNIX_1999 0x1999
1773 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
1774 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
1775 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
1778 * Master list of serial port init/setup/exit quirks.
1779 * This does not describe the general nature of the port.
1780 * (ie, baud base, number and location of ports, etc)
1782 * This list is ordered alphabetically by vendor then device.
1783 * Specific entries must come before more generic entries.
1785 static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
1787 * ADDI-DATA GmbH communication cards <info@addi-data.com>
1790 .vendor = PCI_VENDOR_ID_AMCC,
1791 .device = PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800,
1792 .subvendor = PCI_ANY_ID,
1793 .subdevice = PCI_ANY_ID,
1794 .setup = addidata_apci7800_setup,
1797 * AFAVLAB cards - these may be called via parport_serial
1798 * It is not clear whether this applies to all products.
1801 .vendor = PCI_VENDOR_ID_AFAVLAB,
1802 .device = PCI_ANY_ID,
1803 .subvendor = PCI_ANY_ID,
1804 .subdevice = PCI_ANY_ID,
1805 .setup = afavlab_setup,
1811 .vendor = PCI_VENDOR_ID_HP,
1812 .device = PCI_DEVICE_ID_HP_DIVA,
1813 .subvendor = PCI_ANY_ID,
1814 .subdevice = PCI_ANY_ID,
1815 .init = pci_hp_diva_init,
1816 .setup = pci_hp_diva_setup,
1822 .vendor = PCI_VENDOR_ID_INTEL,
1823 .device = PCI_DEVICE_ID_INTEL_80960_RP,
1824 .subvendor = 0xe4bf,
1825 .subdevice = PCI_ANY_ID,
1826 .init = pci_inteli960ni_init,
1827 .setup = pci_default_setup,
1830 .vendor = PCI_VENDOR_ID_INTEL,
1831 .device = PCI_DEVICE_ID_INTEL_8257X_SOL,
1832 .subvendor = PCI_ANY_ID,
1833 .subdevice = PCI_ANY_ID,
1834 .setup = skip_tx_en_setup,
1837 .vendor = PCI_VENDOR_ID_INTEL,
1838 .device = PCI_DEVICE_ID_INTEL_82573L_SOL,
1839 .subvendor = PCI_ANY_ID,
1840 .subdevice = PCI_ANY_ID,
1841 .setup = skip_tx_en_setup,
1844 .vendor = PCI_VENDOR_ID_INTEL,
1845 .device = PCI_DEVICE_ID_INTEL_82573E_SOL,
1846 .subvendor = PCI_ANY_ID,
1847 .subdevice = PCI_ANY_ID,
1848 .setup = skip_tx_en_setup,
1851 .vendor = PCI_VENDOR_ID_INTEL,
1852 .device = PCI_DEVICE_ID_INTEL_CE4100_UART,
1853 .subvendor = PCI_ANY_ID,
1854 .subdevice = PCI_ANY_ID,
1855 .setup = ce4100_serial_setup,
1858 .vendor = PCI_VENDOR_ID_INTEL,
1859 .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT,
1860 .subvendor = PCI_ANY_ID,
1861 .subdevice = PCI_ANY_ID,
1862 .setup = kt_serial_setup,
1865 .vendor = PCI_VENDOR_ID_INTEL,
1866 .device = PCI_DEVICE_ID_INTEL_BYT_UART1,
1867 .subvendor = PCI_ANY_ID,
1868 .subdevice = PCI_ANY_ID,
1869 .setup = byt_serial_setup,
1872 .vendor = PCI_VENDOR_ID_INTEL,
1873 .device = PCI_DEVICE_ID_INTEL_BYT_UART2,
1874 .subvendor = PCI_ANY_ID,
1875 .subdevice = PCI_ANY_ID,
1876 .setup = byt_serial_setup,
1882 .vendor = PCI_VENDOR_ID_ITE,
1883 .device = PCI_DEVICE_ID_ITE_8872,
1884 .subvendor = PCI_ANY_ID,
1885 .subdevice = PCI_ANY_ID,
1886 .init = pci_ite887x_init,
1887 .setup = pci_default_setup,
1888 .exit = pci_ite887x_exit,
1891 * National Instruments
1894 .vendor = PCI_VENDOR_ID_NI,
1895 .device = PCI_DEVICE_ID_NI_PCI23216,
1896 .subvendor = PCI_ANY_ID,
1897 .subdevice = PCI_ANY_ID,
1898 .init = pci_ni8420_init,
1899 .setup = pci_default_setup,
1900 .exit = pci_ni8420_exit,
1903 .vendor = PCI_VENDOR_ID_NI,
1904 .device = PCI_DEVICE_ID_NI_PCI2328,
1905 .subvendor = PCI_ANY_ID,
1906 .subdevice = PCI_ANY_ID,
1907 .init = pci_ni8420_init,
1908 .setup = pci_default_setup,
1909 .exit = pci_ni8420_exit,
1912 .vendor = PCI_VENDOR_ID_NI,
1913 .device = PCI_DEVICE_ID_NI_PCI2324,
1914 .subvendor = PCI_ANY_ID,
1915 .subdevice = PCI_ANY_ID,
1916 .init = pci_ni8420_init,
1917 .setup = pci_default_setup,
1918 .exit = pci_ni8420_exit,
1921 .vendor = PCI_VENDOR_ID_NI,
1922 .device = PCI_DEVICE_ID_NI_PCI2322,
1923 .subvendor = PCI_ANY_ID,
1924 .subdevice = PCI_ANY_ID,
1925 .init = pci_ni8420_init,
1926 .setup = pci_default_setup,
1927 .exit = pci_ni8420_exit,
1930 .vendor = PCI_VENDOR_ID_NI,
1931 .device = PCI_DEVICE_ID_NI_PCI2324I,
1932 .subvendor = PCI_ANY_ID,
1933 .subdevice = PCI_ANY_ID,
1934 .init = pci_ni8420_init,
1935 .setup = pci_default_setup,
1936 .exit = pci_ni8420_exit,
1939 .vendor = PCI_VENDOR_ID_NI,
1940 .device = PCI_DEVICE_ID_NI_PCI2322I,
1941 .subvendor = PCI_ANY_ID,
1942 .subdevice = PCI_ANY_ID,
1943 .init = pci_ni8420_init,
1944 .setup = pci_default_setup,
1945 .exit = pci_ni8420_exit,
1948 .vendor = PCI_VENDOR_ID_NI,
1949 .device = PCI_DEVICE_ID_NI_PXI8420_23216,
1950 .subvendor = PCI_ANY_ID,
1951 .subdevice = PCI_ANY_ID,
1952 .init = pci_ni8420_init,
1953 .setup = pci_default_setup,
1954 .exit = pci_ni8420_exit,
1957 .vendor = PCI_VENDOR_ID_NI,
1958 .device = PCI_DEVICE_ID_NI_PXI8420_2328,
1959 .subvendor = PCI_ANY_ID,
1960 .subdevice = PCI_ANY_ID,
1961 .init = pci_ni8420_init,
1962 .setup = pci_default_setup,
1963 .exit = pci_ni8420_exit,
1966 .vendor = PCI_VENDOR_ID_NI,
1967 .device = PCI_DEVICE_ID_NI_PXI8420_2324,
1968 .subvendor = PCI_ANY_ID,
1969 .subdevice = PCI_ANY_ID,
1970 .init = pci_ni8420_init,
1971 .setup = pci_default_setup,
1972 .exit = pci_ni8420_exit,
1975 .vendor = PCI_VENDOR_ID_NI,
1976 .device = PCI_DEVICE_ID_NI_PXI8420_2322,
1977 .subvendor = PCI_ANY_ID,
1978 .subdevice = PCI_ANY_ID,
1979 .init = pci_ni8420_init,
1980 .setup = pci_default_setup,
1981 .exit = pci_ni8420_exit,
1984 .vendor = PCI_VENDOR_ID_NI,
1985 .device = PCI_DEVICE_ID_NI_PXI8422_2324,
1986 .subvendor = PCI_ANY_ID,
1987 .subdevice = PCI_ANY_ID,
1988 .init = pci_ni8420_init,
1989 .setup = pci_default_setup,
1990 .exit = pci_ni8420_exit,
1993 .vendor = PCI_VENDOR_ID_NI,
1994 .device = PCI_DEVICE_ID_NI_PXI8422_2322,
1995 .subvendor = PCI_ANY_ID,
1996 .subdevice = PCI_ANY_ID,
1997 .init = pci_ni8420_init,
1998 .setup = pci_default_setup,
1999 .exit = pci_ni8420_exit,
2002 .vendor = PCI_VENDOR_ID_NI,
2003 .device = PCI_ANY_ID,
2004 .subvendor = PCI_ANY_ID,
2005 .subdevice = PCI_ANY_ID,
2006 .init = pci_ni8430_init,
2007 .setup = pci_ni8430_setup,
2008 .exit = pci_ni8430_exit,
2012 .vendor = PCI_VENDOR_ID_QUATECH,
2013 .device = PCI_ANY_ID,
2014 .subvendor = PCI_ANY_ID,
2015 .subdevice = PCI_ANY_ID,
2016 .init = pci_quatech_init,
2017 .setup = pci_quatech_setup,
2018 .exit = pci_quatech_exit,
2024 .vendor = PCI_VENDOR_ID_PANACOM,
2025 .device = PCI_DEVICE_ID_PANACOM_QUADMODEM,
2026 .subvendor = PCI_ANY_ID,
2027 .subdevice = PCI_ANY_ID,
2028 .init = pci_plx9050_init,
2029 .setup = pci_default_setup,
2030 .exit = pci_plx9050_exit,
2033 .vendor = PCI_VENDOR_ID_PANACOM,
2034 .device = PCI_DEVICE_ID_PANACOM_DUALMODEM,
2035 .subvendor = PCI_ANY_ID,
2036 .subdevice = PCI_ANY_ID,
2037 .init = pci_plx9050_init,
2038 .setup = pci_default_setup,
2039 .exit = pci_plx9050_exit,
2047 .subvendor = PCI_ANY_ID,
2048 .subdevice = PCI_ANY_ID,
2049 .setup = pci_pericom_setup,
2054 .subvendor = PCI_ANY_ID,
2055 .subdevice = PCI_ANY_ID,
2056 .setup = pci_pericom_setup,
2061 .subvendor = PCI_ANY_ID,
2062 .subdevice = PCI_ANY_ID,
2063 .setup = pci_pericom_setup,
2070 .vendor = PCI_VENDOR_ID_PLX,
2071 .device = PCI_DEVICE_ID_PLX_9030,
2072 .subvendor = PCI_SUBVENDOR_ID_PERLE,
2073 .subdevice = PCI_ANY_ID,
2074 .setup = pci_default_setup,
2077 .vendor = PCI_VENDOR_ID_PLX,
2078 .device = PCI_DEVICE_ID_PLX_9050,
2079 .subvendor = PCI_SUBVENDOR_ID_EXSYS,
2080 .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055,
2081 .init = pci_plx9050_init,
2082 .setup = pci_default_setup,
2083 .exit = pci_plx9050_exit,
2086 .vendor = PCI_VENDOR_ID_PLX,
2087 .device = PCI_DEVICE_ID_PLX_9050,
2088 .subvendor = PCI_SUBVENDOR_ID_KEYSPAN,
2089 .subdevice = PCI_SUBDEVICE_ID_KEYSPAN_SX2,
2090 .init = pci_plx9050_init,
2091 .setup = pci_default_setup,
2092 .exit = pci_plx9050_exit,
2095 .vendor = PCI_VENDOR_ID_PLX,
2096 .device = PCI_DEVICE_ID_PLX_ROMULUS,
2097 .subvendor = PCI_VENDOR_ID_PLX,
2098 .subdevice = PCI_DEVICE_ID_PLX_ROMULUS,
2099 .init = pci_plx9050_init,
2100 .setup = pci_default_setup,
2101 .exit = pci_plx9050_exit,
2104 * SBS Technologies, Inc., PMC-OCTALPRO 232
2107 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2108 .device = PCI_DEVICE_ID_OCTPRO,
2109 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2110 .subdevice = PCI_SUBDEVICE_ID_OCTPRO232,
2116 * SBS Technologies, Inc., PMC-OCTALPRO 422
2119 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2120 .device = PCI_DEVICE_ID_OCTPRO,
2121 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2122 .subdevice = PCI_SUBDEVICE_ID_OCTPRO422,
2128 * SBS Technologies, Inc., P-Octal 232
2131 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2132 .device = PCI_DEVICE_ID_OCTPRO,
2133 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2134 .subdevice = PCI_SUBDEVICE_ID_POCTAL232,
2140 * SBS Technologies, Inc., P-Octal 422
2143 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
2144 .device = PCI_DEVICE_ID_OCTPRO,
2145 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
2146 .subdevice = PCI_SUBDEVICE_ID_POCTAL422,
2152 * SIIG cards - these may be called via parport_serial
2155 .vendor = PCI_VENDOR_ID_SIIG,
2156 .device = PCI_ANY_ID,
2157 .subvendor = PCI_ANY_ID,
2158 .subdevice = PCI_ANY_ID,
2159 .init = pci_siig_init,
2160 .setup = pci_siig_setup,
2166 .vendor = PCI_VENDOR_ID_TITAN,
2167 .device = PCI_DEVICE_ID_TITAN_400L,
2168 .subvendor = PCI_ANY_ID,
2169 .subdevice = PCI_ANY_ID,
2170 .setup = titan_400l_800l_setup,
2173 .vendor = PCI_VENDOR_ID_TITAN,
2174 .device = PCI_DEVICE_ID_TITAN_800L,
2175 .subvendor = PCI_ANY_ID,
2176 .subdevice = PCI_ANY_ID,
2177 .setup = titan_400l_800l_setup,
2183 .vendor = PCI_VENDOR_ID_TIMEDIA,
2184 .device = PCI_DEVICE_ID_TIMEDIA_1889,
2185 .subvendor = PCI_VENDOR_ID_TIMEDIA,
2186 .subdevice = PCI_ANY_ID,
2187 .probe = pci_timedia_probe,
2188 .init = pci_timedia_init,
2189 .setup = pci_timedia_setup,
2192 .vendor = PCI_VENDOR_ID_TIMEDIA,
2193 .device = PCI_ANY_ID,
2194 .subvendor = PCI_ANY_ID,
2195 .subdevice = PCI_ANY_ID,
2196 .setup = pci_timedia_setup,
2199 * SUNIX (Timedia) cards
2200 * Do not "probe" for these cards as there is at least one combination
2201 * card that should be handled by parport_pc that doesn't match the
2202 * rule in pci_timedia_probe.
2203 * It is part number is MIO5079A but its subdevice ID is 0x0102.
2204 * There are some boards with part number SER5037AL that report
2205 * subdevice ID 0x0002.
2208 .vendor = PCI_VENDOR_ID_SUNIX,
2209 .device = PCI_DEVICE_ID_SUNIX_1999,
2210 .subvendor = PCI_VENDOR_ID_SUNIX,
2211 .subdevice = PCI_ANY_ID,
2212 .init = pci_timedia_init,
2213 .setup = pci_timedia_setup,
2219 .vendor = PCI_VENDOR_ID_EXAR,
2220 .device = PCI_DEVICE_ID_EXAR_XR17C152,
2221 .subvendor = PCI_ANY_ID,
2222 .subdevice = PCI_ANY_ID,
2223 .setup = pci_xr17c154_setup,
2226 .vendor = PCI_VENDOR_ID_EXAR,
2227 .device = PCI_DEVICE_ID_EXAR_XR17C154,
2228 .subvendor = PCI_ANY_ID,
2229 .subdevice = PCI_ANY_ID,
2230 .setup = pci_xr17c154_setup,
2233 .vendor = PCI_VENDOR_ID_EXAR,
2234 .device = PCI_DEVICE_ID_EXAR_XR17C158,
2235 .subvendor = PCI_ANY_ID,
2236 .subdevice = PCI_ANY_ID,
2237 .setup = pci_xr17c154_setup,
2240 .vendor = PCI_VENDOR_ID_EXAR,
2241 .device = PCI_DEVICE_ID_EXAR_XR17V352,
2242 .subvendor = PCI_ANY_ID,
2243 .subdevice = PCI_ANY_ID,
2244 .setup = pci_xr17v35x_setup,
2247 .vendor = PCI_VENDOR_ID_EXAR,
2248 .device = PCI_DEVICE_ID_EXAR_XR17V354,
2249 .subvendor = PCI_ANY_ID,
2250 .subdevice = PCI_ANY_ID,
2251 .setup = pci_xr17v35x_setup,
2254 .vendor = PCI_VENDOR_ID_EXAR,
2255 .device = PCI_DEVICE_ID_EXAR_XR17V358,
2256 .subvendor = PCI_ANY_ID,
2257 .subdevice = PCI_ANY_ID,
2258 .setup = pci_xr17v35x_setup,
2264 .vendor = PCI_VENDOR_ID_XIRCOM,
2265 .device = PCI_DEVICE_ID_XIRCOM_X3201_MDM,
2266 .subvendor = PCI_ANY_ID,
2267 .subdevice = PCI_ANY_ID,
2268 .init = pci_xircom_init,
2269 .setup = pci_default_setup,
2272 * Netmos cards - these may be called via parport_serial
2275 .vendor = PCI_VENDOR_ID_NETMOS,
2276 .device = PCI_ANY_ID,
2277 .subvendor = PCI_ANY_ID,
2278 .subdevice = PCI_ANY_ID,
2279 .init = pci_netmos_init,
2280 .setup = pci_netmos_9900_setup,
2283 * For Oxford Semiconductor Tornado based devices
2286 .vendor = PCI_VENDOR_ID_OXSEMI,
2287 .device = PCI_ANY_ID,
2288 .subvendor = PCI_ANY_ID,
2289 .subdevice = PCI_ANY_ID,
2290 .init = pci_oxsemi_tornado_init,
2291 .setup = pci_default_setup,
2294 .vendor = PCI_VENDOR_ID_MAINPINE,
2295 .device = PCI_ANY_ID,
2296 .subvendor = PCI_ANY_ID,
2297 .subdevice = PCI_ANY_ID,
2298 .init = pci_oxsemi_tornado_init,
2299 .setup = pci_default_setup,
2302 .vendor = PCI_VENDOR_ID_DIGI,
2303 .device = PCIE_DEVICE_ID_NEO_2_OX_IBM,
2304 .subvendor = PCI_SUBVENDOR_ID_IBM,
2305 .subdevice = PCI_ANY_ID,
2306 .init = pci_oxsemi_tornado_init,
2307 .setup = pci_default_setup,
2310 .vendor = PCI_VENDOR_ID_INTEL,
2312 .subvendor = PCI_ANY_ID,
2313 .subdevice = PCI_ANY_ID,
2314 .init = pci_eg20t_init,
2315 .setup = pci_default_setup,
2318 .vendor = PCI_VENDOR_ID_INTEL,
2320 .subvendor = PCI_ANY_ID,
2321 .subdevice = PCI_ANY_ID,
2322 .init = pci_eg20t_init,
2323 .setup = pci_default_setup,
2326 .vendor = PCI_VENDOR_ID_INTEL,
2328 .subvendor = PCI_ANY_ID,
2329 .subdevice = PCI_ANY_ID,
2330 .init = pci_eg20t_init,
2331 .setup = pci_default_setup,
2334 .vendor = PCI_VENDOR_ID_INTEL,
2336 .subvendor = PCI_ANY_ID,
2337 .subdevice = PCI_ANY_ID,
2338 .init = pci_eg20t_init,
2339 .setup = pci_default_setup,
2344 .subvendor = PCI_ANY_ID,
2345 .subdevice = PCI_ANY_ID,
2346 .init = pci_eg20t_init,
2347 .setup = pci_default_setup,
2352 .subvendor = PCI_ANY_ID,
2353 .subdevice = PCI_ANY_ID,
2354 .init = pci_eg20t_init,
2355 .setup = pci_default_setup,
2360 .subvendor = PCI_ANY_ID,
2361 .subdevice = PCI_ANY_ID,
2362 .init = pci_eg20t_init,
2363 .setup = pci_default_setup,
2368 .subvendor = PCI_ANY_ID,
2369 .subdevice = PCI_ANY_ID,
2370 .init = pci_eg20t_init,
2371 .setup = pci_default_setup,
2376 .subvendor = PCI_ANY_ID,
2377 .subdevice = PCI_ANY_ID,
2378 .init = pci_eg20t_init,
2379 .setup = pci_default_setup,
2382 * Cronyx Omega PCI (PLX-chip based)
2385 .vendor = PCI_VENDOR_ID_PLX,
2386 .device = PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
2387 .subvendor = PCI_ANY_ID,
2388 .subdevice = PCI_ANY_ID,
2389 .setup = pci_omegapci_setup,
2391 /* WCH CH353 2S1P card (16550 clone) */
2393 .vendor = PCI_VENDOR_ID_WCH,
2394 .device = PCI_DEVICE_ID_WCH_CH353_2S1P,
2395 .subvendor = PCI_ANY_ID,
2396 .subdevice = PCI_ANY_ID,
2397 .setup = pci_wch_ch353_setup,
2399 /* WCH CH353 4S card (16550 clone) */
2401 .vendor = PCI_VENDOR_ID_WCH,
2402 .device = PCI_DEVICE_ID_WCH_CH353_4S,
2403 .subvendor = PCI_ANY_ID,
2404 .subdevice = PCI_ANY_ID,
2405 .setup = pci_wch_ch353_setup,
2407 /* WCH CH353 2S1PF card (16550 clone) */
2409 .vendor = PCI_VENDOR_ID_WCH,
2410 .device = PCI_DEVICE_ID_WCH_CH353_2S1PF,
2411 .subvendor = PCI_ANY_ID,
2412 .subdevice = PCI_ANY_ID,
2413 .setup = pci_wch_ch353_setup,
2415 /* WCH CH352 2S card (16550 clone) */
2417 .vendor = PCI_VENDOR_ID_WCH,
2418 .device = PCI_DEVICE_ID_WCH_CH352_2S,
2419 .subvendor = PCI_ANY_ID,
2420 .subdevice = PCI_ANY_ID,
2421 .setup = pci_wch_ch353_setup,
2424 * ASIX devices with FIFO bug
2427 .vendor = PCI_VENDOR_ID_ASIX,
2428 .device = PCI_ANY_ID,
2429 .subvendor = PCI_ANY_ID,
2430 .subdevice = PCI_ANY_ID,
2431 .setup = pci_asix_setup,
2434 * Commtech, Inc. Fastcom adapters
2438 .vendor = PCI_VENDOR_ID_COMMTECH,
2439 .device = PCI_DEVICE_ID_COMMTECH_4222PCI335,
2440 .subvendor = PCI_ANY_ID,
2441 .subdevice = PCI_ANY_ID,
2442 .setup = pci_fastcom335_setup,
2445 .vendor = PCI_VENDOR_ID_COMMTECH,
2446 .device = PCI_DEVICE_ID_COMMTECH_4224PCI335,
2447 .subvendor = PCI_ANY_ID,
2448 .subdevice = PCI_ANY_ID,
2449 .setup = pci_fastcom335_setup,
2452 .vendor = PCI_VENDOR_ID_COMMTECH,
2453 .device = PCI_DEVICE_ID_COMMTECH_2324PCI335,
2454 .subvendor = PCI_ANY_ID,
2455 .subdevice = PCI_ANY_ID,
2456 .setup = pci_fastcom335_setup,
2459 .vendor = PCI_VENDOR_ID_COMMTECH,
2460 .device = PCI_DEVICE_ID_COMMTECH_2328PCI335,
2461 .subvendor = PCI_ANY_ID,
2462 .subdevice = PCI_ANY_ID,
2463 .setup = pci_fastcom335_setup,
2466 .vendor = PCI_VENDOR_ID_COMMTECH,
2467 .device = PCI_DEVICE_ID_COMMTECH_4222PCIE,
2468 .subvendor = PCI_ANY_ID,
2469 .subdevice = PCI_ANY_ID,
2470 .setup = pci_xr17v35x_setup,
2473 .vendor = PCI_VENDOR_ID_COMMTECH,
2474 .device = PCI_DEVICE_ID_COMMTECH_4224PCIE,
2475 .subvendor = PCI_ANY_ID,
2476 .subdevice = PCI_ANY_ID,
2477 .setup = pci_xr17v35x_setup,
2480 .vendor = PCI_VENDOR_ID_COMMTECH,
2481 .device = PCI_DEVICE_ID_COMMTECH_4228PCIE,
2482 .subvendor = PCI_ANY_ID,
2483 .subdevice = PCI_ANY_ID,
2484 .setup = pci_xr17v35x_setup,
2487 * Broadcom TruManage (NetXtreme)
2490 .vendor = PCI_VENDOR_ID_BROADCOM,
2491 .device = PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
2492 .subvendor = PCI_ANY_ID,
2493 .subdevice = PCI_ANY_ID,
2494 .setup = pci_brcm_trumanage_setup,
2499 .subvendor = PCI_ANY_ID,
2500 .subdevice = PCI_ANY_ID,
2501 .setup = pci_fintek_setup,
2506 .subvendor = PCI_ANY_ID,
2507 .subdevice = PCI_ANY_ID,
2508 .setup = pci_fintek_setup,
2513 .subvendor = PCI_ANY_ID,
2514 .subdevice = PCI_ANY_ID,
2515 .setup = pci_fintek_setup,
2519 * Default "match everything" terminator entry
2522 .vendor = PCI_ANY_ID,
2523 .device = PCI_ANY_ID,
2524 .subvendor = PCI_ANY_ID,
2525 .subdevice = PCI_ANY_ID,
2526 .setup = pci_default_setup,
2530 static inline int quirk_id_matches(u32 quirk_id, u32 dev_id)
2532 return quirk_id == PCI_ANY_ID || quirk_id == dev_id;
2535 static struct pci_serial_quirk *find_quirk(struct pci_dev *dev)
2537 struct pci_serial_quirk *quirk;
2539 for (quirk = pci_serial_quirks; ; quirk++)
2540 if (quirk_id_matches(quirk->vendor, dev->vendor) &&
2541 quirk_id_matches(quirk->device, dev->device) &&
2542 quirk_id_matches(quirk->subvendor, dev->subsystem_vendor) &&
2543 quirk_id_matches(quirk->subdevice, dev->subsystem_device))
2548 static inline int get_pci_irq(struct pci_dev *dev,
2549 const struct pciserial_board *board)
2551 if (board->flags & FL_NOIRQ)
2558 * This is the configuration table for all of the PCI serial boards
2559 * which we support. It is directly indexed by the pci_board_num_t enum
2560 * value, which is encoded in the pci_device_id PCI probe table's
2561 * driver_data member.
2563 * The makeup of these names are:
2564 * pbn_bn{_bt}_n_baud{_offsetinhex}
2566 * bn = PCI BAR number
2567 * bt = Index using PCI BARs
2568 * n = number of serial ports
2570 * offsetinhex = offset for each sequential port (in hex)
2572 * This table is sorted by (in order): bn, bt, baud, offsetindex, n.
2574 * Please note: in theory if n = 1, _bt infix should make no difference.
2575 * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
2577 enum pci_board_num_t {
2594 pbn_b0_2_1152000_200,
2595 pbn_b0_4_1152000_200,
2596 pbn_b0_8_1152000_200,
2601 pbn_b0_2_1843200_200,
2602 pbn_b0_4_1843200_200,
2603 pbn_b0_8_1843200_200,
2677 * Board-specific versions.
2684 pbn_oxsemi_1_4000000,
2685 pbn_oxsemi_2_4000000,
2686 pbn_oxsemi_4_4000000,
2687 pbn_oxsemi_8_4000000,
2700 pbn_exar_ibm_saturn,
2706 pbn_ADDIDATA_PCIe_1_3906250,
2707 pbn_ADDIDATA_PCIe_2_3906250,
2708 pbn_ADDIDATA_PCIe_4_3906250,
2709 pbn_ADDIDATA_PCIe_8_3906250,
2710 pbn_ce4100_1_115200,
2713 pbn_NETMOS9900_2s_115200,
2721 * uart_offset - the space between channels
2722 * reg_shift - describes how the UART registers are mapped
2723 * to PCI memory by the card.
2724 * For example IER register on SBS, Inc. PMC-OctPro is located at
2725 * offset 0x10 from the UART base, while UART_IER is defined as 1
2726 * in include/linux/serial_reg.h,
2727 * see first lines of serial_in() and serial_out() in 8250.c
2730 static struct pciserial_board pci_boards[] = {
2734 .base_baud = 115200,
2737 [pbn_b0_1_115200] = {
2740 .base_baud = 115200,
2743 [pbn_b0_2_115200] = {
2746 .base_baud = 115200,
2749 [pbn_b0_4_115200] = {
2752 .base_baud = 115200,
2755 [pbn_b0_5_115200] = {
2758 .base_baud = 115200,
2761 [pbn_b0_8_115200] = {
2764 .base_baud = 115200,
2767 [pbn_b0_1_921600] = {
2770 .base_baud = 921600,
2773 [pbn_b0_2_921600] = {
2776 .base_baud = 921600,
2779 [pbn_b0_4_921600] = {
2782 .base_baud = 921600,
2786 [pbn_b0_2_1130000] = {
2789 .base_baud = 1130000,
2793 [pbn_b0_4_1152000] = {
2796 .base_baud = 1152000,
2800 [pbn_b0_2_1152000_200] = {
2803 .base_baud = 1152000,
2804 .uart_offset = 0x200,
2807 [pbn_b0_4_1152000_200] = {
2810 .base_baud = 1152000,
2811 .uart_offset = 0x200,
2814 [pbn_b0_8_1152000_200] = {
2817 .base_baud = 1152000,
2818 .uart_offset = 0x200,
2821 [pbn_b0_2_1843200] = {
2824 .base_baud = 1843200,
2827 [pbn_b0_4_1843200] = {
2830 .base_baud = 1843200,
2834 [pbn_b0_2_1843200_200] = {
2837 .base_baud = 1843200,
2838 .uart_offset = 0x200,
2840 [pbn_b0_4_1843200_200] = {
2843 .base_baud = 1843200,
2844 .uart_offset = 0x200,
2846 [pbn_b0_8_1843200_200] = {
2849 .base_baud = 1843200,
2850 .uart_offset = 0x200,
2852 [pbn_b0_1_4000000] = {
2855 .base_baud = 4000000,
2859 [pbn_b0_bt_1_115200] = {
2860 .flags = FL_BASE0|FL_BASE_BARS,
2862 .base_baud = 115200,
2865 [pbn_b0_bt_2_115200] = {
2866 .flags = FL_BASE0|FL_BASE_BARS,
2868 .base_baud = 115200,
2871 [pbn_b0_bt_4_115200] = {
2872 .flags = FL_BASE0|FL_BASE_BARS,
2874 .base_baud = 115200,
2877 [pbn_b0_bt_8_115200] = {
2878 .flags = FL_BASE0|FL_BASE_BARS,
2880 .base_baud = 115200,
2884 [pbn_b0_bt_1_460800] = {
2885 .flags = FL_BASE0|FL_BASE_BARS,
2887 .base_baud = 460800,
2890 [pbn_b0_bt_2_460800] = {
2891 .flags = FL_BASE0|FL_BASE_BARS,
2893 .base_baud = 460800,
2896 [pbn_b0_bt_4_460800] = {
2897 .flags = FL_BASE0|FL_BASE_BARS,
2899 .base_baud = 460800,
2903 [pbn_b0_bt_1_921600] = {
2904 .flags = FL_BASE0|FL_BASE_BARS,
2906 .base_baud = 921600,
2909 [pbn_b0_bt_2_921600] = {
2910 .flags = FL_BASE0|FL_BASE_BARS,
2912 .base_baud = 921600,
2915 [pbn_b0_bt_4_921600] = {
2916 .flags = FL_BASE0|FL_BASE_BARS,
2918 .base_baud = 921600,
2921 [pbn_b0_bt_8_921600] = {
2922 .flags = FL_BASE0|FL_BASE_BARS,
2924 .base_baud = 921600,
2928 [pbn_b1_1_115200] = {
2931 .base_baud = 115200,
2934 [pbn_b1_2_115200] = {
2937 .base_baud = 115200,
2940 [pbn_b1_4_115200] = {
2943 .base_baud = 115200,
2946 [pbn_b1_8_115200] = {
2949 .base_baud = 115200,
2952 [pbn_b1_16_115200] = {
2955 .base_baud = 115200,
2959 [pbn_b1_1_921600] = {
2962 .base_baud = 921600,
2965 [pbn_b1_2_921600] = {
2968 .base_baud = 921600,
2971 [pbn_b1_4_921600] = {
2974 .base_baud = 921600,
2977 [pbn_b1_8_921600] = {
2980 .base_baud = 921600,
2983 [pbn_b1_2_1250000] = {
2986 .base_baud = 1250000,
2990 [pbn_b1_bt_1_115200] = {
2991 .flags = FL_BASE1|FL_BASE_BARS,
2993 .base_baud = 115200,
2996 [pbn_b1_bt_2_115200] = {
2997 .flags = FL_BASE1|FL_BASE_BARS,
2999 .base_baud = 115200,
3002 [pbn_b1_bt_4_115200] = {
3003 .flags = FL_BASE1|FL_BASE_BARS,
3005 .base_baud = 115200,
3009 [pbn_b1_bt_2_921600] = {
3010 .flags = FL_BASE1|FL_BASE_BARS,
3012 .base_baud = 921600,
3016 [pbn_b1_1_1382400] = {
3019 .base_baud = 1382400,
3022 [pbn_b1_2_1382400] = {
3025 .base_baud = 1382400,
3028 [pbn_b1_4_1382400] = {
3031 .base_baud = 1382400,
3034 [pbn_b1_8_1382400] = {
3037 .base_baud = 1382400,
3041 [pbn_b2_1_115200] = {
3044 .base_baud = 115200,
3047 [pbn_b2_2_115200] = {
3050 .base_baud = 115200,
3053 [pbn_b2_4_115200] = {
3056 .base_baud = 115200,
3059 [pbn_b2_8_115200] = {
3062 .base_baud = 115200,
3066 [pbn_b2_1_460800] = {
3069 .base_baud = 460800,
3072 [pbn_b2_4_460800] = {
3075 .base_baud = 460800,
3078 [pbn_b2_8_460800] = {
3081 .base_baud = 460800,
3084 [pbn_b2_16_460800] = {
3087 .base_baud = 460800,
3091 [pbn_b2_1_921600] = {
3094 .base_baud = 921600,
3097 [pbn_b2_4_921600] = {
3100 .base_baud = 921600,
3103 [pbn_b2_8_921600] = {
3106 .base_baud = 921600,
3110 [pbn_b2_8_1152000] = {
3113 .base_baud = 1152000,
3117 [pbn_b2_bt_1_115200] = {
3118 .flags = FL_BASE2|FL_BASE_BARS,
3120 .base_baud = 115200,
3123 [pbn_b2_bt_2_115200] = {
3124 .flags = FL_BASE2|FL_BASE_BARS,
3126 .base_baud = 115200,
3129 [pbn_b2_bt_4_115200] = {
3130 .flags = FL_BASE2|FL_BASE_BARS,
3132 .base_baud = 115200,
3136 [pbn_b2_bt_2_921600] = {
3137 .flags = FL_BASE2|FL_BASE_BARS,
3139 .base_baud = 921600,
3142 [pbn_b2_bt_4_921600] = {
3143 .flags = FL_BASE2|FL_BASE_BARS,
3145 .base_baud = 921600,
3149 [pbn_b3_2_115200] = {
3152 .base_baud = 115200,
3155 [pbn_b3_4_115200] = {
3158 .base_baud = 115200,
3161 [pbn_b3_8_115200] = {
3164 .base_baud = 115200,
3168 [pbn_b4_bt_2_921600] = {
3171 .base_baud = 921600,
3174 [pbn_b4_bt_4_921600] = {
3177 .base_baud = 921600,
3180 [pbn_b4_bt_8_921600] = {
3183 .base_baud = 921600,
3188 * Entries following this are board-specific.
3197 .base_baud = 921600,
3198 .uart_offset = 0x400,
3202 .flags = FL_BASE2|FL_BASE_BARS,
3204 .base_baud = 921600,
3205 .uart_offset = 0x400,
3209 .flags = FL_BASE2|FL_BASE_BARS,
3211 .base_baud = 921600,
3212 .uart_offset = 0x400,
3216 /* I think this entry is broken - the first_offset looks wrong --rmk */
3217 [pbn_plx_romulus] = {
3220 .base_baud = 921600,
3221 .uart_offset = 8 << 2,
3223 .first_offset = 0x03,
3227 * This board uses the size of PCI Base region 0 to
3228 * signal now many ports are available
3231 .flags = FL_BASE0|FL_REGION_SZ_CAP,
3233 .base_baud = 115200,
3236 [pbn_oxsemi_1_4000000] = {
3239 .base_baud = 4000000,
3240 .uart_offset = 0x200,
3241 .first_offset = 0x1000,
3243 [pbn_oxsemi_2_4000000] = {
3246 .base_baud = 4000000,
3247 .uart_offset = 0x200,
3248 .first_offset = 0x1000,
3250 [pbn_oxsemi_4_4000000] = {
3253 .base_baud = 4000000,
3254 .uart_offset = 0x200,
3255 .first_offset = 0x1000,
3257 [pbn_oxsemi_8_4000000] = {
3260 .base_baud = 4000000,
3261 .uart_offset = 0x200,
3262 .first_offset = 0x1000,
3267 * EKF addition for i960 Boards form EKF with serial port.
3270 [pbn_intel_i960] = {
3273 .base_baud = 921600,
3274 .uart_offset = 8 << 2,
3276 .first_offset = 0x10000,
3279 .flags = FL_BASE0|FL_NOIRQ,
3281 .base_baud = 458333,
3284 .first_offset = 0x20178,
3288 * Computone - uses IOMEM.
3290 [pbn_computone_4] = {
3293 .base_baud = 921600,
3294 .uart_offset = 0x40,
3296 .first_offset = 0x200,
3298 [pbn_computone_6] = {
3301 .base_baud = 921600,
3302 .uart_offset = 0x40,
3304 .first_offset = 0x200,
3306 [pbn_computone_8] = {
3309 .base_baud = 921600,
3310 .uart_offset = 0x40,
3312 .first_offset = 0x200,
3317 .base_baud = 460800,
3322 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
3323 * Only basic 16550A support.
3324 * XR17C15[24] are not tested, but they should work.
3326 [pbn_exar_XR17C152] = {
3329 .base_baud = 921600,
3330 .uart_offset = 0x200,
3332 [pbn_exar_XR17C154] = {
3335 .base_baud = 921600,
3336 .uart_offset = 0x200,
3338 [pbn_exar_XR17C158] = {
3341 .base_baud = 921600,
3342 .uart_offset = 0x200,
3344 [pbn_exar_XR17V352] = {
3347 .base_baud = 7812500,
3348 .uart_offset = 0x400,
3352 [pbn_exar_XR17V354] = {
3355 .base_baud = 7812500,
3356 .uart_offset = 0x400,
3360 [pbn_exar_XR17V358] = {
3363 .base_baud = 7812500,
3364 .uart_offset = 0x400,
3368 [pbn_exar_ibm_saturn] = {
3371 .base_baud = 921600,
3372 .uart_offset = 0x200,
3376 * PA Semi PWRficient PA6T-1682M on-chip UART
3378 [pbn_pasemi_1682M] = {
3381 .base_baud = 8333333,
3384 * National Instruments 843x
3389 .base_baud = 3686400,
3390 .uart_offset = 0x10,
3391 .first_offset = 0x800,
3396 .base_baud = 3686400,
3397 .uart_offset = 0x10,
3398 .first_offset = 0x800,
3403 .base_baud = 3686400,
3404 .uart_offset = 0x10,
3405 .first_offset = 0x800,
3410 .base_baud = 3686400,
3411 .uart_offset = 0x10,
3412 .first_offset = 0x800,
3415 * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com>
3417 [pbn_ADDIDATA_PCIe_1_3906250] = {
3420 .base_baud = 3906250,
3421 .uart_offset = 0x200,
3422 .first_offset = 0x1000,
3424 [pbn_ADDIDATA_PCIe_2_3906250] = {
3427 .base_baud = 3906250,
3428 .uart_offset = 0x200,
3429 .first_offset = 0x1000,
3431 [pbn_ADDIDATA_PCIe_4_3906250] = {
3434 .base_baud = 3906250,
3435 .uart_offset = 0x200,
3436 .first_offset = 0x1000,
3438 [pbn_ADDIDATA_PCIe_8_3906250] = {
3441 .base_baud = 3906250,
3442 .uart_offset = 0x200,
3443 .first_offset = 0x1000,
3445 [pbn_ce4100_1_115200] = {
3446 .flags = FL_BASE_BARS,
3448 .base_baud = 921600,
3454 .base_baud = 2764800,
3455 .uart_offset = 0x80,
3461 .base_baud = 115200,
3462 .uart_offset = 0x200,
3464 [pbn_NETMOS9900_2s_115200] = {
3467 .base_baud = 115200,
3469 [pbn_brcm_trumanage] = {
3473 .base_baud = 115200,
3478 .base_baud = 115200,
3479 .first_offset = 0x40,
3484 .base_baud = 115200,
3485 .first_offset = 0x40,
3490 .base_baud = 115200,
3491 .first_offset = 0x40,
3495 static const struct pci_device_id blacklist[] = {
3497 { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */
3498 { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */
3499 { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */
3501 /* multi-io cards handled by parport_serial */
3502 { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */
3506 * Given a complete unknown PCI device, try to use some heuristics to
3507 * guess what the configuration might be, based on the pitiful PCI
3508 * serial specs. Returns 0 on success, 1 on failure.
3511 serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
3513 const struct pci_device_id *bldev;
3514 int num_iomem, num_port, first_port = -1, i;
3517 * If it is not a communications device or the programming
3518 * interface is greater than 6, give up.
3520 * (Should we try to make guesses for multiport serial devices
3523 if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
3524 ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
3525 (dev->class & 0xff) > 6)
3529 * Do not access blacklisted devices that are known not to
3530 * feature serial ports or are handled by other modules.
3532 for (bldev = blacklist;
3533 bldev < blacklist + ARRAY_SIZE(blacklist);
3535 if (dev->vendor == bldev->vendor &&
3536 dev->device == bldev->device)
3540 num_iomem = num_port = 0;
3541 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
3542 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
3544 if (first_port == -1)
3547 if (pci_resource_flags(dev, i) & IORESOURCE_MEM)
3552 * If there is 1 or 0 iomem regions, and exactly one port,
3553 * use it. We guess the number of ports based on the IO
3556 if (num_iomem <= 1 && num_port == 1) {
3557 board->flags = first_port;
3558 board->num_ports = pci_resource_len(dev, first_port) / 8;
3563 * Now guess if we've got a board which indexes by BARs.
3564 * Each IO BAR should be 8 bytes, and they should follow
3569 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
3570 if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
3571 pci_resource_len(dev, i) == 8 &&
3572 (first_port == -1 || (first_port + num_port) == i)) {
3574 if (first_port == -1)
3580 board->flags = first_port | FL_BASE_BARS;
3581 board->num_ports = num_port;
3589 serial_pci_matches(const struct pciserial_board *board,
3590 const struct pciserial_board *guessed)
3593 board->num_ports == guessed->num_ports &&
3594 board->base_baud == guessed->base_baud &&
3595 board->uart_offset == guessed->uart_offset &&
3596 board->reg_shift == guessed->reg_shift &&
3597 board->first_offset == guessed->first_offset;
3600 struct serial_private *
3601 pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)
3603 struct uart_8250_port uart;
3604 struct serial_private *priv;
3605 struct pci_serial_quirk *quirk;
3606 int rc, nr_ports, i;
3608 nr_ports = board->num_ports;
3611 * Find an init and setup quirks.
3613 quirk = find_quirk(dev);
3616 * Run the new-style initialization function.
3617 * The initialization function returns:
3619 * 0 - use board->num_ports
3620 * >0 - number of ports
3623 rc = quirk->init(dev);
3632 priv = kzalloc(sizeof(struct serial_private) +
3633 sizeof(unsigned int) * nr_ports,
3636 priv = ERR_PTR(-ENOMEM);
3641 priv->quirk = quirk;
3643 memset(&uart, 0, sizeof(uart));
3644 uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
3645 uart.port.uartclk = board->base_baud * 16;
3646 uart.port.irq = get_pci_irq(dev, board);
3647 uart.port.dev = &dev->dev;
3649 for (i = 0; i < nr_ports; i++) {
3650 if (quirk->setup(priv, board, &uart, i))
3653 dev_dbg(&dev->dev, "Setup PCI port: port %lx, irq %d, type %d\n",
3654 uart.port.iobase, uart.port.irq, uart.port.iotype);
3656 priv->line[i] = serial8250_register_8250_port(&uart);
3657 if (priv->line[i] < 0) {
3659 "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
3660 uart.port.iobase, uart.port.irq,
3661 uart.port.iotype, priv->line[i]);
3674 EXPORT_SYMBOL_GPL(pciserial_init_ports);
3676 void pciserial_remove_ports(struct serial_private *priv)
3678 struct pci_serial_quirk *quirk;
3681 for (i = 0; i < priv->nr; i++)
3682 serial8250_unregister_port(priv->line[i]);
3684 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
3685 if (priv->remapped_bar[i])
3686 iounmap(priv->remapped_bar[i]);
3687 priv->remapped_bar[i] = NULL;
3691 * Find the exit quirks.
3693 quirk = find_quirk(priv->dev);
3695 quirk->exit(priv->dev);
3699 EXPORT_SYMBOL_GPL(pciserial_remove_ports);
3701 void pciserial_suspend_ports(struct serial_private *priv)
3705 for (i = 0; i < priv->nr; i++)
3706 if (priv->line[i] >= 0)
3707 serial8250_suspend_port(priv->line[i]);
3710 * Ensure that every init quirk is properly torn down
3712 if (priv->quirk->exit)
3713 priv->quirk->exit(priv->dev);
3715 EXPORT_SYMBOL_GPL(pciserial_suspend_ports);
3717 void pciserial_resume_ports(struct serial_private *priv)
3722 * Ensure that the board is correctly configured.
3724 if (priv->quirk->init)
3725 priv->quirk->init(priv->dev);
3727 for (i = 0; i < priv->nr; i++)
3728 if (priv->line[i] >= 0)
3729 serial8250_resume_port(priv->line[i]);
3731 EXPORT_SYMBOL_GPL(pciserial_resume_ports);
3734 * Probe one serial board. Unfortunately, there is no rhyme nor reason
3735 * to the arrangement of serial ports on a PCI card.
3738 pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
3740 struct pci_serial_quirk *quirk;
3741 struct serial_private *priv;
3742 const struct pciserial_board *board;
3743 struct pciserial_board tmp;
3746 quirk = find_quirk(dev);
3748 rc = quirk->probe(dev);
3753 if (ent->driver_data >= ARRAY_SIZE(pci_boards)) {
3754 dev_err(&dev->dev, "invalid driver_data: %ld\n",
3759 board = &pci_boards[ent->driver_data];
3761 rc = pci_enable_device(dev);
3762 pci_save_state(dev);
3766 if (ent->driver_data == pbn_default) {
3768 * Use a copy of the pci_board entry for this;
3769 * avoid changing entries in the table.
3771 memcpy(&tmp, board, sizeof(struct pciserial_board));
3775 * We matched one of our class entries. Try to
3776 * determine the parameters of this board.
3778 rc = serial_pci_guess_board(dev, &tmp);
3783 * We matched an explicit entry. If we are able to
3784 * detect this boards settings with our heuristic,
3785 * then we no longer need this entry.
3787 memcpy(&tmp, &pci_boards[pbn_default],
3788 sizeof(struct pciserial_board));
3789 rc = serial_pci_guess_board(dev, &tmp);
3790 if (rc == 0 && serial_pci_matches(board, &tmp))
3791 moan_device("Redundant entry in serial pci_table.",
3795 priv = pciserial_init_ports(dev, board);
3796 if (!IS_ERR(priv)) {
3797 pci_set_drvdata(dev, priv);
3804 pci_disable_device(dev);
3808 static void pciserial_remove_one(struct pci_dev *dev)
3810 struct serial_private *priv = pci_get_drvdata(dev);
3812 pciserial_remove_ports(priv);
3814 pci_disable_device(dev);
3818 static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
3820 struct serial_private *priv = pci_get_drvdata(dev);
3823 pciserial_suspend_ports(priv);
3825 pci_save_state(dev);
3826 pci_set_power_state(dev, pci_choose_state(dev, state));
3830 static int pciserial_resume_one(struct pci_dev *dev)
3833 struct serial_private *priv = pci_get_drvdata(dev);
3835 pci_set_power_state(dev, PCI_D0);
3836 pci_restore_state(dev);
3840 * The device may have been disabled. Re-enable it.
3842 err = pci_enable_device(dev);
3843 /* FIXME: We cannot simply error out here */
3845 dev_err(&dev->dev, "Unable to re-enable ports, trying to continue.\n");
3846 pciserial_resume_ports(priv);
3852 static struct pci_device_id serial_pci_tbl[] = {
3853 /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */
3854 { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3620,
3855 PCI_DEVICE_ID_ADVANTECH_PCI3620, 0x0001, 0, 0,
3857 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
3858 PCI_SUBVENDOR_ID_CONNECT_TECH,
3859 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
3861 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
3862 PCI_SUBVENDOR_ID_CONNECT_TECH,
3863 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
3865 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
3866 PCI_SUBVENDOR_ID_CONNECT_TECH,
3867 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
3869 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3870 PCI_SUBVENDOR_ID_CONNECT_TECH,
3871 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
3873 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3874 PCI_SUBVENDOR_ID_CONNECT_TECH,
3875 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
3877 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3878 PCI_SUBVENDOR_ID_CONNECT_TECH,
3879 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
3881 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3882 PCI_SUBVENDOR_ID_CONNECT_TECH,
3883 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485, 0, 0,
3885 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3886 PCI_SUBVENDOR_ID_CONNECT_TECH,
3887 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4, 0, 0,
3889 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3890 PCI_SUBVENDOR_ID_CONNECT_TECH,
3891 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485, 0, 0,
3893 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3894 PCI_SUBVENDOR_ID_CONNECT_TECH,
3895 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2, 0, 0,
3897 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3898 PCI_SUBVENDOR_ID_CONNECT_TECH,
3899 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485, 0, 0,
3901 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3902 PCI_SUBVENDOR_ID_CONNECT_TECH,
3903 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6, 0, 0,
3905 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3906 PCI_SUBVENDOR_ID_CONNECT_TECH,
3907 PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1, 0, 0,
3909 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3910 PCI_SUBVENDOR_ID_CONNECT_TECH,
3911 PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1, 0, 0,
3913 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
3914 PCI_SUBVENDOR_ID_CONNECT_TECH,
3915 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ, 0, 0,
3917 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3918 PCI_SUBVENDOR_ID_CONNECT_TECH,
3919 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2, 0, 0,
3921 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3922 PCI_SUBVENDOR_ID_CONNECT_TECH,
3923 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0,
3925 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
3926 PCI_VENDOR_ID_AFAVLAB,
3927 PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0,
3929 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3930 PCI_SUBVENDOR_ID_CONNECT_TECH,
3931 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232, 0, 0,
3932 pbn_b0_2_1843200_200 },
3933 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3934 PCI_SUBVENDOR_ID_CONNECT_TECH,
3935 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232, 0, 0,
3936 pbn_b0_4_1843200_200 },
3937 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3938 PCI_SUBVENDOR_ID_CONNECT_TECH,
3939 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232, 0, 0,
3940 pbn_b0_8_1843200_200 },
3941 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3942 PCI_SUBVENDOR_ID_CONNECT_TECH,
3943 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1, 0, 0,
3944 pbn_b0_2_1843200_200 },
3945 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3946 PCI_SUBVENDOR_ID_CONNECT_TECH,
3947 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2, 0, 0,
3948 pbn_b0_4_1843200_200 },
3949 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3950 PCI_SUBVENDOR_ID_CONNECT_TECH,
3951 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4, 0, 0,
3952 pbn_b0_8_1843200_200 },
3953 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3954 PCI_SUBVENDOR_ID_CONNECT_TECH,
3955 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2, 0, 0,
3956 pbn_b0_2_1843200_200 },
3957 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3958 PCI_SUBVENDOR_ID_CONNECT_TECH,
3959 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4, 0, 0,
3960 pbn_b0_4_1843200_200 },
3961 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3962 PCI_SUBVENDOR_ID_CONNECT_TECH,
3963 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8, 0, 0,
3964 pbn_b0_8_1843200_200 },
3965 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3966 PCI_SUBVENDOR_ID_CONNECT_TECH,
3967 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485, 0, 0,
3968 pbn_b0_2_1843200_200 },
3969 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
3970 PCI_SUBVENDOR_ID_CONNECT_TECH,
3971 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485, 0, 0,
3972 pbn_b0_4_1843200_200 },
3973 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
3974 PCI_SUBVENDOR_ID_CONNECT_TECH,
3975 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0,
3976 pbn_b0_8_1843200_200 },
3977 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
3978 PCI_VENDOR_ID_IBM, PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT,
3979 0, 0, pbn_exar_ibm_saturn },
3981 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530,
3982 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3983 pbn_b2_bt_1_115200 },
3984 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM2,
3985 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3986 pbn_b2_bt_2_115200 },
3987 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM422,
3988 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3989 pbn_b2_bt_4_115200 },
3990 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM232,
3991 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3992 pbn_b2_bt_2_115200 },
3993 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM4,
3994 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3995 pbn_b2_bt_4_115200 },
3996 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
3997 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
3999 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_7803,
4000 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4002 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
4003 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4006 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2,
4007 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4008 pbn_b2_bt_2_115200 },
4009 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM200,
4010 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4011 pbn_b2_bt_2_921600 },
4013 * VScom SPCOM800, from sl@s.pl
4015 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM800,
4016 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4018 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_1077,
4019 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4021 /* Unknown card - subdevice 0x1584 */
4022 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4024 PCI_SUBDEVICE_ID_UNKNOWN_0x1584, 0, 0,
4026 /* Unknown card - subdevice 0x1588 */
4027 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4029 PCI_SUBDEVICE_ID_UNKNOWN_0x1588, 0, 0,
4031 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4032 PCI_SUBVENDOR_ID_KEYSPAN,
4033 PCI_SUBDEVICE_ID_KEYSPAN_SX2, 0, 0,
4035 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM,
4036 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4038 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM,
4039 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4041 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
4042 PCI_VENDOR_ID_ESDGMBH,
4043 PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0,
4045 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4046 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
4047 PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0,
4049 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4050 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
4051 PCI_SUBDEVICE_ID_CHASE_PCIFAST8, 0, 0,
4053 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4054 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
4055 PCI_SUBDEVICE_ID_CHASE_PCIFAST16, 0, 0,
4057 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4058 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
4059 PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC, 0, 0,
4061 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4062 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
4063 PCI_SUBDEVICE_ID_CHASE_PCIRAS4, 0, 0,
4065 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4066 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
4067 PCI_SUBDEVICE_ID_CHASE_PCIRAS8, 0, 0,
4069 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4070 PCI_SUBVENDOR_ID_EXSYS,
4071 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0,
4074 * Megawolf Romulus PCI Serial Card, from Mike Hudson
4077 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_ROMULUS,
4078 0x10b5, 0x106a, 0, 0,
4081 * Quatech cards. These actually have configurable clocks but for
4082 * now we just use the default.
4084 * 100 series are RS232, 200 series RS422,
4086 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,
4087 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4089 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100,
4090 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4092 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100E,
4093 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4095 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC200,
4096 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4098 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC200E,
4099 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4101 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC200,
4102 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4104 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D,
4105 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4107 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M,
4108 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4110 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCP100,
4111 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4113 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCP100,
4114 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4116 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCP200,
4117 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4119 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCP200,
4120 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4122 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCLP100,
4123 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4125 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCLP100,
4126 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4128 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SSCLP100,
4129 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4131 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCLP200,
4132 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4134 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCLP200,
4135 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4137 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SSCLP200,
4138 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4140 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESCLP100,
4141 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4144 { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954,
4145 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4,
4148 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
4149 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL,
4152 { PCI_VENDOR_ID_OXSEMI, 0x9505,
4153 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4154 pbn_b0_bt_2_921600 },
4157 * The below card is a little controversial since it is the
4158 * subject of a PCI vendor/device ID clash. (See
4159 * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
4160 * For now just used the hex ID 0x950a.
4162 { PCI_VENDOR_ID_OXSEMI, 0x950a,
4163 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_00,
4164 0, 0, pbn_b0_2_115200 },
4165 { PCI_VENDOR_ID_OXSEMI, 0x950a,
4166 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_30,
4167 0, 0, pbn_b0_2_115200 },
4168 { PCI_VENDOR_ID_OXSEMI, 0x950a,
4169 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4171 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_C950,
4172 PCI_VENDOR_ID_OXSEMI, PCI_SUBDEVICE_ID_OXSEMI_C950, 0, 0,
4174 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
4175 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4177 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
4178 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4179 pbn_b0_bt_2_921600 },
4180 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI958,
4181 PCI_ANY_ID , PCI_ANY_ID, 0, 0,
4185 * Oxford Semiconductor Inc. Tornado PCI express device range.
4187 { PCI_VENDOR_ID_OXSEMI, 0xc101, /* OXPCIe952 1 Legacy UART */
4188 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4190 { PCI_VENDOR_ID_OXSEMI, 0xc105, /* OXPCIe952 1 Legacy UART */
4191 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4193 { PCI_VENDOR_ID_OXSEMI, 0xc11b, /* OXPCIe952 1 Native UART */
4194 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4195 pbn_oxsemi_1_4000000 },
4196 { PCI_VENDOR_ID_OXSEMI, 0xc11f, /* OXPCIe952 1 Native UART */
4197 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4198 pbn_oxsemi_1_4000000 },
4199 { PCI_VENDOR_ID_OXSEMI, 0xc120, /* OXPCIe952 1 Legacy UART */
4200 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4202 { PCI_VENDOR_ID_OXSEMI, 0xc124, /* OXPCIe952 1 Legacy UART */
4203 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4205 { PCI_VENDOR_ID_OXSEMI, 0xc138, /* OXPCIe952 1 Native UART */
4206 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4207 pbn_oxsemi_1_4000000 },
4208 { PCI_VENDOR_ID_OXSEMI, 0xc13d, /* OXPCIe952 1 Native UART */
4209 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4210 pbn_oxsemi_1_4000000 },
4211 { PCI_VENDOR_ID_OXSEMI, 0xc140, /* OXPCIe952 1 Legacy UART */
4212 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4214 { PCI_VENDOR_ID_OXSEMI, 0xc141, /* OXPCIe952 1 Legacy UART */
4215 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4217 { PCI_VENDOR_ID_OXSEMI, 0xc144, /* OXPCIe952 1 Legacy UART */
4218 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4220 { PCI_VENDOR_ID_OXSEMI, 0xc145, /* OXPCIe952 1 Legacy UART */
4221 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4223 { PCI_VENDOR_ID_OXSEMI, 0xc158, /* OXPCIe952 2 Native UART */
4224 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4225 pbn_oxsemi_2_4000000 },
4226 { PCI_VENDOR_ID_OXSEMI, 0xc15d, /* OXPCIe952 2 Native UART */
4227 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4228 pbn_oxsemi_2_4000000 },
4229 { PCI_VENDOR_ID_OXSEMI, 0xc208, /* OXPCIe954 4 Native UART */
4230 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4231 pbn_oxsemi_4_4000000 },
4232 { PCI_VENDOR_ID_OXSEMI, 0xc20d, /* OXPCIe954 4 Native UART */
4233 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4234 pbn_oxsemi_4_4000000 },
4235 { PCI_VENDOR_ID_OXSEMI, 0xc308, /* OXPCIe958 8 Native UART */
4236 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4237 pbn_oxsemi_8_4000000 },
4238 { PCI_VENDOR_ID_OXSEMI, 0xc30d, /* OXPCIe958 8 Native UART */
4239 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4240 pbn_oxsemi_8_4000000 },
4241 { PCI_VENDOR_ID_OXSEMI, 0xc40b, /* OXPCIe200 1 Native UART */
4242 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4243 pbn_oxsemi_1_4000000 },
4244 { PCI_VENDOR_ID_OXSEMI, 0xc40f, /* OXPCIe200 1 Native UART */
4245 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4246 pbn_oxsemi_1_4000000 },
4247 { PCI_VENDOR_ID_OXSEMI, 0xc41b, /* OXPCIe200 1 Native UART */
4248 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4249 pbn_oxsemi_1_4000000 },
4250 { PCI_VENDOR_ID_OXSEMI, 0xc41f, /* OXPCIe200 1 Native UART */
4251 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4252 pbn_oxsemi_1_4000000 },
4253 { PCI_VENDOR_ID_OXSEMI, 0xc42b, /* OXPCIe200 1 Native UART */
4254 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4255 pbn_oxsemi_1_4000000 },
4256 { PCI_VENDOR_ID_OXSEMI, 0xc42f, /* OXPCIe200 1 Native UART */
4257 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4258 pbn_oxsemi_1_4000000 },
4259 { PCI_VENDOR_ID_OXSEMI, 0xc43b, /* OXPCIe200 1 Native UART */
4260 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4261 pbn_oxsemi_1_4000000 },
4262 { PCI_VENDOR_ID_OXSEMI, 0xc43f, /* OXPCIe200 1 Native UART */
4263 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4264 pbn_oxsemi_1_4000000 },
4265 { PCI_VENDOR_ID_OXSEMI, 0xc44b, /* OXPCIe200 1 Native UART */
4266 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4267 pbn_oxsemi_1_4000000 },
4268 { PCI_VENDOR_ID_OXSEMI, 0xc44f, /* OXPCIe200 1 Native UART */
4269 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4270 pbn_oxsemi_1_4000000 },
4271 { PCI_VENDOR_ID_OXSEMI, 0xc45b, /* OXPCIe200 1 Native UART */
4272 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4273 pbn_oxsemi_1_4000000 },
4274 { PCI_VENDOR_ID_OXSEMI, 0xc45f, /* OXPCIe200 1 Native UART */
4275 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4276 pbn_oxsemi_1_4000000 },
4277 { PCI_VENDOR_ID_OXSEMI, 0xc46b, /* OXPCIe200 1 Native UART */
4278 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4279 pbn_oxsemi_1_4000000 },
4280 { PCI_VENDOR_ID_OXSEMI, 0xc46f, /* OXPCIe200 1 Native UART */
4281 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4282 pbn_oxsemi_1_4000000 },
4283 { PCI_VENDOR_ID_OXSEMI, 0xc47b, /* OXPCIe200 1 Native UART */
4284 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4285 pbn_oxsemi_1_4000000 },
4286 { PCI_VENDOR_ID_OXSEMI, 0xc47f, /* OXPCIe200 1 Native UART */
4287 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4288 pbn_oxsemi_1_4000000 },
4289 { PCI_VENDOR_ID_OXSEMI, 0xc48b, /* OXPCIe200 1 Native UART */
4290 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4291 pbn_oxsemi_1_4000000 },
4292 { PCI_VENDOR_ID_OXSEMI, 0xc48f, /* OXPCIe200 1 Native UART */
4293 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4294 pbn_oxsemi_1_4000000 },
4295 { PCI_VENDOR_ID_OXSEMI, 0xc49b, /* OXPCIe200 1 Native UART */
4296 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4297 pbn_oxsemi_1_4000000 },
4298 { PCI_VENDOR_ID_OXSEMI, 0xc49f, /* OXPCIe200 1 Native UART */
4299 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4300 pbn_oxsemi_1_4000000 },
4301 { PCI_VENDOR_ID_OXSEMI, 0xc4ab, /* OXPCIe200 1 Native UART */
4302 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4303 pbn_oxsemi_1_4000000 },
4304 { PCI_VENDOR_ID_OXSEMI, 0xc4af, /* OXPCIe200 1 Native UART */
4305 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4306 pbn_oxsemi_1_4000000 },
4307 { PCI_VENDOR_ID_OXSEMI, 0xc4bb, /* OXPCIe200 1 Native UART */
4308 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4309 pbn_oxsemi_1_4000000 },
4310 { PCI_VENDOR_ID_OXSEMI, 0xc4bf, /* OXPCIe200 1 Native UART */
4311 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4312 pbn_oxsemi_1_4000000 },
4313 { PCI_VENDOR_ID_OXSEMI, 0xc4cb, /* OXPCIe200 1 Native UART */
4314 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4315 pbn_oxsemi_1_4000000 },
4316 { PCI_VENDOR_ID_OXSEMI, 0xc4cf, /* OXPCIe200 1 Native UART */
4317 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4318 pbn_oxsemi_1_4000000 },
4320 * Mainpine Inc. IQ Express "Rev3" utilizing OxSemi Tornado
4322 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 1 Port V.34 Super-G3 Fax */
4323 PCI_VENDOR_ID_MAINPINE, 0x4001, 0, 0,
4324 pbn_oxsemi_1_4000000 },
4325 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 2 Port V.34 Super-G3 Fax */
4326 PCI_VENDOR_ID_MAINPINE, 0x4002, 0, 0,
4327 pbn_oxsemi_2_4000000 },
4328 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 4 Port V.34 Super-G3 Fax */
4329 PCI_VENDOR_ID_MAINPINE, 0x4004, 0, 0,
4330 pbn_oxsemi_4_4000000 },
4331 { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 8 Port V.34 Super-G3 Fax */
4332 PCI_VENDOR_ID_MAINPINE, 0x4008, 0, 0,
4333 pbn_oxsemi_8_4000000 },
4336 * Digi/IBM PCIe 2-port Async EIA-232 Adapter utilizing OxSemi Tornado
4338 { PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_2_OX_IBM,
4339 PCI_SUBVENDOR_ID_IBM, PCI_ANY_ID, 0, 0,
4340 pbn_oxsemi_2_4000000 },
4343 * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
4344 * from skokodyn@yahoo.com
4346 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4347 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0,
4349 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4350 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0,
4352 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4353 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0,
4355 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
4356 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0,
4360 * Digitan DS560-558, from jimd@esoft.com
4362 { PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM,
4363 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4367 * Titan Electronic cards
4368 * The 400L and 800L have a custom setup quirk.
4370 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100,
4371 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4373 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200,
4374 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4376 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400,
4377 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4379 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B,
4380 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4382 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100L,
4383 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4385 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200L,
4386 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4387 pbn_b1_bt_2_921600 },
4388 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400L,
4389 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4390 pbn_b0_bt_4_921600 },
4391 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L,
4392 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4393 pbn_b0_bt_8_921600 },
4394 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200I,
4395 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4396 pbn_b4_bt_2_921600 },
4397 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400I,
4398 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4399 pbn_b4_bt_4_921600 },
4400 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800I,
4401 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4402 pbn_b4_bt_8_921600 },
4403 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400EH,
4404 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4406 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EH,
4407 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4409 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EHB,
4410 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4412 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100E,
4413 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4414 pbn_oxsemi_1_4000000 },
4415 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200E,
4416 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4417 pbn_oxsemi_2_4000000 },
4418 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400E,
4419 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4420 pbn_oxsemi_4_4000000 },
4421 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800E,
4422 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4423 pbn_oxsemi_8_4000000 },
4424 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EI,
4425 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4426 pbn_oxsemi_2_4000000 },
4427 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI,
4428 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4429 pbn_oxsemi_2_4000000 },
4430 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200V3,
4431 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4432 pbn_b0_bt_2_921600 },
4433 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400V3,
4434 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4436 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_410V3,
4437 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4439 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3,
4440 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4442 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3B,
4443 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4446 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550,
4447 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4449 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_650,
4450 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4452 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_850,
4453 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4455 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_550,
4456 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4457 pbn_b2_bt_2_921600 },
4458 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_650,
4459 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4460 pbn_b2_bt_2_921600 },
4461 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_850,
4462 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4463 pbn_b2_bt_2_921600 },
4464 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_550,
4465 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4466 pbn_b2_bt_4_921600 },
4467 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_650,
4468 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4469 pbn_b2_bt_4_921600 },
4470 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_850,
4471 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4472 pbn_b2_bt_4_921600 },
4473 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_550,
4474 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4476 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_650,
4477 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4479 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_850,
4480 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4482 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_550,
4483 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4484 pbn_b0_bt_2_921600 },
4485 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_650,
4486 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4487 pbn_b0_bt_2_921600 },
4488 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_850,
4489 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4490 pbn_b0_bt_2_921600 },
4491 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_550,
4492 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4493 pbn_b0_bt_4_921600 },
4494 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_650,
4495 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4496 pbn_b0_bt_4_921600 },
4497 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850,
4498 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4499 pbn_b0_bt_4_921600 },
4500 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550,
4501 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4502 pbn_b0_bt_8_921600 },
4503 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650,
4504 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4505 pbn_b0_bt_8_921600 },
4506 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850,
4507 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4508 pbn_b0_bt_8_921600 },
4511 * Computone devices submitted by Doug McNash dmcnash@computone.com
4513 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
4514 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG4,
4515 0, 0, pbn_computone_4 },
4516 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
4517 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG8,
4518 0, 0, pbn_computone_8 },
4519 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
4520 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG6,
4521 0, 0, pbn_computone_6 },
4523 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI95N,
4524 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4526 { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
4527 PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0,
4528 pbn_b0_bt_1_921600 },
4533 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4534 PCI_VENDOR_ID_SUNIX, PCI_ANY_ID,
4535 PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xffff00,
4536 pbn_b0_bt_1_921600 },
4538 { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999,
4539 PCI_VENDOR_ID_SUNIX, PCI_ANY_ID,
4540 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00,
4541 pbn_b0_bt_1_921600 },
4544 * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org>
4546 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
4547 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4548 pbn_b0_bt_8_115200 },
4549 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
4550 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4551 pbn_b0_bt_8_115200 },
4553 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
4554 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4555 pbn_b0_bt_2_115200 },
4556 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_A,
4557 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4558 pbn_b0_bt_2_115200 },
4559 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_B,
4560 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4561 pbn_b0_bt_2_115200 },
4562 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_A,
4563 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4564 pbn_b0_bt_2_115200 },
4565 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_B,
4566 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4567 pbn_b0_bt_2_115200 },
4568 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_A,
4569 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4570 pbn_b0_bt_4_460800 },
4571 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_B,
4572 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4573 pbn_b0_bt_4_460800 },
4574 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_PLUS,
4575 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4576 pbn_b0_bt_2_460800 },
4577 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_A,
4578 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4579 pbn_b0_bt_2_460800 },
4580 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_B,
4581 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4582 pbn_b0_bt_2_460800 },
4583 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_SSERIAL,
4584 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4585 pbn_b0_bt_1_115200 },
4586 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650,
4587 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4588 pbn_b0_bt_1_460800 },
4591 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
4592 * Cards are identified by their subsystem vendor IDs, which
4593 * (in hex) match the model number.
4595 * Note that JC140x are RS422/485 cards which require ox950
4596 * ACR = 0x10, and as such are not currently fully supported.
4598 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4599 0x1204, 0x0004, 0, 0,
4601 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4602 0x1208, 0x0004, 0, 0,
4604 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4605 0x1402, 0x0002, 0, 0,
4606 pbn_b0_2_921600 }, */
4607 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
4608 0x1404, 0x0004, 0, 0,
4609 pbn_b0_4_921600 }, */
4610 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1,
4611 0x1208, 0x0004, 0, 0,
4614 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2,
4615 0x1204, 0x0004, 0, 0,
4617 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2,
4618 0x1208, 0x0004, 0, 0,
4620 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF3,
4621 0x1208, 0x0004, 0, 0,
4624 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
4626 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4,
4627 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4631 * Dell Remote Access Card III - Tim_T_Murphy@Dell.com
4633 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII,
4634 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4638 * RAStel 2 port modem, gerg@moreton.com.au
4640 { PCI_VENDOR_ID_MORETON, PCI_DEVICE_ID_RASTEL_2PORT,
4641 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4642 pbn_b2_bt_2_115200 },
4645 * EKF addition for i960 Boards form EKF with serial port
4647 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80960_RP,
4648 0xE4BF, PCI_ANY_ID, 0, 0,
4652 * Xircom Cardbus/Ethernet combos
4654 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_X3201_MDM,
4655 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4658 * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry)
4660 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_RBM56G,
4661 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4665 * Untested PCI modems, sent in from various folks...
4669 * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de>
4671 { PCI_VENDOR_ID_ROCKWELL, 0x1004,
4672 0x1048, 0x1500, 0, 0,
4675 { PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
4682 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
4683 PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0,
4685 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
4686 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4688 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
4689 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4692 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM2,
4693 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4695 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM4,
4696 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4698 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8,
4699 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4703 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
4705 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
4706 PCI_ANY_ID, PCI_ANY_ID,
4708 0, pbn_exar_XR17C152 },
4709 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
4710 PCI_ANY_ID, PCI_ANY_ID,
4712 0, pbn_exar_XR17C154 },
4713 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
4714 PCI_ANY_ID, PCI_ANY_ID,
4716 0, pbn_exar_XR17C158 },
4718 * Exar Corp. XR17V35[248] Dual/Quad/Octal PCIe UARTs
4720 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352,
4721 PCI_ANY_ID, PCI_ANY_ID,
4723 0, pbn_exar_XR17V352 },
4724 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V354,
4725 PCI_ANY_ID, PCI_ANY_ID,
4727 0, pbn_exar_XR17V354 },
4728 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V358,
4729 PCI_ANY_ID, PCI_ANY_ID,
4731 0, pbn_exar_XR17V358 },
4734 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
4736 { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
4737 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4742 { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872,
4743 PCI_ANY_ID, PCI_ANY_ID,
4745 pbn_b1_bt_1_115200 },
4750 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
4751 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
4756 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400,
4757 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */
4760 * Perle PCI-RAS cards
4762 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
4763 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
4764 0, 0, pbn_b2_4_921600 },
4765 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
4766 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
4767 0, 0, pbn_b2_8_921600 },
4770 * Mainpine series cards: Fairly standard layout but fools
4771 * parts of the autodetect in some cases and uses otherwise
4772 * unmatched communications subclasses in the PCI Express case
4775 { /* RockForceDUO */
4776 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4777 PCI_VENDOR_ID_MAINPINE, 0x0200,
4778 0, 0, pbn_b0_2_115200 },
4779 { /* RockForceQUATRO */
4780 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4781 PCI_VENDOR_ID_MAINPINE, 0x0300,
4782 0, 0, pbn_b0_4_115200 },
4783 { /* RockForceDUO+ */
4784 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4785 PCI_VENDOR_ID_MAINPINE, 0x0400,
4786 0, 0, pbn_b0_2_115200 },
4787 { /* RockForceQUATRO+ */
4788 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4789 PCI_VENDOR_ID_MAINPINE, 0x0500,
4790 0, 0, pbn_b0_4_115200 },
4792 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4793 PCI_VENDOR_ID_MAINPINE, 0x0600,
4794 0, 0, pbn_b0_2_115200 },
4796 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4797 PCI_VENDOR_ID_MAINPINE, 0x0700,
4798 0, 0, pbn_b0_4_115200 },
4799 { /* RockForceOCTO+ */
4800 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4801 PCI_VENDOR_ID_MAINPINE, 0x0800,
4802 0, 0, pbn_b0_8_115200 },
4803 { /* RockForceDUO+ */
4804 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4805 PCI_VENDOR_ID_MAINPINE, 0x0C00,
4806 0, 0, pbn_b0_2_115200 },
4807 { /* RockForceQUARTRO+ */
4808 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4809 PCI_VENDOR_ID_MAINPINE, 0x0D00,
4810 0, 0, pbn_b0_4_115200 },
4811 { /* RockForceOCTO+ */
4812 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4813 PCI_VENDOR_ID_MAINPINE, 0x1D00,
4814 0, 0, pbn_b0_8_115200 },
4816 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4817 PCI_VENDOR_ID_MAINPINE, 0x2000,
4818 0, 0, pbn_b0_1_115200 },
4820 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4821 PCI_VENDOR_ID_MAINPINE, 0x2100,
4822 0, 0, pbn_b0_1_115200 },
4824 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4825 PCI_VENDOR_ID_MAINPINE, 0x2200,
4826 0, 0, pbn_b0_2_115200 },
4828 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4829 PCI_VENDOR_ID_MAINPINE, 0x2300,
4830 0, 0, pbn_b0_2_115200 },
4832 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4833 PCI_VENDOR_ID_MAINPINE, 0x2400,
4834 0, 0, pbn_b0_4_115200 },
4836 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4837 PCI_VENDOR_ID_MAINPINE, 0x2500,
4838 0, 0, pbn_b0_4_115200 },
4840 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4841 PCI_VENDOR_ID_MAINPINE, 0x2600,
4842 0, 0, pbn_b0_8_115200 },
4844 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4845 PCI_VENDOR_ID_MAINPINE, 0x2700,
4846 0, 0, pbn_b0_8_115200 },
4847 { /* IQ Express D1 */
4848 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4849 PCI_VENDOR_ID_MAINPINE, 0x3000,
4850 0, 0, pbn_b0_1_115200 },
4851 { /* IQ Express F1 */
4852 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4853 PCI_VENDOR_ID_MAINPINE, 0x3100,
4854 0, 0, pbn_b0_1_115200 },
4855 { /* IQ Express D2 */
4856 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4857 PCI_VENDOR_ID_MAINPINE, 0x3200,
4858 0, 0, pbn_b0_2_115200 },
4859 { /* IQ Express F2 */
4860 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4861 PCI_VENDOR_ID_MAINPINE, 0x3300,
4862 0, 0, pbn_b0_2_115200 },
4863 { /* IQ Express D4 */
4864 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4865 PCI_VENDOR_ID_MAINPINE, 0x3400,
4866 0, 0, pbn_b0_4_115200 },
4867 { /* IQ Express F4 */
4868 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4869 PCI_VENDOR_ID_MAINPINE, 0x3500,
4870 0, 0, pbn_b0_4_115200 },
4871 { /* IQ Express D8 */
4872 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4873 PCI_VENDOR_ID_MAINPINE, 0x3C00,
4874 0, 0, pbn_b0_8_115200 },
4875 { /* IQ Express F8 */
4876 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
4877 PCI_VENDOR_ID_MAINPINE, 0x3D00,
4878 0, 0, pbn_b0_8_115200 },
4882 * PA Semi PA6T-1682M on-chip UART
4884 { PCI_VENDOR_ID_PASEMI, 0xa004,
4885 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4889 * National Instruments
4891 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI23216,
4892 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4894 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2328,
4895 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4897 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324,
4898 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4899 pbn_b1_bt_4_115200 },
4900 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322,
4901 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4902 pbn_b1_bt_2_115200 },
4903 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324I,
4904 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4905 pbn_b1_bt_4_115200 },
4906 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322I,
4907 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4908 pbn_b1_bt_2_115200 },
4909 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_23216,
4910 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4912 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2328,
4913 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4915 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2324,
4916 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4917 pbn_b1_bt_4_115200 },
4918 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2322,
4919 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4920 pbn_b1_bt_2_115200 },
4921 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2324,
4922 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4923 pbn_b1_bt_4_115200 },
4924 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2322,
4925 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4926 pbn_b1_bt_2_115200 },
4927 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2322,
4928 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4930 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2322,
4931 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4933 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2324,
4934 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4936 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2324,
4937 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4939 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2328,
4940 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4942 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2328,
4943 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4945 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_23216,
4946 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4948 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_23216,
4949 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4951 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2322,
4952 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4954 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2322,
4955 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4957 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2324,
4958 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4960 { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324,
4961 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4965 * ADDI-DATA GmbH communication cards <info@addi-data.com>
4967 { PCI_VENDOR_ID_ADDIDATA,
4968 PCI_DEVICE_ID_ADDIDATA_APCI7500,
4975 { PCI_VENDOR_ID_ADDIDATA,
4976 PCI_DEVICE_ID_ADDIDATA_APCI7420,
4983 { PCI_VENDOR_ID_ADDIDATA,
4984 PCI_DEVICE_ID_ADDIDATA_APCI7300,
4991 { PCI_VENDOR_ID_AMCC,
4992 PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800,
4999 { PCI_VENDOR_ID_ADDIDATA,
5000 PCI_DEVICE_ID_ADDIDATA_APCI7500_2,
5007 { PCI_VENDOR_ID_ADDIDATA,
5008 PCI_DEVICE_ID_ADDIDATA_APCI7420_2,
5015 { PCI_VENDOR_ID_ADDIDATA,
5016 PCI_DEVICE_ID_ADDIDATA_APCI7300_2,
5023 { PCI_VENDOR_ID_ADDIDATA,
5024 PCI_DEVICE_ID_ADDIDATA_APCI7500_3,
5031 { PCI_VENDOR_ID_ADDIDATA,
5032 PCI_DEVICE_ID_ADDIDATA_APCI7420_3,
5039 { PCI_VENDOR_ID_ADDIDATA,
5040 PCI_DEVICE_ID_ADDIDATA_APCI7300_3,
5047 { PCI_VENDOR_ID_ADDIDATA,
5048 PCI_DEVICE_ID_ADDIDATA_APCI7800_3,
5055 { PCI_VENDOR_ID_ADDIDATA,
5056 PCI_DEVICE_ID_ADDIDATA_APCIe7500,
5061 pbn_ADDIDATA_PCIe_4_3906250 },
5063 { PCI_VENDOR_ID_ADDIDATA,
5064 PCI_DEVICE_ID_ADDIDATA_APCIe7420,
5069 pbn_ADDIDATA_PCIe_2_3906250 },
5071 { PCI_VENDOR_ID_ADDIDATA,
5072 PCI_DEVICE_ID_ADDIDATA_APCIe7300,
5077 pbn_ADDIDATA_PCIe_1_3906250 },
5079 { PCI_VENDOR_ID_ADDIDATA,
5080 PCI_DEVICE_ID_ADDIDATA_APCIe7800,
5085 pbn_ADDIDATA_PCIe_8_3906250 },
5087 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
5088 PCI_VENDOR_ID_IBM, 0x0299,
5089 0, 0, pbn_b0_bt_2_115200 },
5092 * other NetMos 9835 devices are most likely handled by the
5093 * parport_serial driver, check drivers/parport/parport_serial.c
5094 * before adding them here.
5097 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901,
5099 0, 0, pbn_b0_1_115200 },
5101 /* the 9901 is a rebranded 9912 */
5102 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912,
5104 0, 0, pbn_b0_1_115200 },
5106 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922,
5108 0, 0, pbn_b0_1_115200 },
5110 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9904,
5112 0, 0, pbn_b0_1_115200 },
5114 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
5116 0, 0, pbn_b0_1_115200 },
5118 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900,
5120 0, 0, pbn_NETMOS9900_2s_115200 },
5123 * Best Connectivity and Rosewill PCI Multi I/O cards
5126 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
5128 0, 0, pbn_b0_1_115200 },
5130 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
5132 0, 0, pbn_b0_bt_2_115200 },
5134 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865,
5136 0, 0, pbn_b0_bt_4_115200 },
5138 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100_UART,
5139 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5140 pbn_ce4100_1_115200 },
5141 /* Intel BayTrail */
5142 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_UART1,
5143 PCI_ANY_ID, PCI_ANY_ID,
5144 PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
5146 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT_UART2,
5147 PCI_ANY_ID, PCI_ANY_ID,
5148 PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xff0000,
5154 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
5155 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5159 * Broadcom TruManage
5161 { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
5162 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
5163 pbn_brcm_trumanage },
5166 * AgeStar as-prs2-009
5168 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,
5169 PCI_ANY_ID, PCI_ANY_ID,
5170 0, 0, pbn_b0_bt_2_115200 },
5173 * WCH CH353 series devices: The 2S1P is handled by parport_serial
5174 * so not listed here.
5176 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_4S,
5177 PCI_ANY_ID, PCI_ANY_ID,
5178 0, 0, pbn_b0_bt_4_115200 },
5180 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_2S1PF,
5181 PCI_ANY_ID, PCI_ANY_ID,
5182 0, 0, pbn_b0_bt_2_115200 },
5184 { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH352_2S,
5185 PCI_ANY_ID, PCI_ANY_ID,
5186 0, 0, pbn_b0_bt_2_115200 },
5189 * Commtech, Inc. Fastcom adapters
5191 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_4222PCI335,
5192 PCI_ANY_ID, PCI_ANY_ID,
5194 0, pbn_b0_2_1152000_200 },
5195 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_4224PCI335,
5196 PCI_ANY_ID, PCI_ANY_ID,
5198 0, pbn_b0_4_1152000_200 },
5199 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_2324PCI335,
5200 PCI_ANY_ID, PCI_ANY_ID,
5202 0, pbn_b0_4_1152000_200 },
5203 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_2328PCI335,
5204 PCI_ANY_ID, PCI_ANY_ID,
5206 0, pbn_b0_8_1152000_200 },
5207 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_4222PCIE,
5208 PCI_ANY_ID, PCI_ANY_ID,
5210 0, pbn_exar_XR17V352 },
5211 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_4224PCIE,
5212 PCI_ANY_ID, PCI_ANY_ID,
5214 0, pbn_exar_XR17V354 },
5215 { PCI_VENDOR_ID_COMMTECH, PCI_DEVICE_ID_COMMTECH_4228PCIE,
5216 PCI_ANY_ID, PCI_ANY_ID,
5218 0, pbn_exar_XR17V358 },
5220 /* Fintek PCI serial cards */
5221 { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 },
5222 { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },
5223 { PCI_DEVICE(0x1c29, 0x1112), .driver_data = pbn_fintek_12 },
5226 * These entries match devices with class COMMUNICATION_SERIAL,
5227 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
5229 { PCI_ANY_ID, PCI_ANY_ID,
5230 PCI_ANY_ID, PCI_ANY_ID,
5231 PCI_CLASS_COMMUNICATION_SERIAL << 8,
5232 0xffff00, pbn_default },
5233 { PCI_ANY_ID, PCI_ANY_ID,
5234 PCI_ANY_ID, PCI_ANY_ID,
5235 PCI_CLASS_COMMUNICATION_MODEM << 8,
5236 0xffff00, pbn_default },
5237 { PCI_ANY_ID, PCI_ANY_ID,
5238 PCI_ANY_ID, PCI_ANY_ID,
5239 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
5240 0xffff00, pbn_default },
5244 static pci_ers_result_t serial8250_io_error_detected(struct pci_dev *dev,
5245 pci_channel_state_t state)
5247 struct serial_private *priv = pci_get_drvdata(dev);
5249 if (state == pci_channel_io_perm_failure)
5250 return PCI_ERS_RESULT_DISCONNECT;
5253 pciserial_suspend_ports(priv);
5255 pci_disable_device(dev);
5257 return PCI_ERS_RESULT_NEED_RESET;
5260 static pci_ers_result_t serial8250_io_slot_reset(struct pci_dev *dev)
5264 rc = pci_enable_device(dev);
5267 return PCI_ERS_RESULT_DISCONNECT;
5269 pci_restore_state(dev);
5270 pci_save_state(dev);
5272 return PCI_ERS_RESULT_RECOVERED;
5275 static void serial8250_io_resume(struct pci_dev *dev)
5277 struct serial_private *priv = pci_get_drvdata(dev);
5280 pciserial_resume_ports(priv);
5283 static const struct pci_error_handlers serial8250_err_handler = {
5284 .error_detected = serial8250_io_error_detected,
5285 .slot_reset = serial8250_io_slot_reset,
5286 .resume = serial8250_io_resume,
5289 static struct pci_driver serial_pci_driver = {
5291 .probe = pciserial_init_one,
5292 .remove = pciserial_remove_one,
5294 .suspend = pciserial_suspend_one,
5295 .resume = pciserial_resume_one,
5297 .id_table = serial_pci_tbl,
5298 .err_handler = &serial8250_err_handler,
5301 module_pci_driver(serial_pci_driver);
5303 MODULE_LICENSE("GPL");
5304 MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
5305 MODULE_DEVICE_TABLE(pci, serial_pci_tbl);