2 * linux/drivers/char/8250_pci.c
4 * Probe module for 8250/16550-type PCI serial ports.
6 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
8 * Copyright (C) 2001 Russell King, All Rights Reserved.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License.
14 * $Id: 8250_pci.c,v 1.28 2002/11/02 11:14:18 rmk Exp $
16 #include <linux/module.h>
17 #include <linux/init.h>
18 #include <linux/pci.h>
19 #include <linux/string.h>
20 #include <linux/kernel.h>
21 #include <linux/slab.h>
22 #include <linux/delay.h>
23 #include <linux/tty.h>
24 #include <linux/serial_core.h>
25 #include <linux/8250_pci.h>
26 #include <linux/bitops.h>
28 #include <asm/byteorder.h>
33 #undef SERIAL_DEBUG_PCI
36 * init function returns:
37 * > 0 - number of ports
38 * = 0 - use board->num_ports
41 struct pci_serial_quirk {
46 int (*init)(struct pci_dev *dev);
47 int (*setup)(struct serial_private *, struct pciserial_board *,
48 struct uart_port *, int);
49 void (*exit)(struct pci_dev *dev);
52 #define PCI_NUM_BAR_RESOURCES 6
54 struct serial_private {
57 void __iomem *remapped_bar[PCI_NUM_BAR_RESOURCES];
58 struct pci_serial_quirk *quirk;
62 static void moan_device(const char *str, struct pci_dev *dev)
64 printk(KERN_WARNING "%s: %s\n"
65 KERN_WARNING "Please send the output of lspci -vv, this\n"
66 KERN_WARNING "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
67 KERN_WARNING "manufacturer and name of serial board or\n"
68 KERN_WARNING "modem board to rmk+serial@arm.linux.org.uk.\n",
69 pci_name(dev), str, dev->vendor, dev->device,
70 dev->subsystem_vendor, dev->subsystem_device);
74 setup_port(struct serial_private *priv, struct uart_port *port,
75 int bar, int offset, int regshift)
77 struct pci_dev *dev = priv->dev;
78 unsigned long base, len;
80 if (bar >= PCI_NUM_BAR_RESOURCES)
83 base = pci_resource_start(dev, bar);
85 if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
86 len = pci_resource_len(dev, bar);
88 if (!priv->remapped_bar[bar])
89 priv->remapped_bar[bar] = ioremap(base, len);
90 if (!priv->remapped_bar[bar])
93 port->iotype = UPIO_MEM;
95 port->mapbase = base + offset;
96 port->membase = priv->remapped_bar[bar] + offset;
97 port->regshift = regshift;
99 port->iotype = UPIO_PORT;
100 port->iobase = base + offset;
102 port->membase = NULL;
109 * AFAVLAB uses a different mixture of BARs and offsets
110 * Not that ugly ;) -- HW
113 afavlab_setup(struct serial_private *priv, struct pciserial_board *board,
114 struct uart_port *port, int idx)
116 unsigned int bar, offset = board->first_offset;
118 bar = FL_GET_BASE(board->flags);
123 offset += (idx - 4) * board->uart_offset;
126 return setup_port(priv, port, bar, offset, board->reg_shift);
130 * HP's Remote Management Console. The Diva chip came in several
131 * different versions. N-class, L2000 and A500 have two Diva chips, each
132 * with 3 UARTs (the third UART on the second chip is unused). Superdome
133 * and Keystone have one Diva chip with 3 UARTs. Some later machines have
134 * one Diva chip, but it has been expanded to 5 UARTs.
136 static int pci_hp_diva_init(struct pci_dev *dev)
140 switch (dev->subsystem_device) {
141 case PCI_DEVICE_ID_HP_DIVA_TOSCA1:
142 case PCI_DEVICE_ID_HP_DIVA_HALFDOME:
143 case PCI_DEVICE_ID_HP_DIVA_KEYSTONE:
144 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
147 case PCI_DEVICE_ID_HP_DIVA_TOSCA2:
150 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
153 case PCI_DEVICE_ID_HP_DIVA_POWERBAR:
154 case PCI_DEVICE_ID_HP_DIVA_HURRICANE:
163 * HP's Diva chip puts the 4th/5th serial port further out, and
164 * some serial ports are supposed to be hidden on certain models.
167 pci_hp_diva_setup(struct serial_private *priv, struct pciserial_board *board,
168 struct uart_port *port, int idx)
170 unsigned int offset = board->first_offset;
171 unsigned int bar = FL_GET_BASE(board->flags);
173 switch (priv->dev->subsystem_device) {
174 case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
178 case PCI_DEVICE_ID_HP_DIVA_EVEREST:
188 offset += idx * board->uart_offset;
190 return setup_port(priv, port, bar, offset, board->reg_shift);
194 * Added for EKF Intel i960 serial boards
196 static int pci_inteli960ni_init(struct pci_dev *dev)
198 unsigned long oldval;
200 if (!(dev->subsystem_device & 0x1000))
203 /* is firmware started? */
204 pci_read_config_dword(dev, 0x44, (void*) &oldval);
205 if (oldval == 0x00001000L) { /* RESET value */
206 printk(KERN_DEBUG "Local i960 firmware missing");
213 * Some PCI serial cards using the PLX 9050 PCI interface chip require
214 * that the card interrupt be explicitly enabled or disabled. This
215 * seems to be mainly needed on card using the PLX which also use I/O
218 static int pci_plx9050_init(struct pci_dev *dev)
223 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) {
224 moan_device("no memory in bar 0", dev);
229 if (dev->vendor == PCI_VENDOR_ID_PANACOM ||
230 dev->subsystem_vendor == PCI_SUBVENDOR_ID_EXSYS) {
233 if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
234 (dev->device == PCI_DEVICE_ID_PLX_ROMULUS)) {
236 * As the megawolf cards have the int pins active
237 * high, and have 2 UART chips, both ints must be
238 * enabled on the 9050. Also, the UARTS are set in
239 * 16450 mode by default, so we have to enable the
240 * 16C950 'enhanced' mode so that we can use the
247 * enable/disable interrupts
249 p = ioremap(pci_resource_start(dev, 0), 0x80);
252 writel(irq_config, p + 0x4c);
255 * Read the register back to ensure that it took effect.
263 static void __devexit pci_plx9050_exit(struct pci_dev *dev)
267 if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0)
273 p = ioremap(pci_resource_start(dev, 0), 0x80);
278 * Read the register back to ensure that it took effect.
285 /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
287 sbs_setup(struct serial_private *priv, struct pciserial_board *board,
288 struct uart_port *port, int idx)
290 unsigned int bar, offset = board->first_offset;
295 /* first four channels map to 0, 0x100, 0x200, 0x300 */
296 offset += idx * board->uart_offset;
297 } else if (idx < 8) {
298 /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */
299 offset += idx * board->uart_offset + 0xC00;
300 } else /* we have only 8 ports on PMC-OCTALPRO */
303 return setup_port(priv, port, bar, offset, board->reg_shift);
307 * This does initialization for PMC OCTALPRO cards:
308 * maps the device memory, resets the UARTs (needed, bc
309 * if the module is removed and inserted again, the card
310 * is in the sleep mode) and enables global interrupt.
313 /* global control register offset for SBS PMC-OctalPro */
314 #define OCT_REG_CR_OFF 0x500
316 static int sbs_init(struct pci_dev *dev)
320 p = ioremap(pci_resource_start(dev, 0),pci_resource_len(dev,0));
324 /* Set bit-4 Control Register (UART RESET) in to reset the uarts */
325 writeb(0x10,p + OCT_REG_CR_OFF);
327 writeb(0x0,p + OCT_REG_CR_OFF);
329 /* Set bit-2 (INTENABLE) of Control Register */
330 writeb(0x4, p + OCT_REG_CR_OFF);
337 * Disables the global interrupt of PMC-OctalPro
340 static void __devexit sbs_exit(struct pci_dev *dev)
344 p = ioremap(pci_resource_start(dev, 0),pci_resource_len(dev,0));
346 writeb(0, p + OCT_REG_CR_OFF);
352 * SIIG serial cards have an PCI interface chip which also controls
353 * the UART clocking frequency. Each UART can be clocked independently
354 * (except cards equiped with 4 UARTs) and initial clocking settings
355 * are stored in the EEPROM chip. It can cause problems because this
356 * version of serial driver doesn't support differently clocked UART's
357 * on single PCI card. To prevent this, initialization functions set
358 * high frequency clocking for all UART's on given card. It is safe (I
359 * hope) because it doesn't touch EEPROM settings to prevent conflicts
360 * with other OSes (like M$ DOS).
362 * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999
364 * There is two family of SIIG serial cards with different PCI
365 * interface chip and different configuration methods:
366 * - 10x cards have control registers in IO and/or memory space;
367 * - 20x cards have control registers in standard PCI configuration space.
369 * Note: all 10x cards have PCI device ids 0x10..
370 * all 20x cards have PCI device ids 0x20..
372 * There are also Quartet Serial cards which use Oxford Semiconductor
373 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
375 * Note: some SIIG cards are probed by the parport_serial object.
378 #define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc)
379 #define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8)
381 static int pci_siig10x_init(struct pci_dev *dev)
386 switch (dev->device & 0xfff8) {
387 case PCI_DEVICE_ID_SIIG_1S_10x: /* 1S */
390 case PCI_DEVICE_ID_SIIG_2S_10x: /* 2S, 2S1P */
393 default: /* 1S1P, 4S */
398 p = ioremap(pci_resource_start(dev, 0), 0x80);
402 writew(readw(p + 0x28) & data, p + 0x28);
408 #define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc)
409 #define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc)
411 static int pci_siig20x_init(struct pci_dev *dev)
415 /* Change clock frequency for the first UART. */
416 pci_read_config_byte(dev, 0x6f, &data);
417 pci_write_config_byte(dev, 0x6f, data & 0xef);
419 /* If this card has 2 UART, we have to do the same with second UART. */
420 if (((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S_20x) ||
421 ((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S1P_20x)) {
422 pci_read_config_byte(dev, 0x73, &data);
423 pci_write_config_byte(dev, 0x73, data & 0xef);
428 static int pci_siig_init(struct pci_dev *dev)
430 unsigned int type = dev->device & 0xff00;
433 return pci_siig10x_init(dev);
434 else if (type == 0x2000)
435 return pci_siig20x_init(dev);
437 moan_device("Unknown SIIG card", dev);
441 static int pci_siig_setup(struct serial_private *priv,
442 struct pciserial_board *board,
443 struct uart_port *port, int idx)
445 unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
449 offset = (idx - 4) * 8;
452 return setup_port(priv, port, bar, offset, 0);
456 * Timedia has an explosion of boards, and to avoid the PCI table from
457 * growing *huge*, we use this function to collapse some 70 entries
458 * in the PCI table into one, for sanity's and compactness's sake.
460 static const unsigned short timedia_single_port[] = {
461 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
464 static const unsigned short timedia_dual_port[] = {
465 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
466 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
467 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
468 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
472 static const unsigned short timedia_quad_port[] = {
473 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
474 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
475 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
479 static const unsigned short timedia_eight_port[] = {
480 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
481 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
484 static const struct timedia_struct {
486 const unsigned short *ids;
488 { 1, timedia_single_port },
489 { 2, timedia_dual_port },
490 { 4, timedia_quad_port },
491 { 8, timedia_eight_port }
494 static int pci_timedia_init(struct pci_dev *dev)
496 const unsigned short *ids;
499 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
500 ids = timedia_data[i].ids;
501 for (j = 0; ids[j]; j++)
502 if (dev->subsystem_device == ids[j])
503 return timedia_data[i].num;
509 * Timedia/SUNIX uses a mixture of BARs and offsets
510 * Ugh, this is ugly as all hell --- TYT
513 pci_timedia_setup(struct serial_private *priv, struct pciserial_board *board,
514 struct uart_port *port, int idx)
516 unsigned int bar = 0, offset = board->first_offset;
523 offset = board->uart_offset;
530 offset = board->uart_offset;
539 return setup_port(priv, port, bar, offset, board->reg_shift);
543 * Some Titan cards are also a little weird
546 titan_400l_800l_setup(struct serial_private *priv,
547 struct pciserial_board *board,
548 struct uart_port *port, int idx)
550 unsigned int bar, offset = board->first_offset;
561 offset = (idx - 2) * board->uart_offset;
564 return setup_port(priv, port, bar, offset, board->reg_shift);
567 static int pci_xircom_init(struct pci_dev *dev)
573 static int pci_netmos_init(struct pci_dev *dev)
575 /* subdevice 0x00PS means <P> parallel, <S> serial */
576 unsigned int num_serial = dev->subsystem_device & 0xf;
584 * ITE support by Niels de Vos <niels.devos@wincor-nixdorf.com>
586 * These chips are available with optionally one parallel port and up to
587 * two serial ports. Unfortunately they all have the same product id.
589 * Basic configuration is done over a region of 32 I/O ports. The base
590 * ioport is called INTA or INTC, depending on docs/other drivers.
592 * The region of the 32 I/O ports is configured in POSIO0R...
596 #define ITE_887x_MISCR 0x9c
597 #define ITE_887x_INTCBAR 0x78
598 #define ITE_887x_UARTBAR 0x7c
599 #define ITE_887x_PS0BAR 0x10
600 #define ITE_887x_POSIO0 0x60
603 #define ITE_887x_IOSIZE 32
604 /* I/O space size (bits 26-24; 8 bytes = 011b) */
605 #define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
606 /* I/O space size (bits 26-24; 32 bytes = 101b) */
607 #define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
608 /* Decoding speed (1 = slow, 2 = medium, 3 = fast) */
609 #define ITE_887x_POSIO_SPEED (3 << 29)
610 /* enable IO_Space bit */
611 #define ITE_887x_POSIO_ENABLE (1 << 31)
613 static int pci_ite887x_init(struct pci_dev *dev)
615 /* inta_addr are the configuration addresses of the ITE */
616 static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
619 struct resource *iobase = NULL;
620 u32 miscr, uartbar, ioport;
622 /* search for the base-ioport */
624 while (inta_addr[i] && iobase == NULL) {
625 iobase = request_region(inta_addr[i], ITE_887x_IOSIZE,
627 if (iobase != NULL) {
628 /* write POSIO0R - speed | size | ioport */
629 pci_write_config_dword(dev, ITE_887x_POSIO0,
630 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
631 ITE_887x_POSIO_IOSIZE_32 | inta_addr[i]);
632 /* write INTCBAR - ioport */
633 pci_write_config_dword(dev, ITE_887x_INTCBAR, inta_addr[i]);
634 ret = inb(inta_addr[i]);
636 /* ioport connected */
639 release_region(iobase->start, ITE_887x_IOSIZE);
646 printk(KERN_ERR "ite887x: could not find iobase\n");
650 /* start of undocumented type checking (see parport_pc.c) */
651 type = inb(iobase->start + 0x18) & 0x0f;
654 case 0x2: /* ITE8871 (1P) */
655 case 0xa: /* ITE8875 (1P) */
658 case 0xe: /* ITE8872 (2S1P) */
661 case 0x6: /* ITE8873 (1S) */
664 case 0x8: /* ITE8874 (2S) */
668 moan_device("Unknown ITE887x", dev);
672 /* configure all serial ports */
673 for (i = 0; i < ret; i++) {
674 /* read the I/O port from the device */
675 pci_read_config_dword(dev, ITE_887x_PS0BAR + (0x4 * (i + 1)),
677 ioport &= 0x0000FF00; /* the actual base address */
678 pci_write_config_dword(dev, ITE_887x_POSIO0 + (0x4 * (i + 1)),
679 ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED |
680 ITE_887x_POSIO_IOSIZE_8 | ioport);
682 /* write the ioport to the UARTBAR */
683 pci_read_config_dword(dev, ITE_887x_UARTBAR, &uartbar);
684 uartbar &= ~(0xffff << (16 * i)); /* clear half the reg */
685 uartbar |= (ioport << (16 * i)); /* set the ioport */
686 pci_write_config_dword(dev, ITE_887x_UARTBAR, uartbar);
688 /* get current config */
689 pci_read_config_dword(dev, ITE_887x_MISCR, &miscr);
690 /* disable interrupts (UARTx_Routing[3:0]) */
691 miscr &= ~(0xf << (12 - 4 * i));
692 /* activate the UART (UARTx_En) */
693 miscr |= 1 << (23 - i);
694 /* write new config with activated UART */
695 pci_write_config_dword(dev, ITE_887x_MISCR, miscr);
699 /* the device has no UARTs if we get here */
700 release_region(iobase->start, ITE_887x_IOSIZE);
706 static void __devexit pci_ite887x_exit(struct pci_dev *dev)
709 /* the ioport is bit 0-15 in POSIO0R */
710 pci_read_config_dword(dev, ITE_887x_POSIO0, &ioport);
712 release_region(ioport, ITE_887x_IOSIZE);
716 pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
717 struct uart_port *port, int idx)
719 unsigned int bar, offset = board->first_offset, maxnr;
721 bar = FL_GET_BASE(board->flags);
722 if (board->flags & FL_BASE_BARS)
725 offset += idx * board->uart_offset;
727 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
728 (board->reg_shift + 3);
730 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
733 return setup_port(priv, port, bar, offset, board->reg_shift);
736 /* This should be in linux/pci_ids.h */
737 #define PCI_VENDOR_ID_SBSMODULARIO 0x124B
738 #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
739 #define PCI_DEVICE_ID_OCTPRO 0x0001
740 #define PCI_SUBDEVICE_ID_OCTPRO232 0x0108
741 #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
742 #define PCI_SUBDEVICE_ID_POCTAL232 0x0308
743 #define PCI_SUBDEVICE_ID_POCTAL422 0x0408
746 * Master list of serial port init/setup/exit quirks.
747 * This does not describe the general nature of the port.
748 * (ie, baud base, number and location of ports, etc)
750 * This list is ordered alphabetically by vendor then device.
751 * Specific entries must come before more generic entries.
753 static struct pci_serial_quirk pci_serial_quirks[] = {
755 * AFAVLAB cards - these may be called via parport_serial
756 * It is not clear whether this applies to all products.
759 .vendor = PCI_VENDOR_ID_AFAVLAB,
760 .device = PCI_ANY_ID,
761 .subvendor = PCI_ANY_ID,
762 .subdevice = PCI_ANY_ID,
763 .setup = afavlab_setup,
769 .vendor = PCI_VENDOR_ID_HP,
770 .device = PCI_DEVICE_ID_HP_DIVA,
771 .subvendor = PCI_ANY_ID,
772 .subdevice = PCI_ANY_ID,
773 .init = pci_hp_diva_init,
774 .setup = pci_hp_diva_setup,
780 .vendor = PCI_VENDOR_ID_INTEL,
781 .device = PCI_DEVICE_ID_INTEL_80960_RP,
783 .subdevice = PCI_ANY_ID,
784 .init = pci_inteli960ni_init,
785 .setup = pci_default_setup,
791 .vendor = PCI_VENDOR_ID_ITE,
792 .device = PCI_DEVICE_ID_ITE_8872,
793 .subvendor = PCI_ANY_ID,
794 .subdevice = PCI_ANY_ID,
795 .init = pci_ite887x_init,
796 .setup = pci_default_setup,
797 .exit = __devexit_p(pci_ite887x_exit),
803 .vendor = PCI_VENDOR_ID_PANACOM,
804 .device = PCI_DEVICE_ID_PANACOM_QUADMODEM,
805 .subvendor = PCI_ANY_ID,
806 .subdevice = PCI_ANY_ID,
807 .init = pci_plx9050_init,
808 .setup = pci_default_setup,
809 .exit = __devexit_p(pci_plx9050_exit),
812 .vendor = PCI_VENDOR_ID_PANACOM,
813 .device = PCI_DEVICE_ID_PANACOM_DUALMODEM,
814 .subvendor = PCI_ANY_ID,
815 .subdevice = PCI_ANY_ID,
816 .init = pci_plx9050_init,
817 .setup = pci_default_setup,
818 .exit = __devexit_p(pci_plx9050_exit),
824 .vendor = PCI_VENDOR_ID_PLX,
825 .device = PCI_DEVICE_ID_PLX_9030,
826 .subvendor = PCI_SUBVENDOR_ID_PERLE,
827 .subdevice = PCI_ANY_ID,
828 .setup = pci_default_setup,
831 .vendor = PCI_VENDOR_ID_PLX,
832 .device = PCI_DEVICE_ID_PLX_9050,
833 .subvendor = PCI_SUBVENDOR_ID_EXSYS,
834 .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055,
835 .init = pci_plx9050_init,
836 .setup = pci_default_setup,
837 .exit = __devexit_p(pci_plx9050_exit),
840 .vendor = PCI_VENDOR_ID_PLX,
841 .device = PCI_DEVICE_ID_PLX_9050,
842 .subvendor = PCI_SUBVENDOR_ID_KEYSPAN,
843 .subdevice = PCI_SUBDEVICE_ID_KEYSPAN_SX2,
844 .init = pci_plx9050_init,
845 .setup = pci_default_setup,
846 .exit = __devexit_p(pci_plx9050_exit),
849 .vendor = PCI_VENDOR_ID_PLX,
850 .device = PCI_DEVICE_ID_PLX_ROMULUS,
851 .subvendor = PCI_VENDOR_ID_PLX,
852 .subdevice = PCI_DEVICE_ID_PLX_ROMULUS,
853 .init = pci_plx9050_init,
854 .setup = pci_default_setup,
855 .exit = __devexit_p(pci_plx9050_exit),
858 * SBS Technologies, Inc., PMC-OCTALPRO 232
861 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
862 .device = PCI_DEVICE_ID_OCTPRO,
863 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
864 .subdevice = PCI_SUBDEVICE_ID_OCTPRO232,
867 .exit = __devexit_p(sbs_exit),
870 * SBS Technologies, Inc., PMC-OCTALPRO 422
873 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
874 .device = PCI_DEVICE_ID_OCTPRO,
875 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
876 .subdevice = PCI_SUBDEVICE_ID_OCTPRO422,
879 .exit = __devexit_p(sbs_exit),
882 * SBS Technologies, Inc., P-Octal 232
885 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
886 .device = PCI_DEVICE_ID_OCTPRO,
887 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
888 .subdevice = PCI_SUBDEVICE_ID_POCTAL232,
891 .exit = __devexit_p(sbs_exit),
894 * SBS Technologies, Inc., P-Octal 422
897 .vendor = PCI_VENDOR_ID_SBSMODULARIO,
898 .device = PCI_DEVICE_ID_OCTPRO,
899 .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO,
900 .subdevice = PCI_SUBDEVICE_ID_POCTAL422,
903 .exit = __devexit_p(sbs_exit),
906 * SIIG cards - these may be called via parport_serial
909 .vendor = PCI_VENDOR_ID_SIIG,
910 .device = PCI_ANY_ID,
911 .subvendor = PCI_ANY_ID,
912 .subdevice = PCI_ANY_ID,
913 .init = pci_siig_init,
914 .setup = pci_siig_setup,
920 .vendor = PCI_VENDOR_ID_TITAN,
921 .device = PCI_DEVICE_ID_TITAN_400L,
922 .subvendor = PCI_ANY_ID,
923 .subdevice = PCI_ANY_ID,
924 .setup = titan_400l_800l_setup,
927 .vendor = PCI_VENDOR_ID_TITAN,
928 .device = PCI_DEVICE_ID_TITAN_800L,
929 .subvendor = PCI_ANY_ID,
930 .subdevice = PCI_ANY_ID,
931 .setup = titan_400l_800l_setup,
937 .vendor = PCI_VENDOR_ID_TIMEDIA,
938 .device = PCI_DEVICE_ID_TIMEDIA_1889,
939 .subvendor = PCI_VENDOR_ID_TIMEDIA,
940 .subdevice = PCI_ANY_ID,
941 .init = pci_timedia_init,
942 .setup = pci_timedia_setup,
945 .vendor = PCI_VENDOR_ID_TIMEDIA,
946 .device = PCI_ANY_ID,
947 .subvendor = PCI_ANY_ID,
948 .subdevice = PCI_ANY_ID,
949 .setup = pci_timedia_setup,
955 .vendor = PCI_VENDOR_ID_XIRCOM,
956 .device = PCI_DEVICE_ID_XIRCOM_X3201_MDM,
957 .subvendor = PCI_ANY_ID,
958 .subdevice = PCI_ANY_ID,
959 .init = pci_xircom_init,
960 .setup = pci_default_setup,
963 * Netmos cards - these may be called via parport_serial
966 .vendor = PCI_VENDOR_ID_NETMOS,
967 .device = PCI_ANY_ID,
968 .subvendor = PCI_ANY_ID,
969 .subdevice = PCI_ANY_ID,
970 .init = pci_netmos_init,
971 .setup = pci_default_setup,
974 * Default "match everything" terminator entry
977 .vendor = PCI_ANY_ID,
978 .device = PCI_ANY_ID,
979 .subvendor = PCI_ANY_ID,
980 .subdevice = PCI_ANY_ID,
981 .setup = pci_default_setup,
985 static inline int quirk_id_matches(u32 quirk_id, u32 dev_id)
987 return quirk_id == PCI_ANY_ID || quirk_id == dev_id;
990 static struct pci_serial_quirk *find_quirk(struct pci_dev *dev)
992 struct pci_serial_quirk *quirk;
994 for (quirk = pci_serial_quirks; ; quirk++)
995 if (quirk_id_matches(quirk->vendor, dev->vendor) &&
996 quirk_id_matches(quirk->device, dev->device) &&
997 quirk_id_matches(quirk->subvendor, dev->subsystem_vendor) &&
998 quirk_id_matches(quirk->subdevice, dev->subsystem_device))
1003 static inline int get_pci_irq(struct pci_dev *dev,
1004 struct pciserial_board *board)
1006 if (board->flags & FL_NOIRQ)
1013 * This is the configuration table for all of the PCI serial boards
1014 * which we support. It is directly indexed by the pci_board_num_t enum
1015 * value, which is encoded in the pci_device_id PCI probe table's
1016 * driver_data member.
1018 * The makeup of these names are:
1019 * pbn_bn{_bt}_n_baud{_offsetinhex}
1021 * bn = PCI BAR number
1022 * bt = Index using PCI BARs
1023 * n = number of serial ports
1025 * offsetinhex = offset for each sequential port (in hex)
1027 * This table is sorted by (in order): bn, bt, baud, offsetindex, n.
1029 * Please note: in theory if n = 1, _bt infix should make no difference.
1030 * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
1032 enum pci_board_num_t {
1052 pbn_b0_2_1843200_200,
1053 pbn_b0_4_1843200_200,
1054 pbn_b0_8_1843200_200,
1115 * Board-specific versions.
1136 * uart_offset - the space between channels
1137 * reg_shift - describes how the UART registers are mapped
1138 * to PCI memory by the card.
1139 * For example IER register on SBS, Inc. PMC-OctPro is located at
1140 * offset 0x10 from the UART base, while UART_IER is defined as 1
1141 * in include/linux/serial_reg.h,
1142 * see first lines of serial_in() and serial_out() in 8250.c
1145 static struct pciserial_board pci_boards[] __devinitdata = {
1149 .base_baud = 115200,
1152 [pbn_b0_1_115200] = {
1155 .base_baud = 115200,
1158 [pbn_b0_2_115200] = {
1161 .base_baud = 115200,
1164 [pbn_b0_4_115200] = {
1167 .base_baud = 115200,
1170 [pbn_b0_5_115200] = {
1173 .base_baud = 115200,
1176 [pbn_b0_8_115200] = {
1179 .base_baud = 115200,
1183 [pbn_b0_1_921600] = {
1186 .base_baud = 921600,
1189 [pbn_b0_2_921600] = {
1192 .base_baud = 921600,
1195 [pbn_b0_4_921600] = {
1198 .base_baud = 921600,
1202 [pbn_b0_2_1130000] = {
1205 .base_baud = 1130000,
1209 [pbn_b0_4_1152000] = {
1212 .base_baud = 1152000,
1216 [pbn_b0_2_1843200] = {
1219 .base_baud = 1843200,
1222 [pbn_b0_4_1843200] = {
1225 .base_baud = 1843200,
1229 [pbn_b0_2_1843200_200] = {
1232 .base_baud = 1843200,
1233 .uart_offset = 0x200,
1235 [pbn_b0_4_1843200_200] = {
1238 .base_baud = 1843200,
1239 .uart_offset = 0x200,
1241 [pbn_b0_8_1843200_200] = {
1244 .base_baud = 1843200,
1245 .uart_offset = 0x200,
1248 [pbn_b0_bt_1_115200] = {
1249 .flags = FL_BASE0|FL_BASE_BARS,
1251 .base_baud = 115200,
1254 [pbn_b0_bt_2_115200] = {
1255 .flags = FL_BASE0|FL_BASE_BARS,
1257 .base_baud = 115200,
1260 [pbn_b0_bt_8_115200] = {
1261 .flags = FL_BASE0|FL_BASE_BARS,
1263 .base_baud = 115200,
1267 [pbn_b0_bt_1_460800] = {
1268 .flags = FL_BASE0|FL_BASE_BARS,
1270 .base_baud = 460800,
1273 [pbn_b0_bt_2_460800] = {
1274 .flags = FL_BASE0|FL_BASE_BARS,
1276 .base_baud = 460800,
1279 [pbn_b0_bt_4_460800] = {
1280 .flags = FL_BASE0|FL_BASE_BARS,
1282 .base_baud = 460800,
1286 [pbn_b0_bt_1_921600] = {
1287 .flags = FL_BASE0|FL_BASE_BARS,
1289 .base_baud = 921600,
1292 [pbn_b0_bt_2_921600] = {
1293 .flags = FL_BASE0|FL_BASE_BARS,
1295 .base_baud = 921600,
1298 [pbn_b0_bt_4_921600] = {
1299 .flags = FL_BASE0|FL_BASE_BARS,
1301 .base_baud = 921600,
1304 [pbn_b0_bt_8_921600] = {
1305 .flags = FL_BASE0|FL_BASE_BARS,
1307 .base_baud = 921600,
1311 [pbn_b1_1_115200] = {
1314 .base_baud = 115200,
1317 [pbn_b1_2_115200] = {
1320 .base_baud = 115200,
1323 [pbn_b1_4_115200] = {
1326 .base_baud = 115200,
1329 [pbn_b1_8_115200] = {
1332 .base_baud = 115200,
1336 [pbn_b1_1_921600] = {
1339 .base_baud = 921600,
1342 [pbn_b1_2_921600] = {
1345 .base_baud = 921600,
1348 [pbn_b1_4_921600] = {
1351 .base_baud = 921600,
1354 [pbn_b1_8_921600] = {
1357 .base_baud = 921600,
1360 [pbn_b1_2_1250000] = {
1363 .base_baud = 1250000,
1367 [pbn_b1_bt_1_115200] = {
1368 .flags = FL_BASE1|FL_BASE_BARS,
1370 .base_baud = 115200,
1374 [pbn_b1_bt_2_921600] = {
1375 .flags = FL_BASE1|FL_BASE_BARS,
1377 .base_baud = 921600,
1381 [pbn_b1_1_1382400] = {
1384 .base_baud = 1382400,
1387 [pbn_b1_2_1382400] = {
1390 .base_baud = 1382400,
1393 [pbn_b1_4_1382400] = {
1396 .base_baud = 1382400,
1399 [pbn_b1_8_1382400] = {
1402 .base_baud = 1382400,
1406 [pbn_b2_1_115200] = {
1409 .base_baud = 115200,
1412 [pbn_b2_2_115200] = {
1415 .base_baud = 115200,
1418 [pbn_b2_4_115200] = {
1421 .base_baud = 115200,
1424 [pbn_b2_8_115200] = {
1427 .base_baud = 115200,
1431 [pbn_b2_1_460800] = {
1434 .base_baud = 460800,
1437 [pbn_b2_4_460800] = {
1440 .base_baud = 460800,
1443 [pbn_b2_8_460800] = {
1446 .base_baud = 460800,
1449 [pbn_b2_16_460800] = {
1452 .base_baud = 460800,
1456 [pbn_b2_1_921600] = {
1459 .base_baud = 921600,
1462 [pbn_b2_4_921600] = {
1465 .base_baud = 921600,
1468 [pbn_b2_8_921600] = {
1471 .base_baud = 921600,
1475 [pbn_b2_bt_1_115200] = {
1476 .flags = FL_BASE2|FL_BASE_BARS,
1478 .base_baud = 115200,
1481 [pbn_b2_bt_2_115200] = {
1482 .flags = FL_BASE2|FL_BASE_BARS,
1484 .base_baud = 115200,
1487 [pbn_b2_bt_4_115200] = {
1488 .flags = FL_BASE2|FL_BASE_BARS,
1490 .base_baud = 115200,
1494 [pbn_b2_bt_2_921600] = {
1495 .flags = FL_BASE2|FL_BASE_BARS,
1497 .base_baud = 921600,
1500 [pbn_b2_bt_4_921600] = {
1501 .flags = FL_BASE2|FL_BASE_BARS,
1503 .base_baud = 921600,
1507 [pbn_b3_2_115200] = {
1510 .base_baud = 115200,
1513 [pbn_b3_4_115200] = {
1516 .base_baud = 115200,
1519 [pbn_b3_8_115200] = {
1522 .base_baud = 115200,
1527 * Entries following this are board-specific.
1536 .base_baud = 921600,
1537 .uart_offset = 0x400,
1541 .flags = FL_BASE2|FL_BASE_BARS,
1543 .base_baud = 921600,
1544 .uart_offset = 0x400,
1548 .flags = FL_BASE2|FL_BASE_BARS,
1550 .base_baud = 921600,
1551 .uart_offset = 0x400,
1555 [pbn_exsys_4055] = {
1558 .base_baud = 115200,
1562 /* I think this entry is broken - the first_offset looks wrong --rmk */
1563 [pbn_plx_romulus] = {
1566 .base_baud = 921600,
1567 .uart_offset = 8 << 2,
1569 .first_offset = 0x03,
1573 * This board uses the size of PCI Base region 0 to
1574 * signal now many ports are available
1577 .flags = FL_BASE0|FL_REGION_SZ_CAP,
1579 .base_baud = 115200,
1584 * EKF addition for i960 Boards form EKF with serial port.
1587 [pbn_intel_i960] = {
1590 .base_baud = 921600,
1591 .uart_offset = 8 << 2,
1593 .first_offset = 0x10000,
1596 .flags = FL_BASE0|FL_NOIRQ,
1598 .base_baud = 458333,
1601 .first_offset = 0x20178,
1605 * Computone - uses IOMEM.
1607 [pbn_computone_4] = {
1610 .base_baud = 921600,
1611 .uart_offset = 0x40,
1613 .first_offset = 0x200,
1615 [pbn_computone_6] = {
1618 .base_baud = 921600,
1619 .uart_offset = 0x40,
1621 .first_offset = 0x200,
1623 [pbn_computone_8] = {
1626 .base_baud = 921600,
1627 .uart_offset = 0x40,
1629 .first_offset = 0x200,
1634 .base_baud = 460800,
1639 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
1640 * Only basic 16550A support.
1641 * XR17C15[24] are not tested, but they should work.
1643 [pbn_exar_XR17C152] = {
1646 .base_baud = 921600,
1647 .uart_offset = 0x200,
1649 [pbn_exar_XR17C154] = {
1652 .base_baud = 921600,
1653 .uart_offset = 0x200,
1655 [pbn_exar_XR17C158] = {
1658 .base_baud = 921600,
1659 .uart_offset = 0x200,
1662 * PA Semi PWRficient PA6T-1682M on-chip UART
1664 [pbn_pasemi_1682M] = {
1667 .base_baud = 8333333,
1671 static const struct pci_device_id softmodem_blacklist[] = {
1672 { PCI_VDEVICE ( AL, 0x5457 ), }, /* ALi Corporation M5457 AC'97 Modem */
1676 * Given a complete unknown PCI device, try to use some heuristics to
1677 * guess what the configuration might be, based on the pitiful PCI
1678 * serial specs. Returns 0 on success, 1 on failure.
1680 static int __devinit
1681 serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
1683 const struct pci_device_id *blacklist;
1684 int num_iomem, num_port, first_port = -1, i;
1687 * If it is not a communications device or the programming
1688 * interface is greater than 6, give up.
1690 * (Should we try to make guesses for multiport serial devices
1693 if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
1694 ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
1695 (dev->class & 0xff) > 6)
1699 * Do not access blacklisted devices that are known not to
1700 * feature serial ports.
1702 for (blacklist = softmodem_blacklist;
1703 blacklist < softmodem_blacklist + ARRAY_SIZE(softmodem_blacklist);
1705 if (dev->vendor == blacklist->vendor &&
1706 dev->device == blacklist->device)
1710 num_iomem = num_port = 0;
1711 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1712 if (pci_resource_flags(dev, i) & IORESOURCE_IO) {
1714 if (first_port == -1)
1717 if (pci_resource_flags(dev, i) & IORESOURCE_MEM)
1722 * If there is 1 or 0 iomem regions, and exactly one port,
1723 * use it. We guess the number of ports based on the IO
1726 if (num_iomem <= 1 && num_port == 1) {
1727 board->flags = first_port;
1728 board->num_ports = pci_resource_len(dev, first_port) / 8;
1733 * Now guess if we've got a board which indexes by BARs.
1734 * Each IO BAR should be 8 bytes, and they should follow
1739 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1740 if (pci_resource_flags(dev, i) & IORESOURCE_IO &&
1741 pci_resource_len(dev, i) == 8 &&
1742 (first_port == -1 || (first_port + num_port) == i)) {
1744 if (first_port == -1)
1750 board->flags = first_port | FL_BASE_BARS;
1751 board->num_ports = num_port;
1759 serial_pci_matches(struct pciserial_board *board,
1760 struct pciserial_board *guessed)
1763 board->num_ports == guessed->num_ports &&
1764 board->base_baud == guessed->base_baud &&
1765 board->uart_offset == guessed->uart_offset &&
1766 board->reg_shift == guessed->reg_shift &&
1767 board->first_offset == guessed->first_offset;
1770 struct serial_private *
1771 pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board)
1773 struct uart_port serial_port;
1774 struct serial_private *priv;
1775 struct pci_serial_quirk *quirk;
1776 int rc, nr_ports, i;
1778 nr_ports = board->num_ports;
1781 * Find an init and setup quirks.
1783 quirk = find_quirk(dev);
1786 * Run the new-style initialization function.
1787 * The initialization function returns:
1789 * 0 - use board->num_ports
1790 * >0 - number of ports
1793 rc = quirk->init(dev);
1802 priv = kzalloc(sizeof(struct serial_private) +
1803 sizeof(unsigned int) * nr_ports,
1806 priv = ERR_PTR(-ENOMEM);
1811 priv->quirk = quirk;
1813 memset(&serial_port, 0, sizeof(struct uart_port));
1814 serial_port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ;
1815 serial_port.uartclk = board->base_baud * 16;
1816 serial_port.irq = get_pci_irq(dev, board);
1817 serial_port.dev = &dev->dev;
1819 for (i = 0; i < nr_ports; i++) {
1820 if (quirk->setup(priv, board, &serial_port, i))
1823 #ifdef SERIAL_DEBUG_PCI
1824 printk("Setup PCI port: port %x, irq %d, type %d\n",
1825 serial_port.iobase, serial_port.irq, serial_port.iotype);
1828 priv->line[i] = serial8250_register_port(&serial_port);
1829 if (priv->line[i] < 0) {
1830 printk(KERN_WARNING "Couldn't register serial port %s: %d\n", pci_name(dev), priv->line[i]);
1845 EXPORT_SYMBOL_GPL(pciserial_init_ports);
1847 void pciserial_remove_ports(struct serial_private *priv)
1849 struct pci_serial_quirk *quirk;
1852 for (i = 0; i < priv->nr; i++)
1853 serial8250_unregister_port(priv->line[i]);
1855 for (i = 0; i < PCI_NUM_BAR_RESOURCES; i++) {
1856 if (priv->remapped_bar[i])
1857 iounmap(priv->remapped_bar[i]);
1858 priv->remapped_bar[i] = NULL;
1862 * Find the exit quirks.
1864 quirk = find_quirk(priv->dev);
1866 quirk->exit(priv->dev);
1870 EXPORT_SYMBOL_GPL(pciserial_remove_ports);
1872 void pciserial_suspend_ports(struct serial_private *priv)
1876 for (i = 0; i < priv->nr; i++)
1877 if (priv->line[i] >= 0)
1878 serial8250_suspend_port(priv->line[i]);
1880 EXPORT_SYMBOL_GPL(pciserial_suspend_ports);
1882 void pciserial_resume_ports(struct serial_private *priv)
1887 * Ensure that the board is correctly configured.
1889 if (priv->quirk->init)
1890 priv->quirk->init(priv->dev);
1892 for (i = 0; i < priv->nr; i++)
1893 if (priv->line[i] >= 0)
1894 serial8250_resume_port(priv->line[i]);
1896 EXPORT_SYMBOL_GPL(pciserial_resume_ports);
1899 * Probe one serial board. Unfortunately, there is no rhyme nor reason
1900 * to the arrangement of serial ports on a PCI card.
1902 static int __devinit
1903 pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
1905 struct serial_private *priv;
1906 struct pciserial_board *board, tmp;
1909 if (ent->driver_data >= ARRAY_SIZE(pci_boards)) {
1910 printk(KERN_ERR "pci_init_one: invalid driver_data: %ld\n",
1915 board = &pci_boards[ent->driver_data];
1917 rc = pci_enable_device(dev);
1921 if (ent->driver_data == pbn_default) {
1923 * Use a copy of the pci_board entry for this;
1924 * avoid changing entries in the table.
1926 memcpy(&tmp, board, sizeof(struct pciserial_board));
1930 * We matched one of our class entries. Try to
1931 * determine the parameters of this board.
1933 rc = serial_pci_guess_board(dev, board);
1938 * We matched an explicit entry. If we are able to
1939 * detect this boards settings with our heuristic,
1940 * then we no longer need this entry.
1942 memcpy(&tmp, &pci_boards[pbn_default],
1943 sizeof(struct pciserial_board));
1944 rc = serial_pci_guess_board(dev, &tmp);
1945 if (rc == 0 && serial_pci_matches(board, &tmp))
1946 moan_device("Redundant entry in serial pci_table.",
1950 priv = pciserial_init_ports(dev, board);
1951 if (!IS_ERR(priv)) {
1952 pci_set_drvdata(dev, priv);
1959 pci_disable_device(dev);
1963 static void __devexit pciserial_remove_one(struct pci_dev *dev)
1965 struct serial_private *priv = pci_get_drvdata(dev);
1967 pci_set_drvdata(dev, NULL);
1969 pciserial_remove_ports(priv);
1971 pci_disable_device(dev);
1975 static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
1977 struct serial_private *priv = pci_get_drvdata(dev);
1980 pciserial_suspend_ports(priv);
1982 pci_save_state(dev);
1983 pci_set_power_state(dev, pci_choose_state(dev, state));
1987 static int pciserial_resume_one(struct pci_dev *dev)
1989 struct serial_private *priv = pci_get_drvdata(dev);
1991 pci_set_power_state(dev, PCI_D0);
1992 pci_restore_state(dev);
1996 * The device may have been disabled. Re-enable it.
1998 pci_enable_device(dev);
2000 pciserial_resume_ports(priv);
2006 static struct pci_device_id serial_pci_tbl[] = {
2007 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
2008 PCI_SUBVENDOR_ID_CONNECT_TECH,
2009 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
2011 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
2012 PCI_SUBVENDOR_ID_CONNECT_TECH,
2013 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
2015 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
2016 PCI_SUBVENDOR_ID_CONNECT_TECH,
2017 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
2019 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2020 PCI_SUBVENDOR_ID_CONNECT_TECH,
2021 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
2023 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2024 PCI_SUBVENDOR_ID_CONNECT_TECH,
2025 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0,
2027 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2028 PCI_SUBVENDOR_ID_CONNECT_TECH,
2029 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0,
2031 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2032 PCI_SUBVENDOR_ID_CONNECT_TECH,
2033 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485, 0, 0,
2035 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2036 PCI_SUBVENDOR_ID_CONNECT_TECH,
2037 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4, 0, 0,
2039 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2040 PCI_SUBVENDOR_ID_CONNECT_TECH,
2041 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485, 0, 0,
2043 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2044 PCI_SUBVENDOR_ID_CONNECT_TECH,
2045 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2, 0, 0,
2047 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2048 PCI_SUBVENDOR_ID_CONNECT_TECH,
2049 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485, 0, 0,
2051 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2052 PCI_SUBVENDOR_ID_CONNECT_TECH,
2053 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6, 0, 0,
2055 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2056 PCI_SUBVENDOR_ID_CONNECT_TECH,
2057 PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1, 0, 0,
2059 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2060 PCI_SUBVENDOR_ID_CONNECT_TECH,
2061 PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1, 0, 0,
2063 { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351,
2064 PCI_SUBVENDOR_ID_CONNECT_TECH,
2065 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ, 0, 0,
2067 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2068 PCI_SUBVENDOR_ID_CONNECT_TECH,
2069 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2, 0, 0,
2071 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2072 PCI_SUBVENDOR_ID_CONNECT_TECH,
2073 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0,
2075 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2076 PCI_VENDOR_ID_AFAVLAB,
2077 PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0,
2079 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2080 PCI_SUBVENDOR_ID_CONNECT_TECH,
2081 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232, 0, 0,
2082 pbn_b0_2_1843200_200 },
2083 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2084 PCI_SUBVENDOR_ID_CONNECT_TECH,
2085 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232, 0, 0,
2086 pbn_b0_4_1843200_200 },
2087 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2088 PCI_SUBVENDOR_ID_CONNECT_TECH,
2089 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232, 0, 0,
2090 pbn_b0_8_1843200_200 },
2091 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2092 PCI_SUBVENDOR_ID_CONNECT_TECH,
2093 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1, 0, 0,
2094 pbn_b0_2_1843200_200 },
2095 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2096 PCI_SUBVENDOR_ID_CONNECT_TECH,
2097 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2, 0, 0,
2098 pbn_b0_4_1843200_200 },
2099 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2100 PCI_SUBVENDOR_ID_CONNECT_TECH,
2101 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4, 0, 0,
2102 pbn_b0_8_1843200_200 },
2103 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2104 PCI_SUBVENDOR_ID_CONNECT_TECH,
2105 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2, 0, 0,
2106 pbn_b0_2_1843200_200 },
2107 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2108 PCI_SUBVENDOR_ID_CONNECT_TECH,
2109 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4, 0, 0,
2110 pbn_b0_4_1843200_200 },
2111 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2112 PCI_SUBVENDOR_ID_CONNECT_TECH,
2113 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8, 0, 0,
2114 pbn_b0_8_1843200_200 },
2115 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2116 PCI_SUBVENDOR_ID_CONNECT_TECH,
2117 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485, 0, 0,
2118 pbn_b0_2_1843200_200 },
2119 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2120 PCI_SUBVENDOR_ID_CONNECT_TECH,
2121 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485, 0, 0,
2122 pbn_b0_4_1843200_200 },
2123 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2124 PCI_SUBVENDOR_ID_CONNECT_TECH,
2125 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0,
2126 pbn_b0_8_1843200_200 },
2128 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530,
2129 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2130 pbn_b2_bt_1_115200 },
2131 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM2,
2132 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2133 pbn_b2_bt_2_115200 },
2134 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM422,
2135 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2136 pbn_b2_bt_4_115200 },
2137 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM232,
2138 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2139 pbn_b2_bt_2_115200 },
2140 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM4,
2141 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2142 pbn_b2_bt_4_115200 },
2143 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8,
2144 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2146 { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8,
2147 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2150 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2,
2151 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2152 pbn_b2_bt_2_115200 },
2153 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM200,
2154 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2155 pbn_b2_bt_2_921600 },
2157 * VScom SPCOM800, from sl@s.pl
2159 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM800,
2160 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2162 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_1077,
2163 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2165 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2166 PCI_SUBVENDOR_ID_KEYSPAN,
2167 PCI_SUBDEVICE_ID_KEYSPAN_SX2, 0, 0,
2169 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM,
2170 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2172 { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM,
2173 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2175 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
2176 PCI_VENDOR_ID_ESDGMBH,
2177 PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0,
2179 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2180 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2181 PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0,
2183 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2184 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2185 PCI_SUBDEVICE_ID_CHASE_PCIFAST8, 0, 0,
2187 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2188 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2189 PCI_SUBDEVICE_ID_CHASE_PCIFAST16, 0, 0,
2191 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2192 PCI_SUBVENDOR_ID_CHASE_PCIFAST,
2193 PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC, 0, 0,
2195 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2196 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
2197 PCI_SUBDEVICE_ID_CHASE_PCIRAS4, 0, 0,
2199 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2200 PCI_SUBVENDOR_ID_CHASE_PCIRAS,
2201 PCI_SUBDEVICE_ID_CHASE_PCIRAS8, 0, 0,
2203 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
2204 PCI_SUBVENDOR_ID_EXSYS,
2205 PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0,
2208 * Megawolf Romulus PCI Serial Card, from Mike Hudson
2211 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_ROMULUS,
2212 0x10b5, 0x106a, 0, 0,
2214 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,
2215 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2217 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100,
2218 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2220 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D,
2221 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2223 { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M,
2224 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2226 { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954,
2227 PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, 0, 0,
2229 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2230 PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL, 0, 0,
2234 * The below card is a little controversial since it is the
2235 * subject of a PCI vendor/device ID clash. (See
2236 * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
2237 * For now just used the hex ID 0x950a.
2239 { PCI_VENDOR_ID_OXSEMI, 0x950a,
2240 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2242 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954,
2243 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2245 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
2246 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2247 pbn_b0_bt_2_921600 },
2250 * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
2251 * from skokodyn@yahoo.com
2253 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2254 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0,
2256 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2257 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0,
2259 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2260 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0,
2262 { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO,
2263 PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0,
2267 * Digitan DS560-558, from jimd@esoft.com
2269 { PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM,
2270 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2274 * Titan Electronic cards
2275 * The 400L and 800L have a custom setup quirk.
2277 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100,
2278 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2280 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200,
2281 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2283 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400,
2284 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2286 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B,
2287 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2289 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100L,
2290 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2292 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200L,
2293 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2294 pbn_b1_bt_2_921600 },
2295 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400L,
2296 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2297 pbn_b0_bt_4_921600 },
2298 { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L,
2299 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2300 pbn_b0_bt_8_921600 },
2302 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550,
2303 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2305 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_650,
2306 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2308 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_850,
2309 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2311 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_550,
2312 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2313 pbn_b2_bt_2_921600 },
2314 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_650,
2315 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2316 pbn_b2_bt_2_921600 },
2317 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_850,
2318 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2319 pbn_b2_bt_2_921600 },
2320 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_550,
2321 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2322 pbn_b2_bt_4_921600 },
2323 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_650,
2324 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2325 pbn_b2_bt_4_921600 },
2326 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_850,
2327 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2328 pbn_b2_bt_4_921600 },
2329 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_550,
2330 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2332 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_650,
2333 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2335 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_850,
2336 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2338 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_550,
2339 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2340 pbn_b0_bt_2_921600 },
2341 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_650,
2342 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2343 pbn_b0_bt_2_921600 },
2344 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_850,
2345 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2346 pbn_b0_bt_2_921600 },
2347 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_550,
2348 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2349 pbn_b0_bt_4_921600 },
2350 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_650,
2351 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2352 pbn_b0_bt_4_921600 },
2353 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850,
2354 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2355 pbn_b0_bt_4_921600 },
2356 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550,
2357 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2358 pbn_b0_bt_8_921600 },
2359 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650,
2360 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2361 pbn_b0_bt_8_921600 },
2362 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850,
2363 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2364 pbn_b0_bt_8_921600 },
2367 * Computone devices submitted by Doug McNash dmcnash@computone.com
2369 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
2370 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG4,
2371 0, 0, pbn_computone_4 },
2372 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
2373 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG8,
2374 0, 0, pbn_computone_8 },
2375 { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG,
2376 PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG6,
2377 0, 0, pbn_computone_6 },
2379 { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI95N,
2380 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2382 { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
2383 PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0,
2384 pbn_b0_bt_1_921600 },
2387 * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org>
2389 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
2390 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2391 pbn_b0_bt_8_115200 },
2392 { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
2393 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2394 pbn_b0_bt_8_115200 },
2396 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
2397 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2398 pbn_b0_bt_2_115200 },
2399 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_A,
2400 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2401 pbn_b0_bt_2_115200 },
2402 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_B,
2403 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2404 pbn_b0_bt_2_115200 },
2405 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_A,
2406 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2407 pbn_b0_bt_4_460800 },
2408 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_B,
2409 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2410 pbn_b0_bt_4_460800 },
2411 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_PLUS,
2412 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2413 pbn_b0_bt_2_460800 },
2414 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_A,
2415 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2416 pbn_b0_bt_2_460800 },
2417 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_B,
2418 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2419 pbn_b0_bt_2_460800 },
2420 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_SSERIAL,
2421 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2422 pbn_b0_bt_1_115200 },
2423 { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650,
2424 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2425 pbn_b0_bt_1_460800 },
2428 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
2429 * Cards are identified by their subsystem vendor IDs, which
2430 * (in hex) match the model number.
2432 * Note that JC140x are RS422/485 cards which require ox950
2433 * ACR = 0x10, and as such are not currently fully supported.
2435 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2436 0x1204, 0x0004, 0, 0,
2438 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2439 0x1208, 0x0004, 0, 0,
2441 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2442 0x1402, 0x0002, 0, 0,
2443 pbn_b0_2_921600 }, */
2444 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
2445 0x1404, 0x0004, 0, 0,
2446 pbn_b0_4_921600 }, */
2447 { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1,
2448 0x1208, 0x0004, 0, 0,
2452 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
2454 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4,
2455 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2459 * Dell Remote Access Card III - Tim_T_Murphy@Dell.com
2461 { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII,
2462 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2466 * RAStel 2 port modem, gerg@moreton.com.au
2468 { PCI_VENDOR_ID_MORETON, PCI_DEVICE_ID_RASTEL_2PORT,
2469 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2470 pbn_b2_bt_2_115200 },
2473 * EKF addition for i960 Boards form EKF with serial port
2475 { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80960_RP,
2476 0xE4BF, PCI_ANY_ID, 0, 0,
2480 * Xircom Cardbus/Ethernet combos
2482 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_X3201_MDM,
2483 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2486 * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry)
2488 { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_RBM56G,
2489 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2493 * Untested PCI modems, sent in from various folks...
2497 * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de>
2499 { PCI_VENDOR_ID_ROCKWELL, 0x1004,
2500 0x1048, 0x1500, 0, 0,
2503 { PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
2510 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
2511 PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0,
2513 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
2514 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2516 { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
2517 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2520 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM2,
2521 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2523 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM4,
2524 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2526 { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8,
2527 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2531 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
2533 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152,
2534 PCI_ANY_ID, PCI_ANY_ID,
2536 0, pbn_exar_XR17C152 },
2537 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C154,
2538 PCI_ANY_ID, PCI_ANY_ID,
2540 0, pbn_exar_XR17C154 },
2541 { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
2542 PCI_ANY_ID, PCI_ANY_ID,
2544 0, pbn_exar_XR17C158 },
2547 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
2549 { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560,
2550 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2555 { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872,
2556 PCI_ANY_ID, PCI_ANY_ID,
2558 pbn_b1_bt_1_115200 },
2563 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
2564 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
2568 * Perle PCI-RAS cards
2570 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
2571 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
2572 0, 0, pbn_b2_4_921600 },
2573 { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
2574 PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
2575 0, 0, pbn_b2_8_921600 },
2578 * Mainpine series cards: Fairly standard layout but fools
2579 * parts of the autodetect in some cases and uses otherwise
2580 * unmatched communications subclasses in the PCI Express case
2583 { /* RockForceDUO */
2584 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2585 PCI_VENDOR_ID_MAINPINE, 0x0200,
2586 0, 0, pbn_b0_2_115200 },
2587 { /* RockForceQUATRO */
2588 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2589 PCI_VENDOR_ID_MAINPINE, 0x0300,
2590 0, 0, pbn_b0_4_115200 },
2591 { /* RockForceDUO+ */
2592 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2593 PCI_VENDOR_ID_MAINPINE, 0x0400,
2594 0, 0, pbn_b0_2_115200 },
2595 { /* RockForceQUATRO+ */
2596 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2597 PCI_VENDOR_ID_MAINPINE, 0x0500,
2598 0, 0, pbn_b0_4_115200 },
2600 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2601 PCI_VENDOR_ID_MAINPINE, 0x0600,
2602 0, 0, pbn_b0_2_115200 },
2604 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2605 PCI_VENDOR_ID_MAINPINE, 0x0700,
2606 0, 0, pbn_b0_4_115200 },
2607 { /* RockForceOCTO+ */
2608 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2609 PCI_VENDOR_ID_MAINPINE, 0x0800,
2610 0, 0, pbn_b0_8_115200 },
2611 { /* RockForceDUO+ */
2612 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2613 PCI_VENDOR_ID_MAINPINE, 0x0C00,
2614 0, 0, pbn_b0_2_115200 },
2615 { /* RockForceQUARTRO+ */
2616 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2617 PCI_VENDOR_ID_MAINPINE, 0x0D00,
2618 0, 0, pbn_b0_4_115200 },
2619 { /* RockForceOCTO+ */
2620 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2621 PCI_VENDOR_ID_MAINPINE, 0x1D00,
2622 0, 0, pbn_b0_8_115200 },
2624 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2625 PCI_VENDOR_ID_MAINPINE, 0x2000,
2626 0, 0, pbn_b0_1_115200 },
2628 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2629 PCI_VENDOR_ID_MAINPINE, 0x2100,
2630 0, 0, pbn_b0_1_115200 },
2632 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2633 PCI_VENDOR_ID_MAINPINE, 0x2200,
2634 0, 0, pbn_b0_2_115200 },
2636 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2637 PCI_VENDOR_ID_MAINPINE, 0x2300,
2638 0, 0, pbn_b0_2_115200 },
2640 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2641 PCI_VENDOR_ID_MAINPINE, 0x2400,
2642 0, 0, pbn_b0_4_115200 },
2644 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2645 PCI_VENDOR_ID_MAINPINE, 0x2500,
2646 0, 0, pbn_b0_4_115200 },
2648 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2649 PCI_VENDOR_ID_MAINPINE, 0x2600,
2650 0, 0, pbn_b0_8_115200 },
2652 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2653 PCI_VENDOR_ID_MAINPINE, 0x2700,
2654 0, 0, pbn_b0_8_115200 },
2655 { /* IQ Express D1 */
2656 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2657 PCI_VENDOR_ID_MAINPINE, 0x3000,
2658 0, 0, pbn_b0_1_115200 },
2659 { /* IQ Express F1 */
2660 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2661 PCI_VENDOR_ID_MAINPINE, 0x3100,
2662 0, 0, pbn_b0_1_115200 },
2663 { /* IQ Express D2 */
2664 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2665 PCI_VENDOR_ID_MAINPINE, 0x3200,
2666 0, 0, pbn_b0_2_115200 },
2667 { /* IQ Express F2 */
2668 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2669 PCI_VENDOR_ID_MAINPINE, 0x3300,
2670 0, 0, pbn_b0_2_115200 },
2671 { /* IQ Express D4 */
2672 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2673 PCI_VENDOR_ID_MAINPINE, 0x3400,
2674 0, 0, pbn_b0_4_115200 },
2675 { /* IQ Express F4 */
2676 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2677 PCI_VENDOR_ID_MAINPINE, 0x3500,
2678 0, 0, pbn_b0_4_115200 },
2679 { /* IQ Express D8 */
2680 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2681 PCI_VENDOR_ID_MAINPINE, 0x3C00,
2682 0, 0, pbn_b0_8_115200 },
2683 { /* IQ Express F8 */
2684 PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE,
2685 PCI_VENDOR_ID_MAINPINE, 0x3D00,
2686 0, 0, pbn_b0_8_115200 },
2690 * PA Semi PA6T-1682M on-chip UART
2692 { PCI_VENDOR_ID_PASEMI, 0xa004,
2693 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
2697 * These entries match devices with class COMMUNICATION_SERIAL,
2698 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
2700 { PCI_ANY_ID, PCI_ANY_ID,
2701 PCI_ANY_ID, PCI_ANY_ID,
2702 PCI_CLASS_COMMUNICATION_SERIAL << 8,
2703 0xffff00, pbn_default },
2704 { PCI_ANY_ID, PCI_ANY_ID,
2705 PCI_ANY_ID, PCI_ANY_ID,
2706 PCI_CLASS_COMMUNICATION_MODEM << 8,
2707 0xffff00, pbn_default },
2708 { PCI_ANY_ID, PCI_ANY_ID,
2709 PCI_ANY_ID, PCI_ANY_ID,
2710 PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
2711 0xffff00, pbn_default },
2715 static struct pci_driver serial_pci_driver = {
2717 .probe = pciserial_init_one,
2718 .remove = __devexit_p(pciserial_remove_one),
2720 .suspend = pciserial_suspend_one,
2721 .resume = pciserial_resume_one,
2723 .id_table = serial_pci_tbl,
2726 static int __init serial8250_pci_init(void)
2728 return pci_register_driver(&serial_pci_driver);
2731 static void __exit serial8250_pci_exit(void)
2733 pci_unregister_driver(&serial_pci_driver);
2736 module_init(serial8250_pci_init);
2737 module_exit(serial8250_pci_exit);
2739 MODULE_LICENSE("GPL");
2740 MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
2741 MODULE_DEVICE_TABLE(pci, serial_pci_tbl);