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>
24 #include <linux/rational.h>
26 #include <asm/byteorder.h>
29 #include <linux/dmaengine.h>
30 #include <linux/platform_data/dma-dw.h>
31 #include <linux/platform_data/dma-hsu.h>
36 * init function returns:
37 * > 0 - number of ports
38 * = 0 - use board->num_ports
41 struct pci_serial_quirk
{
46 int (*probe
)(struct pci_dev
*dev
);
47 int (*init
)(struct pci_dev
*dev
);
48 int (*setup
)(struct serial_private
*,
49 const struct pciserial_board
*,
50 struct uart_8250_port
*, int);
51 void (*exit
)(struct pci_dev
*dev
);
54 #define PCI_NUM_BAR_RESOURCES 6
56 struct serial_private
{
59 void __iomem
*remapped_bar
[PCI_NUM_BAR_RESOURCES
];
60 struct pci_serial_quirk
*quirk
;
64 static int pci_default_setup(struct serial_private
*,
65 const struct pciserial_board
*, struct uart_8250_port
*, int);
67 static void moan_device(const char *str
, struct pci_dev
*dev
)
71 "Please send the output of lspci -vv, this\n"
72 "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
73 "manufacturer and name of serial board or\n"
74 "modem board to <linux-serial@vger.kernel.org>.\n",
75 pci_name(dev
), str
, dev
->vendor
, dev
->device
,
76 dev
->subsystem_vendor
, dev
->subsystem_device
);
80 setup_port(struct serial_private
*priv
, struct uart_8250_port
*port
,
81 int bar
, int offset
, int regshift
)
83 struct pci_dev
*dev
= priv
->dev
;
85 if (bar
>= PCI_NUM_BAR_RESOURCES
)
88 if (pci_resource_flags(dev
, bar
) & IORESOURCE_MEM
) {
89 if (!priv
->remapped_bar
[bar
])
90 priv
->remapped_bar
[bar
] = pci_ioremap_bar(dev
, bar
);
91 if (!priv
->remapped_bar
[bar
])
94 port
->port
.iotype
= UPIO_MEM
;
95 port
->port
.iobase
= 0;
96 port
->port
.mapbase
= pci_resource_start(dev
, bar
) + 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
= pci_resource_start(dev
, bar
) + 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
)
228 if (!(dev
->subsystem_device
& 0x1000))
231 /* is firmware started? */
232 pci_read_config_dword(dev
, 0x44, &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 int bar
= 0;
319 if ((pci_resource_flags(dev
, bar
) & IORESOURCE_MEM
) == 0) {
320 moan_device("no memory in bar", dev
);
324 p
= pci_ioremap_bar(dev
, bar
);
328 /* Disable the CPU Interrupt */
329 writel(readl(p
+ NI8420_INT_ENABLE_REG
) & ~(NI8420_INT_ENABLE_BIT
),
330 p
+ NI8420_INT_ENABLE_REG
);
336 #define MITE_IOWBSR1 0xc4
337 #define MITE_IOWCR1 0xf4
338 #define MITE_LCIMR1 0x08
339 #define MITE_LCIMR2 0x10
341 #define MITE_LCIMR2_CLR_CPU_IE (1 << 30)
343 static void pci_ni8430_exit(struct pci_dev
*dev
)
346 unsigned int bar
= 0;
348 if ((pci_resource_flags(dev
, bar
) & IORESOURCE_MEM
) == 0) {
349 moan_device("no memory in bar", dev
);
353 p
= pci_ioremap_bar(dev
, bar
);
357 /* Disable the CPU Interrupt */
358 writel(MITE_LCIMR2_CLR_CPU_IE
, p
+ MITE_LCIMR2
);
362 /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
364 sbs_setup(struct serial_private
*priv
, const struct pciserial_board
*board
,
365 struct uart_8250_port
*port
, int idx
)
367 unsigned int bar
, offset
= board
->first_offset
;
372 /* first four channels map to 0, 0x100, 0x200, 0x300 */
373 offset
+= idx
* board
->uart_offset
;
374 } else if (idx
< 8) {
375 /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */
376 offset
+= idx
* board
->uart_offset
+ 0xC00;
377 } else /* we have only 8 ports on PMC-OCTALPRO */
380 return setup_port(priv
, port
, bar
, offset
, board
->reg_shift
);
384 * This does initialization for PMC OCTALPRO cards:
385 * maps the device memory, resets the UARTs (needed, bc
386 * if the module is removed and inserted again, the card
387 * is in the sleep mode) and enables global interrupt.
390 /* global control register offset for SBS PMC-OctalPro */
391 #define OCT_REG_CR_OFF 0x500
393 static int sbs_init(struct pci_dev
*dev
)
397 p
= pci_ioremap_bar(dev
, 0);
401 /* Set bit-4 Control Register (UART RESET) in to reset the uarts */
402 writeb(0x10, p
+ OCT_REG_CR_OFF
);
404 writeb(0x0, p
+ OCT_REG_CR_OFF
);
406 /* Set bit-2 (INTENABLE) of Control Register */
407 writeb(0x4, p
+ OCT_REG_CR_OFF
);
414 * Disables the global interrupt of PMC-OctalPro
417 static void sbs_exit(struct pci_dev
*dev
)
421 p
= pci_ioremap_bar(dev
, 0);
422 /* FIXME: What if resource_len < OCT_REG_CR_OFF */
424 writeb(0, p
+ OCT_REG_CR_OFF
);
429 * SIIG serial cards have an PCI interface chip which also controls
430 * the UART clocking frequency. Each UART can be clocked independently
431 * (except cards equipped with 4 UARTs) and initial clocking settings
432 * are stored in the EEPROM chip. It can cause problems because this
433 * version of serial driver doesn't support differently clocked UART's
434 * on single PCI card. To prevent this, initialization functions set
435 * high frequency clocking for all UART's on given card. It is safe (I
436 * hope) because it doesn't touch EEPROM settings to prevent conflicts
437 * with other OSes (like M$ DOS).
439 * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999
441 * There is two family of SIIG serial cards with different PCI
442 * interface chip and different configuration methods:
443 * - 10x cards have control registers in IO and/or memory space;
444 * - 20x cards have control registers in standard PCI configuration space.
446 * Note: all 10x cards have PCI device ids 0x10..
447 * all 20x cards have PCI device ids 0x20..
449 * There are also Quartet Serial cards which use Oxford Semiconductor
450 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
452 * Note: some SIIG cards are probed by the parport_serial object.
455 #define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc)
456 #define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8)
458 static int pci_siig10x_init(struct pci_dev
*dev
)
463 switch (dev
->device
& 0xfff8) {
464 case PCI_DEVICE_ID_SIIG_1S_10x
: /* 1S */
467 case PCI_DEVICE_ID_SIIG_2S_10x
: /* 2S, 2S1P */
470 default: /* 1S1P, 4S */
475 p
= ioremap_nocache(pci_resource_start(dev
, 0), 0x80);
479 writew(readw(p
+ 0x28) & data
, p
+ 0x28);
485 #define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc)
486 #define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc)
488 static int pci_siig20x_init(struct pci_dev
*dev
)
492 /* Change clock frequency for the first UART. */
493 pci_read_config_byte(dev
, 0x6f, &data
);
494 pci_write_config_byte(dev
, 0x6f, data
& 0xef);
496 /* If this card has 2 UART, we have to do the same with second UART. */
497 if (((dev
->device
& 0xfffc) == PCI_DEVICE_ID_SIIG_2S_20x
) ||
498 ((dev
->device
& 0xfffc) == PCI_DEVICE_ID_SIIG_2S1P_20x
)) {
499 pci_read_config_byte(dev
, 0x73, &data
);
500 pci_write_config_byte(dev
, 0x73, data
& 0xef);
505 static int pci_siig_init(struct pci_dev
*dev
)
507 unsigned int type
= dev
->device
& 0xff00;
510 return pci_siig10x_init(dev
);
511 else if (type
== 0x2000)
512 return pci_siig20x_init(dev
);
514 moan_device("Unknown SIIG card", dev
);
518 static int pci_siig_setup(struct serial_private
*priv
,
519 const struct pciserial_board
*board
,
520 struct uart_8250_port
*port
, int idx
)
522 unsigned int bar
= FL_GET_BASE(board
->flags
) + idx
, offset
= 0;
526 offset
= (idx
- 4) * 8;
529 return setup_port(priv
, port
, bar
, offset
, 0);
533 * Timedia has an explosion of boards, and to avoid the PCI table from
534 * growing *huge*, we use this function to collapse some 70 entries
535 * in the PCI table into one, for sanity's and compactness's sake.
537 static const unsigned short timedia_single_port
[] = {
538 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
541 static const unsigned short timedia_dual_port
[] = {
542 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
543 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
544 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
545 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079,
549 static const unsigned short timedia_quad_port
[] = {
550 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
551 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
552 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
556 static const unsigned short timedia_eight_port
[] = {
557 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
558 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
561 static const struct timedia_struct
{
563 const unsigned short *ids
;
565 { 1, timedia_single_port
},
566 { 2, timedia_dual_port
},
567 { 4, timedia_quad_port
},
568 { 8, timedia_eight_port
}
572 * There are nearly 70 different Timedia/SUNIX PCI serial devices. Instead of
573 * listing them individually, this driver merely grabs them all with
574 * PCI_ANY_ID. Some of these devices, however, also feature a parallel port,
575 * and should be left free to be claimed by parport_serial instead.
577 static int pci_timedia_probe(struct pci_dev
*dev
)
580 * Check the third digit of the subdevice ID
581 * (0,2,3,5,6: serial only -- 7,8,9: serial + parallel)
583 if ((dev
->subsystem_device
& 0x00f0) >= 0x70) {
585 "ignoring Timedia subdevice %04x for parport_serial\n",
586 dev
->subsystem_device
);
593 static int pci_timedia_init(struct pci_dev
*dev
)
595 const unsigned short *ids
;
598 for (i
= 0; i
< ARRAY_SIZE(timedia_data
); i
++) {
599 ids
= timedia_data
[i
].ids
;
600 for (j
= 0; ids
[j
]; j
++)
601 if (dev
->subsystem_device
== ids
[j
])
602 return timedia_data
[i
].num
;
608 * Timedia/SUNIX uses a mixture of BARs and offsets
609 * Ugh, this is ugly as all hell --- TYT
612 pci_timedia_setup(struct serial_private
*priv
,
613 const struct pciserial_board
*board
,
614 struct uart_8250_port
*port
, int idx
)
616 unsigned int bar
= 0, offset
= board
->first_offset
;
623 offset
= board
->uart_offset
;
630 offset
= board
->uart_offset
;
639 return setup_port(priv
, port
, bar
, offset
, board
->reg_shift
);
643 * Some Titan cards are also a little weird
646 titan_400l_800l_setup(struct serial_private
*priv
,
647 const struct pciserial_board
*board
,
648 struct uart_8250_port
*port
, int idx
)
650 unsigned int bar
, offset
= board
->first_offset
;
661 offset
= (idx
- 2) * board
->uart_offset
;
664 return setup_port(priv
, port
, bar
, offset
, board
->reg_shift
);
667 static int pci_xircom_init(struct pci_dev
*dev
)
673 static int pci_ni8420_init(struct pci_dev
*dev
)
676 unsigned int bar
= 0;
678 if ((pci_resource_flags(dev
, bar
) & IORESOURCE_MEM
) == 0) {
679 moan_device("no memory in bar", dev
);
683 p
= pci_ioremap_bar(dev
, bar
);
687 /* Enable CPU Interrupt */
688 writel(readl(p
+ NI8420_INT_ENABLE_REG
) | NI8420_INT_ENABLE_BIT
,
689 p
+ NI8420_INT_ENABLE_REG
);
695 #define MITE_IOWBSR1_WSIZE 0xa
696 #define MITE_IOWBSR1_WIN_OFFSET 0x800
697 #define MITE_IOWBSR1_WENAB (1 << 7)
698 #define MITE_LCIMR1_IO_IE_0 (1 << 24)
699 #define MITE_LCIMR2_SET_CPU_IE (1 << 31)
700 #define MITE_IOWCR1_RAMSEL_MASK 0xfffffffe
702 static int pci_ni8430_init(struct pci_dev
*dev
)
705 struct pci_bus_region region
;
707 unsigned int bar
= 0;
709 if ((pci_resource_flags(dev
, bar
) & IORESOURCE_MEM
) == 0) {
710 moan_device("no memory in bar", dev
);
714 p
= pci_ioremap_bar(dev
, bar
);
719 * Set device window address and size in BAR0, while acknowledging that
720 * the resource structure may contain a translated address that differs
721 * from the address the device responds to.
723 pcibios_resource_to_bus(dev
->bus
, ®ion
, &dev
->resource
[bar
]);
724 device_window
= ((region
.start
+ MITE_IOWBSR1_WIN_OFFSET
) & 0xffffff00)
725 | MITE_IOWBSR1_WENAB
| MITE_IOWBSR1_WSIZE
;
726 writel(device_window
, p
+ MITE_IOWBSR1
);
728 /* Set window access to go to RAMSEL IO address space */
729 writel((readl(p
+ MITE_IOWCR1
) & MITE_IOWCR1_RAMSEL_MASK
),
732 /* Enable IO Bus Interrupt 0 */
733 writel(MITE_LCIMR1_IO_IE_0
, p
+ MITE_LCIMR1
);
735 /* Enable CPU Interrupt */
736 writel(MITE_LCIMR2_SET_CPU_IE
, p
+ MITE_LCIMR2
);
742 /* UART Port Control Register */
743 #define NI8430_PORTCON 0x0f
744 #define NI8430_PORTCON_TXVR_ENABLE (1 << 3)
747 pci_ni8430_setup(struct serial_private
*priv
,
748 const struct pciserial_board
*board
,
749 struct uart_8250_port
*port
, int idx
)
751 struct pci_dev
*dev
= priv
->dev
;
753 unsigned int bar
, offset
= board
->first_offset
;
755 if (idx
>= board
->num_ports
)
758 bar
= FL_GET_BASE(board
->flags
);
759 offset
+= idx
* board
->uart_offset
;
761 p
= pci_ioremap_bar(dev
, bar
);
765 /* enable the transceiver */
766 writeb(readb(p
+ offset
+ NI8430_PORTCON
) | NI8430_PORTCON_TXVR_ENABLE
,
767 p
+ offset
+ NI8430_PORTCON
);
771 return setup_port(priv
, port
, bar
, offset
, board
->reg_shift
);
774 static int pci_netmos_9900_setup(struct serial_private
*priv
,
775 const struct pciserial_board
*board
,
776 struct uart_8250_port
*port
, int idx
)
780 if ((priv
->dev
->device
!= PCI_DEVICE_ID_NETMOS_9865
) &&
781 (priv
->dev
->subsystem_device
& 0xff00) == 0x3000) {
782 /* netmos apparently orders BARs by datasheet layout, so serial
783 * ports get BARs 0 and 3 (or 1 and 4 for memmapped)
787 return setup_port(priv
, port
, bar
, 0, board
->reg_shift
);
789 return pci_default_setup(priv
, board
, port
, idx
);
793 /* the 99xx series comes with a range of device IDs and a variety
796 * 9900 has varying capabilities and can cascade to sub-controllers
797 * (cascading should be purely internal)
798 * 9904 is hardwired with 4 serial ports
799 * 9912 and 9922 are hardwired with 2 serial ports
801 static int pci_netmos_9900_numports(struct pci_dev
*dev
)
803 unsigned int c
= dev
->class;
805 unsigned short sub_serports
;
811 } else if ((pi
== 0) &&
812 (dev
->device
== PCI_DEVICE_ID_NETMOS_9900
)) {
813 /* two possibilities: 0x30ps encodes number of parallel and
814 * serial ports, or 0x1000 indicates *something*. This is not
815 * immediately obvious, since the 2s1p+4s configuration seems
816 * to offer all functionality on functions 0..2, while still
817 * advertising the same function 3 as the 4s+2s1p config.
819 sub_serports
= dev
->subsystem_device
& 0xf;
820 if (sub_serports
> 0) {
823 dev_err(&dev
->dev
, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
828 moan_device("unknown NetMos/Mostech program interface", dev
);
832 static int pci_netmos_init(struct pci_dev
*dev
)
834 /* subdevice 0x00PS means <P> parallel, <S> serial */
835 unsigned int num_serial
= dev
->subsystem_device
& 0xf;
837 if ((dev
->device
== PCI_DEVICE_ID_NETMOS_9901
) ||
838 (dev
->device
== PCI_DEVICE_ID_NETMOS_9865
))
841 if (dev
->subsystem_vendor
== PCI_VENDOR_ID_IBM
&&
842 dev
->subsystem_device
== 0x0299)
845 switch (dev
->device
) { /* FALLTHROUGH on all */
846 case PCI_DEVICE_ID_NETMOS_9904
:
847 case PCI_DEVICE_ID_NETMOS_9912
:
848 case PCI_DEVICE_ID_NETMOS_9922
:
849 case PCI_DEVICE_ID_NETMOS_9900
:
850 num_serial
= pci_netmos_9900_numports(dev
);
854 if (num_serial
== 0 ) {
855 moan_device("unknown NetMos/Mostech device", dev
);
866 * These chips are available with optionally one parallel port and up to
867 * two serial ports. Unfortunately they all have the same product id.
869 * Basic configuration is done over a region of 32 I/O ports. The base
870 * ioport is called INTA or INTC, depending on docs/other drivers.
872 * The region of the 32 I/O ports is configured in POSIO0R...
876 #define ITE_887x_MISCR 0x9c
877 #define ITE_887x_INTCBAR 0x78
878 #define ITE_887x_UARTBAR 0x7c
879 #define ITE_887x_PS0BAR 0x10
880 #define ITE_887x_POSIO0 0x60
883 #define ITE_887x_IOSIZE 32
884 /* I/O space size (bits 26-24; 8 bytes = 011b) */
885 #define ITE_887x_POSIO_IOSIZE_8 (3 << 24)
886 /* I/O space size (bits 26-24; 32 bytes = 101b) */
887 #define ITE_887x_POSIO_IOSIZE_32 (5 << 24)
888 /* Decoding speed (1 = slow, 2 = medium, 3 = fast) */
889 #define ITE_887x_POSIO_SPEED (3 << 29)
890 /* enable IO_Space bit */
891 #define ITE_887x_POSIO_ENABLE (1 << 31)
893 static int pci_ite887x_init(struct pci_dev
*dev
)
895 /* inta_addr are the configuration addresses of the ITE */
896 static const short inta_addr
[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0,
899 struct resource
*iobase
= NULL
;
900 u32 miscr
, uartbar
, ioport
;
902 /* search for the base-ioport */
904 while (inta_addr
[i
] && iobase
== NULL
) {
905 iobase
= request_region(inta_addr
[i
], ITE_887x_IOSIZE
,
907 if (iobase
!= NULL
) {
908 /* write POSIO0R - speed | size | ioport */
909 pci_write_config_dword(dev
, ITE_887x_POSIO0
,
910 ITE_887x_POSIO_ENABLE
| ITE_887x_POSIO_SPEED
|
911 ITE_887x_POSIO_IOSIZE_32
| inta_addr
[i
]);
912 /* write INTCBAR - ioport */
913 pci_write_config_dword(dev
, ITE_887x_INTCBAR
,
915 ret
= inb(inta_addr
[i
]);
917 /* ioport connected */
920 release_region(iobase
->start
, ITE_887x_IOSIZE
);
927 dev_err(&dev
->dev
, "ite887x: could not find iobase\n");
931 /* start of undocumented type checking (see parport_pc.c) */
932 type
= inb(iobase
->start
+ 0x18) & 0x0f;
935 case 0x2: /* ITE8871 (1P) */
936 case 0xa: /* ITE8875 (1P) */
939 case 0xe: /* ITE8872 (2S1P) */
942 case 0x6: /* ITE8873 (1S) */
945 case 0x8: /* ITE8874 (2S) */
949 moan_device("Unknown ITE887x", dev
);
953 /* configure all serial ports */
954 for (i
= 0; i
< ret
; i
++) {
955 /* read the I/O port from the device */
956 pci_read_config_dword(dev
, ITE_887x_PS0BAR
+ (0x4 * (i
+ 1)),
958 ioport
&= 0x0000FF00; /* the actual base address */
959 pci_write_config_dword(dev
, ITE_887x_POSIO0
+ (0x4 * (i
+ 1)),
960 ITE_887x_POSIO_ENABLE
| ITE_887x_POSIO_SPEED
|
961 ITE_887x_POSIO_IOSIZE_8
| ioport
);
963 /* write the ioport to the UARTBAR */
964 pci_read_config_dword(dev
, ITE_887x_UARTBAR
, &uartbar
);
965 uartbar
&= ~(0xffff << (16 * i
)); /* clear half the reg */
966 uartbar
|= (ioport
<< (16 * i
)); /* set the ioport */
967 pci_write_config_dword(dev
, ITE_887x_UARTBAR
, uartbar
);
969 /* get current config */
970 pci_read_config_dword(dev
, ITE_887x_MISCR
, &miscr
);
971 /* disable interrupts (UARTx_Routing[3:0]) */
972 miscr
&= ~(0xf << (12 - 4 * i
));
973 /* activate the UART (UARTx_En) */
974 miscr
|= 1 << (23 - i
);
975 /* write new config with activated UART */
976 pci_write_config_dword(dev
, ITE_887x_MISCR
, miscr
);
980 /* the device has no UARTs if we get here */
981 release_region(iobase
->start
, ITE_887x_IOSIZE
);
987 static void pci_ite887x_exit(struct pci_dev
*dev
)
990 /* the ioport is bit 0-15 in POSIO0R */
991 pci_read_config_dword(dev
, ITE_887x_POSIO0
, &ioport
);
993 release_region(ioport
, ITE_887x_IOSIZE
);
997 * EndRun Technologies.
998 * Determine the number of ports available on the device.
1000 #define PCI_VENDOR_ID_ENDRUN 0x7401
1001 #define PCI_DEVICE_ID_ENDRUN_1588 0xe100
1003 static int pci_endrun_init(struct pci_dev
*dev
)
1006 unsigned long deviceID
;
1007 unsigned int number_uarts
= 0;
1009 /* EndRun device is all 0xexxx */
1010 if (dev
->vendor
== PCI_VENDOR_ID_ENDRUN
&&
1011 (dev
->device
& 0xf000) != 0xe000)
1014 p
= pci_iomap(dev
, 0, 5);
1018 deviceID
= ioread32(p
);
1020 if (deviceID
== 0x07000200) {
1021 number_uarts
= ioread8(p
+ 4);
1023 "%d ports detected on EndRun PCI Express device\n",
1026 pci_iounmap(dev
, p
);
1027 return number_uarts
;
1031 * Oxford Semiconductor Inc.
1032 * Check that device is part of the Tornado range of devices, then determine
1033 * the number of ports available on the device.
1035 static int pci_oxsemi_tornado_init(struct pci_dev
*dev
)
1038 unsigned long deviceID
;
1039 unsigned int number_uarts
= 0;
1041 /* OxSemi Tornado devices are all 0xCxxx */
1042 if (dev
->vendor
== PCI_VENDOR_ID_OXSEMI
&&
1043 (dev
->device
& 0xF000) != 0xC000)
1046 p
= pci_iomap(dev
, 0, 5);
1050 deviceID
= ioread32(p
);
1051 /* Tornado device */
1052 if (deviceID
== 0x07000200) {
1053 number_uarts
= ioread8(p
+ 4);
1055 "%d ports detected on Oxford PCI Express device\n",
1058 pci_iounmap(dev
, p
);
1059 return number_uarts
;
1062 static int pci_asix_setup(struct serial_private
*priv
,
1063 const struct pciserial_board
*board
,
1064 struct uart_8250_port
*port
, int idx
)
1066 port
->bugs
|= UART_BUG_PARITY
;
1067 return pci_default_setup(priv
, board
, port
, idx
);
1070 /* Quatech devices have their own extra interface features */
1072 struct quatech_feature
{
1077 #define QPCR_TEST_FOR1 0x3F
1078 #define QPCR_TEST_GET1 0x00
1079 #define QPCR_TEST_FOR2 0x40
1080 #define QPCR_TEST_GET2 0x40
1081 #define QPCR_TEST_FOR3 0x80
1082 #define QPCR_TEST_GET3 0x40
1083 #define QPCR_TEST_FOR4 0xC0
1084 #define QPCR_TEST_GET4 0x80
1086 #define QOPR_CLOCK_X1 0x0000
1087 #define QOPR_CLOCK_X2 0x0001
1088 #define QOPR_CLOCK_X4 0x0002
1089 #define QOPR_CLOCK_X8 0x0003
1090 #define QOPR_CLOCK_RATE_MASK 0x0003
1093 static struct quatech_feature quatech_cards
[] = {
1094 { PCI_DEVICE_ID_QUATECH_QSC100
, 1 },
1095 { PCI_DEVICE_ID_QUATECH_DSC100
, 1 },
1096 { PCI_DEVICE_ID_QUATECH_DSC100E
, 0 },
1097 { PCI_DEVICE_ID_QUATECH_DSC200
, 1 },
1098 { PCI_DEVICE_ID_QUATECH_DSC200E
, 0 },
1099 { PCI_DEVICE_ID_QUATECH_ESC100D
, 1 },
1100 { PCI_DEVICE_ID_QUATECH_ESC100M
, 1 },
1101 { PCI_DEVICE_ID_QUATECH_QSCP100
, 1 },
1102 { PCI_DEVICE_ID_QUATECH_DSCP100
, 1 },
1103 { PCI_DEVICE_ID_QUATECH_QSCP200
, 1 },
1104 { PCI_DEVICE_ID_QUATECH_DSCP200
, 1 },
1105 { PCI_DEVICE_ID_QUATECH_ESCLP100
, 0 },
1106 { PCI_DEVICE_ID_QUATECH_QSCLP100
, 0 },
1107 { PCI_DEVICE_ID_QUATECH_DSCLP100
, 0 },
1108 { PCI_DEVICE_ID_QUATECH_SSCLP100
, 0 },
1109 { PCI_DEVICE_ID_QUATECH_QSCLP200
, 0 },
1110 { PCI_DEVICE_ID_QUATECH_DSCLP200
, 0 },
1111 { PCI_DEVICE_ID_QUATECH_SSCLP200
, 0 },
1112 { PCI_DEVICE_ID_QUATECH_SPPXP_100
, 0 },
1116 static int pci_quatech_amcc(u16 devid
)
1118 struct quatech_feature
*qf
= &quatech_cards
[0];
1120 if (qf
->devid
== devid
)
1124 pr_err("quatech: unknown port type '0x%04X'.\n", devid
);
1128 static int pci_quatech_rqopr(struct uart_8250_port
*port
)
1130 unsigned long base
= port
->port
.iobase
;
1133 LCR
= inb(base
+ UART_LCR
);
1134 outb(0xBF, base
+ UART_LCR
);
1135 val
= inb(base
+ UART_SCR
);
1136 outb(LCR
, base
+ UART_LCR
);
1140 static void pci_quatech_wqopr(struct uart_8250_port
*port
, u8 qopr
)
1142 unsigned long base
= port
->port
.iobase
;
1145 LCR
= inb(base
+ UART_LCR
);
1146 outb(0xBF, base
+ UART_LCR
);
1147 val
= inb(base
+ UART_SCR
);
1148 outb(qopr
, base
+ UART_SCR
);
1149 outb(LCR
, base
+ UART_LCR
);
1152 static int pci_quatech_rqmcr(struct uart_8250_port
*port
)
1154 unsigned long base
= port
->port
.iobase
;
1157 LCR
= inb(base
+ UART_LCR
);
1158 outb(0xBF, base
+ UART_LCR
);
1159 val
= inb(base
+ UART_SCR
);
1160 outb(val
| 0x10, base
+ UART_SCR
);
1161 qmcr
= inb(base
+ UART_MCR
);
1162 outb(val
, base
+ UART_SCR
);
1163 outb(LCR
, base
+ UART_LCR
);
1168 static void pci_quatech_wqmcr(struct uart_8250_port
*port
, u8 qmcr
)
1170 unsigned long base
= port
->port
.iobase
;
1173 LCR
= inb(base
+ UART_LCR
);
1174 outb(0xBF, base
+ UART_LCR
);
1175 val
= inb(base
+ UART_SCR
);
1176 outb(val
| 0x10, base
+ UART_SCR
);
1177 outb(qmcr
, base
+ UART_MCR
);
1178 outb(val
, base
+ UART_SCR
);
1179 outb(LCR
, base
+ UART_LCR
);
1182 static int pci_quatech_has_qmcr(struct uart_8250_port
*port
)
1184 unsigned long base
= port
->port
.iobase
;
1187 LCR
= inb(base
+ UART_LCR
);
1188 outb(0xBF, base
+ UART_LCR
);
1189 val
= inb(base
+ UART_SCR
);
1191 outb(0x80, UART_LCR
);
1192 if (!(inb(UART_SCR
) & 0x20)) {
1193 outb(LCR
, base
+ UART_LCR
);
1200 static int pci_quatech_test(struct uart_8250_port
*port
)
1203 u8 qopr
= pci_quatech_rqopr(port
);
1204 pci_quatech_wqopr(port
, qopr
& QPCR_TEST_FOR1
);
1205 reg
= pci_quatech_rqopr(port
) & 0xC0;
1206 if (reg
!= QPCR_TEST_GET1
)
1208 pci_quatech_wqopr(port
, (qopr
& QPCR_TEST_FOR1
)|QPCR_TEST_FOR2
);
1209 reg
= pci_quatech_rqopr(port
) & 0xC0;
1210 if (reg
!= QPCR_TEST_GET2
)
1212 pci_quatech_wqopr(port
, (qopr
& QPCR_TEST_FOR1
)|QPCR_TEST_FOR3
);
1213 reg
= pci_quatech_rqopr(port
) & 0xC0;
1214 if (reg
!= QPCR_TEST_GET3
)
1216 pci_quatech_wqopr(port
, (qopr
& QPCR_TEST_FOR1
)|QPCR_TEST_FOR4
);
1217 reg
= pci_quatech_rqopr(port
) & 0xC0;
1218 if (reg
!= QPCR_TEST_GET4
)
1221 pci_quatech_wqopr(port
, qopr
);
1225 static int pci_quatech_clock(struct uart_8250_port
*port
)
1228 unsigned long clock
;
1230 if (pci_quatech_test(port
) < 0)
1233 qopr
= pci_quatech_rqopr(port
);
1235 pci_quatech_wqopr(port
, qopr
& ~QOPR_CLOCK_X8
);
1236 reg
= pci_quatech_rqopr(port
);
1237 if (reg
& QOPR_CLOCK_X8
) {
1241 pci_quatech_wqopr(port
, qopr
| QOPR_CLOCK_X8
);
1242 reg
= pci_quatech_rqopr(port
);
1243 if (!(reg
& QOPR_CLOCK_X8
)) {
1247 reg
&= QOPR_CLOCK_X8
;
1248 if (reg
== QOPR_CLOCK_X2
) {
1250 set
= QOPR_CLOCK_X2
;
1251 } else if (reg
== QOPR_CLOCK_X4
) {
1253 set
= QOPR_CLOCK_X4
;
1254 } else if (reg
== QOPR_CLOCK_X8
) {
1256 set
= QOPR_CLOCK_X8
;
1259 set
= QOPR_CLOCK_X1
;
1261 qopr
&= ~QOPR_CLOCK_RATE_MASK
;
1265 pci_quatech_wqopr(port
, qopr
);
1269 static int pci_quatech_rs422(struct uart_8250_port
*port
)
1274 if (!pci_quatech_has_qmcr(port
))
1276 qmcr
= pci_quatech_rqmcr(port
);
1277 pci_quatech_wqmcr(port
, 0xFF);
1278 if (pci_quatech_rqmcr(port
))
1280 pci_quatech_wqmcr(port
, qmcr
);
1284 static int pci_quatech_init(struct pci_dev
*dev
)
1286 if (pci_quatech_amcc(dev
->device
)) {
1287 unsigned long base
= pci_resource_start(dev
, 0);
1290 outl(inl(base
+ 0x38) | 0x00002000, base
+ 0x38);
1291 tmp
= inl(base
+ 0x3c);
1292 outl(tmp
| 0x01000000, base
+ 0x3c);
1293 outl(tmp
&= ~0x01000000, base
+ 0x3c);
1299 static int pci_quatech_setup(struct serial_private
*priv
,
1300 const struct pciserial_board
*board
,
1301 struct uart_8250_port
*port
, int idx
)
1303 /* Needed by pci_quatech calls below */
1304 port
->port
.iobase
= pci_resource_start(priv
->dev
, FL_GET_BASE(board
->flags
));
1305 /* Set up the clocking */
1306 port
->port
.uartclk
= pci_quatech_clock(port
);
1307 /* For now just warn about RS422 */
1308 if (pci_quatech_rs422(port
))
1309 pr_warn("quatech: software control of RS422 features not currently supported.\n");
1310 return pci_default_setup(priv
, board
, port
, idx
);
1313 static void pci_quatech_exit(struct pci_dev
*dev
)
1317 static int pci_default_setup(struct serial_private
*priv
,
1318 const struct pciserial_board
*board
,
1319 struct uart_8250_port
*port
, int idx
)
1321 unsigned int bar
, offset
= board
->first_offset
, maxnr
;
1323 bar
= FL_GET_BASE(board
->flags
);
1324 if (board
->flags
& FL_BASE_BARS
)
1327 offset
+= idx
* board
->uart_offset
;
1329 maxnr
= (pci_resource_len(priv
->dev
, bar
) - board
->first_offset
) >>
1330 (board
->reg_shift
+ 3);
1332 if (board
->flags
& FL_REGION_SZ_CAP
&& idx
>= maxnr
)
1335 return setup_port(priv
, port
, bar
, offset
, board
->reg_shift
);
1338 static int pci_pericom_setup(struct serial_private
*priv
,
1339 const struct pciserial_board
*board
,
1340 struct uart_8250_port
*port
, int idx
)
1342 unsigned int bar
, offset
= board
->first_offset
, maxnr
;
1344 bar
= FL_GET_BASE(board
->flags
);
1345 if (board
->flags
& FL_BASE_BARS
)
1348 offset
+= idx
* board
->uart_offset
;
1350 maxnr
= (pci_resource_len(priv
->dev
, bar
) - board
->first_offset
) >>
1351 (board
->reg_shift
+ 3);
1353 if (board
->flags
& FL_REGION_SZ_CAP
&& idx
>= maxnr
)
1356 port
->port
.uartclk
= 14745600;
1358 return setup_port(priv
, port
, bar
, offset
, board
->reg_shift
);
1362 ce4100_serial_setup(struct serial_private
*priv
,
1363 const struct pciserial_board
*board
,
1364 struct uart_8250_port
*port
, int idx
)
1368 ret
= setup_port(priv
, port
, idx
, 0, board
->reg_shift
);
1369 port
->port
.iotype
= UPIO_MEM32
;
1370 port
->port
.type
= PORT_XSCALE
;
1371 port
->port
.flags
= (port
->port
.flags
| UPF_FIXED_PORT
| UPF_FIXED_TYPE
);
1372 port
->port
.regshift
= 2;
1377 #define PCI_DEVICE_ID_INTEL_BYT_UART1 0x0f0a
1378 #define PCI_DEVICE_ID_INTEL_BYT_UART2 0x0f0c
1380 #define PCI_DEVICE_ID_INTEL_BSW_UART1 0x228a
1381 #define PCI_DEVICE_ID_INTEL_BSW_UART2 0x228c
1383 #define BYT_PRV_CLK 0x800
1384 #define BYT_PRV_CLK_EN (1 << 0)
1385 #define BYT_PRV_CLK_M_VAL_SHIFT 1
1386 #define BYT_PRV_CLK_N_VAL_SHIFT 16
1387 #define BYT_PRV_CLK_UPDATE (1 << 31)
1389 #define BYT_TX_OVF_INT 0x820
1390 #define BYT_TX_OVF_INT_MASK (1 << 1)
1393 byt_set_termios(struct uart_port
*p
, struct ktermios
*termios
,
1394 struct ktermios
*old
)
1396 unsigned int baud
= tty_termios_baud_rate(termios
);
1397 unsigned long fref
= 100000000, fuart
= baud
* 16;
1398 unsigned long w
= BIT(15) - 1;
1402 /* Get Fuart closer to Fref */
1403 fuart
*= rounddown_pow_of_two(fref
/ fuart
);
1406 * For baud rates 0.5M, 1M, 1.5M, 2M, 2.5M, 3M, 3.5M and 4M the
1407 * dividers must be adjusted.
1409 * uartclk = (m / n) * 100 MHz, where m <= n
1411 rational_best_approximation(fuart
, fref
, w
, w
, &m
, &n
);
1414 /* Reset the clock */
1415 reg
= (m
<< BYT_PRV_CLK_M_VAL_SHIFT
) | (n
<< BYT_PRV_CLK_N_VAL_SHIFT
);
1416 writel(reg
, p
->membase
+ BYT_PRV_CLK
);
1417 reg
|= BYT_PRV_CLK_EN
| BYT_PRV_CLK_UPDATE
;
1418 writel(reg
, p
->membase
+ BYT_PRV_CLK
);
1420 serial8250_do_set_termios(p
, termios
, old
);
1423 static bool byt_dma_filter(struct dma_chan
*chan
, void *param
)
1425 struct dw_dma_slave
*dws
= param
;
1427 if (dws
->dma_dev
!= chan
->device
->dev
)
1430 chan
->private = dws
;
1435 byt_serial_setup(struct serial_private
*priv
,
1436 const struct pciserial_board
*board
,
1437 struct uart_8250_port
*port
, int idx
)
1439 struct pci_dev
*pdev
= priv
->dev
;
1440 struct device
*dev
= port
->port
.dev
;
1441 struct uart_8250_dma
*dma
;
1442 struct dw_dma_slave
*tx_param
, *rx_param
;
1443 struct pci_dev
*dma_dev
;
1446 dma
= devm_kzalloc(dev
, sizeof(*dma
), GFP_KERNEL
);
1450 tx_param
= devm_kzalloc(dev
, sizeof(*tx_param
), GFP_KERNEL
);
1454 rx_param
= devm_kzalloc(dev
, sizeof(*rx_param
), GFP_KERNEL
);
1458 switch (pdev
->device
) {
1459 case PCI_DEVICE_ID_INTEL_BYT_UART1
:
1460 case PCI_DEVICE_ID_INTEL_BSW_UART1
:
1461 rx_param
->src_id
= 3;
1462 tx_param
->dst_id
= 2;
1464 case PCI_DEVICE_ID_INTEL_BYT_UART2
:
1465 case PCI_DEVICE_ID_INTEL_BSW_UART2
:
1466 rx_param
->src_id
= 5;
1467 tx_param
->dst_id
= 4;
1473 rx_param
->src_master
= 1;
1474 rx_param
->dst_master
= 0;
1476 dma
->rxconf
.src_maxburst
= 16;
1478 tx_param
->src_master
= 1;
1479 tx_param
->dst_master
= 0;
1481 dma
->txconf
.dst_maxburst
= 16;
1483 dma_dev
= pci_get_slot(pdev
->bus
, PCI_DEVFN(PCI_SLOT(pdev
->devfn
), 0));
1484 rx_param
->dma_dev
= &dma_dev
->dev
;
1485 tx_param
->dma_dev
= &dma_dev
->dev
;
1487 dma
->fn
= byt_dma_filter
;
1488 dma
->rx_param
= rx_param
;
1489 dma
->tx_param
= tx_param
;
1491 ret
= pci_default_setup(priv
, board
, port
, idx
);
1492 port
->port
.iotype
= UPIO_MEM
;
1493 port
->port
.type
= PORT_16550A
;
1494 port
->port
.flags
= (port
->port
.flags
| UPF_FIXED_PORT
| UPF_FIXED_TYPE
);
1495 port
->port
.set_termios
= byt_set_termios
;
1496 port
->port
.fifosize
= 64;
1497 port
->tx_loadsz
= 64;
1499 port
->capabilities
= UART_CAP_FIFO
| UART_CAP_AFE
;
1501 /* Disable Tx counter interrupts */
1502 writel(BYT_TX_OVF_INT_MASK
, port
->port
.membase
+ BYT_TX_OVF_INT
);
1507 #define INTEL_MID_UART_PS 0x30
1508 #define INTEL_MID_UART_MUL 0x34
1509 #define INTEL_MID_UART_DIV 0x38
1511 static void intel_mid_set_termios(struct uart_port
*p
,
1512 struct ktermios
*termios
,
1513 struct ktermios
*old
,
1516 unsigned int baud
= tty_termios_baud_rate(termios
);
1517 unsigned short ps
= 16;
1518 unsigned long fuart
= baud
* ps
;
1519 unsigned long w
= BIT(24) - 1;
1520 unsigned long mul
, div
;
1523 /* Find prescaler value that satisfies Fuart < Fref */
1525 ps
= fref
/ baud
; /* baud rate too high */
1527 ps
= 1; /* PLL case */
1530 /* Get Fuart closer to Fref */
1531 fuart
*= rounddown_pow_of_two(fref
/ fuart
);
1534 rational_best_approximation(fuart
, fref
, w
, w
, &mul
, &div
);
1535 p
->uartclk
= fuart
* 16 / ps
; /* core uses ps = 16 always */
1537 writel(ps
, p
->membase
+ INTEL_MID_UART_PS
); /* set PS */
1538 writel(mul
, p
->membase
+ INTEL_MID_UART_MUL
); /* set MUL */
1539 writel(div
, p
->membase
+ INTEL_MID_UART_DIV
);
1541 serial8250_do_set_termios(p
, termios
, old
);
1544 static void intel_mid_set_termios_38_4M(struct uart_port
*p
,
1545 struct ktermios
*termios
,
1546 struct ktermios
*old
)
1548 intel_mid_set_termios(p
, termios
, old
, 38400000);
1551 static void intel_mid_set_termios_50M(struct uart_port
*p
,
1552 struct ktermios
*termios
,
1553 struct ktermios
*old
)
1556 * The uart clk is 50Mhz, and the baud rate come from:
1557 * baud = 50M * MUL / (DIV * PS * DLAB)
1559 intel_mid_set_termios(p
, termios
, old
, 50000000);
1562 static bool intel_mid_dma_filter(struct dma_chan
*chan
, void *param
)
1564 struct hsu_dma_slave
*s
= param
;
1566 if (s
->dma_dev
!= chan
->device
->dev
|| s
->chan_id
!= chan
->chan_id
)
1573 static int intel_mid_serial_setup(struct serial_private
*priv
,
1574 const struct pciserial_board
*board
,
1575 struct uart_8250_port
*port
, int idx
,
1576 int index
, struct pci_dev
*dma_dev
)
1578 struct device
*dev
= port
->port
.dev
;
1579 struct uart_8250_dma
*dma
;
1580 struct hsu_dma_slave
*tx_param
, *rx_param
;
1582 dma
= devm_kzalloc(dev
, sizeof(*dma
), GFP_KERNEL
);
1586 tx_param
= devm_kzalloc(dev
, sizeof(*tx_param
), GFP_KERNEL
);
1590 rx_param
= devm_kzalloc(dev
, sizeof(*rx_param
), GFP_KERNEL
);
1594 rx_param
->chan_id
= index
* 2 + 1;
1595 tx_param
->chan_id
= index
* 2;
1597 dma
->rxconf
.src_maxburst
= 64;
1598 dma
->txconf
.dst_maxburst
= 64;
1600 rx_param
->dma_dev
= &dma_dev
->dev
;
1601 tx_param
->dma_dev
= &dma_dev
->dev
;
1603 dma
->fn
= intel_mid_dma_filter
;
1604 dma
->rx_param
= rx_param
;
1605 dma
->tx_param
= tx_param
;
1607 port
->port
.type
= PORT_16750
;
1608 port
->port
.flags
|= UPF_FIXED_PORT
| UPF_FIXED_TYPE
;
1611 return pci_default_setup(priv
, board
, port
, idx
);
1614 #define PCI_DEVICE_ID_INTEL_PNW_UART1 0x081b
1615 #define PCI_DEVICE_ID_INTEL_PNW_UART2 0x081c
1616 #define PCI_DEVICE_ID_INTEL_PNW_UART3 0x081d
1618 static int pnw_serial_setup(struct serial_private
*priv
,
1619 const struct pciserial_board
*board
,
1620 struct uart_8250_port
*port
, int idx
)
1622 struct pci_dev
*pdev
= priv
->dev
;
1623 struct pci_dev
*dma_dev
;
1626 switch (pdev
->device
) {
1627 case PCI_DEVICE_ID_INTEL_PNW_UART1
:
1630 case PCI_DEVICE_ID_INTEL_PNW_UART2
:
1633 case PCI_DEVICE_ID_INTEL_PNW_UART3
:
1640 dma_dev
= pci_get_slot(pdev
->bus
, PCI_DEVFN(PCI_SLOT(pdev
->devfn
), 3));
1642 port
->port
.set_termios
= intel_mid_set_termios_50M
;
1644 return intel_mid_serial_setup(priv
, board
, port
, idx
, index
, dma_dev
);
1647 #define PCI_DEVICE_ID_INTEL_TNG_UART 0x1191
1649 static int tng_serial_setup(struct serial_private
*priv
,
1650 const struct pciserial_board
*board
,
1651 struct uart_8250_port
*port
, int idx
)
1653 struct pci_dev
*pdev
= priv
->dev
;
1654 struct pci_dev
*dma_dev
;
1655 int index
= PCI_FUNC(pdev
->devfn
);
1657 /* Currently no support for HSU port0 */
1661 dma_dev
= pci_get_slot(pdev
->bus
, PCI_DEVFN(5, 0));
1663 port
->port
.set_termios
= intel_mid_set_termios_38_4M
;
1665 return intel_mid_serial_setup(priv
, board
, port
, idx
, index
, dma_dev
);
1669 pci_omegapci_setup(struct serial_private
*priv
,
1670 const struct pciserial_board
*board
,
1671 struct uart_8250_port
*port
, int idx
)
1673 return setup_port(priv
, port
, 2, idx
* 8, 0);
1677 pci_brcm_trumanage_setup(struct serial_private
*priv
,
1678 const struct pciserial_board
*board
,
1679 struct uart_8250_port
*port
, int idx
)
1681 int ret
= pci_default_setup(priv
, board
, port
, idx
);
1683 port
->port
.type
= PORT_BRCM_TRUMANAGE
;
1684 port
->port
.flags
= (port
->port
.flags
| UPF_FIXED_PORT
| UPF_FIXED_TYPE
);
1688 static int pci_fintek_setup(struct serial_private
*priv
,
1689 const struct pciserial_board
*board
,
1690 struct uart_8250_port
*port
, int idx
)
1692 struct pci_dev
*pdev
= priv
->dev
;
1696 config_base
= 0x40 + 0x08 * idx
;
1698 /* Get the io address from configuration space */
1699 pci_read_config_word(pdev
, config_base
+ 4, &iobase
);
1701 dev_dbg(&pdev
->dev
, "%s: idx=%d iobase=0x%x", __func__
, idx
, iobase
);
1703 port
->port
.iotype
= UPIO_PORT
;
1704 port
->port
.iobase
= iobase
;
1709 static int pci_fintek_init(struct pci_dev
*dev
)
1711 unsigned long iobase
;
1716 switch (dev
->device
) {
1717 case 0x1104: /* 4 ports */
1718 case 0x1108: /* 8 ports */
1719 max_port
= dev
->device
& 0xff;
1721 case 0x1112: /* 12 ports */
1728 /* Get the io address dispatch from the BIOS */
1729 pci_read_config_dword(dev
, 0x24, &bar_data
[0]);
1730 pci_read_config_dword(dev
, 0x20, &bar_data
[1]);
1731 pci_read_config_dword(dev
, 0x1c, &bar_data
[2]);
1733 for (i
= 0; i
< max_port
; ++i
) {
1734 /* UART0 configuration offset start from 0x40 */
1735 config_base
= 0x40 + 0x08 * i
;
1737 /* Calculate Real IO Port */
1738 iobase
= (bar_data
[i
/ 4] & 0xffffffe0) + (i
% 4) * 8;
1740 /* Enable UART I/O port */
1741 pci_write_config_byte(dev
, config_base
+ 0x00, 0x01);
1743 /* Select 128-byte FIFO and 8x FIFO threshold */
1744 pci_write_config_byte(dev
, config_base
+ 0x01, 0x33);
1747 pci_write_config_byte(dev
, config_base
+ 0x04,
1748 (u8
)(iobase
& 0xff));
1751 pci_write_config_byte(dev
, config_base
+ 0x05,
1752 (u8
)((iobase
& 0xff00) >> 8));
1754 pci_write_config_byte(dev
, config_base
+ 0x06, dev
->irq
);
1760 static int skip_tx_en_setup(struct serial_private
*priv
,
1761 const struct pciserial_board
*board
,
1762 struct uart_8250_port
*port
, int idx
)
1764 port
->port
.flags
|= UPF_NO_TXEN_TEST
;
1765 dev_dbg(&priv
->dev
->dev
,
1766 "serial8250: skipping TxEn test for device [%04x:%04x] subsystem [%04x:%04x]\n",
1767 priv
->dev
->vendor
, priv
->dev
->device
,
1768 priv
->dev
->subsystem_vendor
, priv
->dev
->subsystem_device
);
1770 return pci_default_setup(priv
, board
, port
, idx
);
1773 static void kt_handle_break(struct uart_port
*p
)
1775 struct uart_8250_port
*up
= up_to_u8250p(p
);
1777 * On receipt of a BI, serial device in Intel ME (Intel
1778 * management engine) needs to have its fifos cleared for sane
1779 * SOL (Serial Over Lan) output.
1781 serial8250_clear_and_reinit_fifos(up
);
1784 static unsigned int kt_serial_in(struct uart_port
*p
, int offset
)
1786 struct uart_8250_port
*up
= up_to_u8250p(p
);
1790 * When the Intel ME (management engine) gets reset its serial
1791 * port registers could return 0 momentarily. Functions like
1792 * serial8250_console_write, read and save the IER, perform
1793 * some operation and then restore it. In order to avoid
1794 * setting IER register inadvertently to 0, if the value read
1795 * is 0, double check with ier value in uart_8250_port and use
1796 * that instead. up->ier should be the same value as what is
1797 * currently configured.
1799 val
= inb(p
->iobase
+ offset
);
1800 if (offset
== UART_IER
) {
1807 static int kt_serial_setup(struct serial_private
*priv
,
1808 const struct pciserial_board
*board
,
1809 struct uart_8250_port
*port
, int idx
)
1811 port
->port
.flags
|= UPF_BUG_THRE
;
1812 port
->port
.serial_in
= kt_serial_in
;
1813 port
->port
.handle_break
= kt_handle_break
;
1814 return skip_tx_en_setup(priv
, board
, port
, idx
);
1817 static int pci_eg20t_init(struct pci_dev
*dev
)
1819 #if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE)
1826 #define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358
1827 #define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
1830 pci_xr17c154_setup(struct serial_private
*priv
,
1831 const struct pciserial_board
*board
,
1832 struct uart_8250_port
*port
, int idx
)
1834 port
->port
.flags
|= UPF_EXAR_EFR
;
1835 return pci_default_setup(priv
, board
, port
, idx
);
1839 xr17v35x_has_slave(struct serial_private
*priv
)
1841 const int dev_id
= priv
->dev
->device
;
1843 return ((dev_id
== PCI_DEVICE_ID_EXAR_XR17V4358
) ||
1844 (dev_id
== PCI_DEVICE_ID_EXAR_XR17V8358
));
1848 pci_xr17v35x_setup(struct serial_private
*priv
,
1849 const struct pciserial_board
*board
,
1850 struct uart_8250_port
*port
, int idx
)
1854 p
= pci_ioremap_bar(priv
->dev
, 0);
1858 port
->port
.flags
|= UPF_EXAR_EFR
;
1861 * Setup the uart clock for the devices on expansion slot to
1862 * half the clock speed of the main chip (which is 125MHz)
1864 if (xr17v35x_has_slave(priv
) && idx
>= 8)
1865 port
->port
.uartclk
= (7812500 * 16 / 2);
1868 * Setup Multipurpose Input/Output pins.
1871 writeb(0x00, p
+ 0x8f); /*MPIOINT[7:0]*/
1872 writeb(0x00, p
+ 0x90); /*MPIOLVL[7:0]*/
1873 writeb(0x00, p
+ 0x91); /*MPIO3T[7:0]*/
1874 writeb(0x00, p
+ 0x92); /*MPIOINV[7:0]*/
1875 writeb(0x00, p
+ 0x93); /*MPIOSEL[7:0]*/
1876 writeb(0x00, p
+ 0x94); /*MPIOOD[7:0]*/
1877 writeb(0x00, p
+ 0x95); /*MPIOINT[15:8]*/
1878 writeb(0x00, p
+ 0x96); /*MPIOLVL[15:8]*/
1879 writeb(0x00, p
+ 0x97); /*MPIO3T[15:8]*/
1880 writeb(0x00, p
+ 0x98); /*MPIOINV[15:8]*/
1881 writeb(0x00, p
+ 0x99); /*MPIOSEL[15:8]*/
1882 writeb(0x00, p
+ 0x9a); /*MPIOOD[15:8]*/
1884 writeb(0x00, p
+ UART_EXAR_8XMODE
);
1885 writeb(UART_FCTR_EXAR_TRGD
, p
+ UART_EXAR_FCTR
);
1886 writeb(128, p
+ UART_EXAR_TXTRG
);
1887 writeb(128, p
+ UART_EXAR_RXTRG
);
1890 return pci_default_setup(priv
, board
, port
, idx
);
1893 #define PCI_DEVICE_ID_COMMTECH_4222PCI335 0x0004
1894 #define PCI_DEVICE_ID_COMMTECH_4224PCI335 0x0002
1895 #define PCI_DEVICE_ID_COMMTECH_2324PCI335 0x000a
1896 #define PCI_DEVICE_ID_COMMTECH_2328PCI335 0x000b
1899 pci_fastcom335_setup(struct serial_private
*priv
,
1900 const struct pciserial_board
*board
,
1901 struct uart_8250_port
*port
, int idx
)
1905 p
= pci_ioremap_bar(priv
->dev
, 0);
1909 port
->port
.flags
|= UPF_EXAR_EFR
;
1912 * Setup Multipurpose Input/Output pins.
1915 switch (priv
->dev
->device
) {
1916 case PCI_DEVICE_ID_COMMTECH_4222PCI335
:
1917 case PCI_DEVICE_ID_COMMTECH_4224PCI335
:
1918 writeb(0x78, p
+ 0x90); /* MPIOLVL[7:0] */
1919 writeb(0x00, p
+ 0x92); /* MPIOINV[7:0] */
1920 writeb(0x00, p
+ 0x93); /* MPIOSEL[7:0] */
1922 case PCI_DEVICE_ID_COMMTECH_2324PCI335
:
1923 case PCI_DEVICE_ID_COMMTECH_2328PCI335
:
1924 writeb(0x00, p
+ 0x90); /* MPIOLVL[7:0] */
1925 writeb(0xc0, p
+ 0x92); /* MPIOINV[7:0] */
1926 writeb(0xc0, p
+ 0x93); /* MPIOSEL[7:0] */
1929 writeb(0x00, p
+ 0x8f); /* MPIOINT[7:0] */
1930 writeb(0x00, p
+ 0x91); /* MPIO3T[7:0] */
1931 writeb(0x00, p
+ 0x94); /* MPIOOD[7:0] */
1933 writeb(0x00, p
+ UART_EXAR_8XMODE
);
1934 writeb(UART_FCTR_EXAR_TRGD
, p
+ UART_EXAR_FCTR
);
1935 writeb(32, p
+ UART_EXAR_TXTRG
);
1936 writeb(32, p
+ UART_EXAR_RXTRG
);
1939 return pci_default_setup(priv
, board
, port
, idx
);
1943 pci_wch_ch353_setup(struct serial_private
*priv
,
1944 const struct pciserial_board
*board
,
1945 struct uart_8250_port
*port
, int idx
)
1947 port
->port
.flags
|= UPF_FIXED_TYPE
;
1948 port
->port
.type
= PORT_16550A
;
1949 return pci_default_setup(priv
, board
, port
, idx
);
1953 pci_wch_ch38x_setup(struct serial_private
*priv
,
1954 const struct pciserial_board
*board
,
1955 struct uart_8250_port
*port
, int idx
)
1957 port
->port
.flags
|= UPF_FIXED_TYPE
;
1958 port
->port
.type
= PORT_16850
;
1959 return pci_default_setup(priv
, board
, port
, idx
);
1962 #define PCI_VENDOR_ID_SBSMODULARIO 0x124B
1963 #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B
1964 #define PCI_DEVICE_ID_OCTPRO 0x0001
1965 #define PCI_SUBDEVICE_ID_OCTPRO232 0x0108
1966 #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208
1967 #define PCI_SUBDEVICE_ID_POCTAL232 0x0308
1968 #define PCI_SUBDEVICE_ID_POCTAL422 0x0408
1969 #define PCI_SUBDEVICE_ID_SIIG_DUAL_00 0x2500
1970 #define PCI_SUBDEVICE_ID_SIIG_DUAL_30 0x2530
1971 #define PCI_VENDOR_ID_ADVANTECH 0x13fe
1972 #define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66
1973 #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620
1974 #define PCI_DEVICE_ID_ADVANTECH_PCI3618 0x3618
1975 #define PCI_DEVICE_ID_ADVANTECH_PCIf618 0xf618
1976 #define PCI_DEVICE_ID_TITAN_200I 0x8028
1977 #define PCI_DEVICE_ID_TITAN_400I 0x8048
1978 #define PCI_DEVICE_ID_TITAN_800I 0x8088
1979 #define PCI_DEVICE_ID_TITAN_800EH 0xA007
1980 #define PCI_DEVICE_ID_TITAN_800EHB 0xA008
1981 #define PCI_DEVICE_ID_TITAN_400EH 0xA009
1982 #define PCI_DEVICE_ID_TITAN_100E 0xA010
1983 #define PCI_DEVICE_ID_TITAN_200E 0xA012
1984 #define PCI_DEVICE_ID_TITAN_400E 0xA013
1985 #define PCI_DEVICE_ID_TITAN_800E 0xA014
1986 #define PCI_DEVICE_ID_TITAN_200EI 0xA016
1987 #define PCI_DEVICE_ID_TITAN_200EISI 0xA017
1988 #define PCI_DEVICE_ID_TITAN_200V3 0xA306
1989 #define PCI_DEVICE_ID_TITAN_400V3 0xA310
1990 #define PCI_DEVICE_ID_TITAN_410V3 0xA312
1991 #define PCI_DEVICE_ID_TITAN_800V3 0xA314
1992 #define PCI_DEVICE_ID_TITAN_800V3B 0xA315
1993 #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538
1994 #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6
1995 #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
1996 #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d
1997 #define PCI_VENDOR_ID_WCH 0x4348
1998 #define PCI_DEVICE_ID_WCH_CH352_2S 0x3253
1999 #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453
2000 #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046
2001 #define PCI_DEVICE_ID_WCH_CH353_1S1P 0x5053
2002 #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053
2003 #define PCI_VENDOR_ID_AGESTAR 0x5372
2004 #define PCI_DEVICE_ID_AGESTAR_9375 0x6872
2005 #define PCI_VENDOR_ID_ASIX 0x9710
2006 #define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020
2007 #define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
2008 #define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
2009 #define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
2010 #define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e
2011 #define PCI_DEVICE_ID_INTEL_QRK_UART 0x0936
2013 #define PCI_VENDOR_ID_SUNIX 0x1fd4
2014 #define PCI_DEVICE_ID_SUNIX_1999 0x1999
2016 #define PCIE_VENDOR_ID_WCH 0x1c00
2017 #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250
2018 #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470
2020 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
2021 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
2022 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
2025 * Master list of serial port init/setup/exit quirks.
2026 * This does not describe the general nature of the port.
2027 * (ie, baud base, number and location of ports, etc)
2029 * This list is ordered alphabetically by vendor then device.
2030 * Specific entries must come before more generic entries.
2032 static struct pci_serial_quirk pci_serial_quirks
[] __refdata
= {
2034 * ADDI-DATA GmbH communication cards <info@addi-data.com>
2037 .vendor
= PCI_VENDOR_ID_AMCC
,
2038 .device
= PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800
,
2039 .subvendor
= PCI_ANY_ID
,
2040 .subdevice
= PCI_ANY_ID
,
2041 .setup
= addidata_apci7800_setup
,
2044 * AFAVLAB cards - these may be called via parport_serial
2045 * It is not clear whether this applies to all products.
2048 .vendor
= PCI_VENDOR_ID_AFAVLAB
,
2049 .device
= PCI_ANY_ID
,
2050 .subvendor
= PCI_ANY_ID
,
2051 .subdevice
= PCI_ANY_ID
,
2052 .setup
= afavlab_setup
,
2058 .vendor
= PCI_VENDOR_ID_HP
,
2059 .device
= PCI_DEVICE_ID_HP_DIVA
,
2060 .subvendor
= PCI_ANY_ID
,
2061 .subdevice
= PCI_ANY_ID
,
2062 .init
= pci_hp_diva_init
,
2063 .setup
= pci_hp_diva_setup
,
2069 .vendor
= PCI_VENDOR_ID_INTEL
,
2070 .device
= PCI_DEVICE_ID_INTEL_80960_RP
,
2071 .subvendor
= 0xe4bf,
2072 .subdevice
= PCI_ANY_ID
,
2073 .init
= pci_inteli960ni_init
,
2074 .setup
= pci_default_setup
,
2077 .vendor
= PCI_VENDOR_ID_INTEL
,
2078 .device
= PCI_DEVICE_ID_INTEL_8257X_SOL
,
2079 .subvendor
= PCI_ANY_ID
,
2080 .subdevice
= PCI_ANY_ID
,
2081 .setup
= skip_tx_en_setup
,
2084 .vendor
= PCI_VENDOR_ID_INTEL
,
2085 .device
= PCI_DEVICE_ID_INTEL_82573L_SOL
,
2086 .subvendor
= PCI_ANY_ID
,
2087 .subdevice
= PCI_ANY_ID
,
2088 .setup
= skip_tx_en_setup
,
2091 .vendor
= PCI_VENDOR_ID_INTEL
,
2092 .device
= PCI_DEVICE_ID_INTEL_82573E_SOL
,
2093 .subvendor
= PCI_ANY_ID
,
2094 .subdevice
= PCI_ANY_ID
,
2095 .setup
= skip_tx_en_setup
,
2098 .vendor
= PCI_VENDOR_ID_INTEL
,
2099 .device
= PCI_DEVICE_ID_INTEL_CE4100_UART
,
2100 .subvendor
= PCI_ANY_ID
,
2101 .subdevice
= PCI_ANY_ID
,
2102 .setup
= ce4100_serial_setup
,
2105 .vendor
= PCI_VENDOR_ID_INTEL
,
2106 .device
= PCI_DEVICE_ID_INTEL_PATSBURG_KT
,
2107 .subvendor
= PCI_ANY_ID
,
2108 .subdevice
= PCI_ANY_ID
,
2109 .setup
= kt_serial_setup
,
2112 .vendor
= PCI_VENDOR_ID_INTEL
,
2113 .device
= PCI_DEVICE_ID_INTEL_BYT_UART1
,
2114 .subvendor
= PCI_ANY_ID
,
2115 .subdevice
= PCI_ANY_ID
,
2116 .setup
= byt_serial_setup
,
2119 .vendor
= PCI_VENDOR_ID_INTEL
,
2120 .device
= PCI_DEVICE_ID_INTEL_BYT_UART2
,
2121 .subvendor
= PCI_ANY_ID
,
2122 .subdevice
= PCI_ANY_ID
,
2123 .setup
= byt_serial_setup
,
2126 .vendor
= PCI_VENDOR_ID_INTEL
,
2127 .device
= PCI_DEVICE_ID_INTEL_PNW_UART1
,
2128 .subvendor
= PCI_ANY_ID
,
2129 .subdevice
= PCI_ANY_ID
,
2130 .setup
= pnw_serial_setup
,
2133 .vendor
= PCI_VENDOR_ID_INTEL
,
2134 .device
= PCI_DEVICE_ID_INTEL_PNW_UART2
,
2135 .subvendor
= PCI_ANY_ID
,
2136 .subdevice
= PCI_ANY_ID
,
2137 .setup
= pnw_serial_setup
,
2140 .vendor
= PCI_VENDOR_ID_INTEL
,
2141 .device
= PCI_DEVICE_ID_INTEL_PNW_UART3
,
2142 .subvendor
= PCI_ANY_ID
,
2143 .subdevice
= PCI_ANY_ID
,
2144 .setup
= pnw_serial_setup
,
2147 .vendor
= PCI_VENDOR_ID_INTEL
,
2148 .device
= PCI_DEVICE_ID_INTEL_TNG_UART
,
2149 .subvendor
= PCI_ANY_ID
,
2150 .subdevice
= PCI_ANY_ID
,
2151 .setup
= tng_serial_setup
,
2154 .vendor
= PCI_VENDOR_ID_INTEL
,
2155 .device
= PCI_DEVICE_ID_INTEL_BSW_UART1
,
2156 .subvendor
= PCI_ANY_ID
,
2157 .subdevice
= PCI_ANY_ID
,
2158 .setup
= byt_serial_setup
,
2161 .vendor
= PCI_VENDOR_ID_INTEL
,
2162 .device
= PCI_DEVICE_ID_INTEL_BSW_UART2
,
2163 .subvendor
= PCI_ANY_ID
,
2164 .subdevice
= PCI_ANY_ID
,
2165 .setup
= byt_serial_setup
,
2171 .vendor
= PCI_VENDOR_ID_ITE
,
2172 .device
= PCI_DEVICE_ID_ITE_8872
,
2173 .subvendor
= PCI_ANY_ID
,
2174 .subdevice
= PCI_ANY_ID
,
2175 .init
= pci_ite887x_init
,
2176 .setup
= pci_default_setup
,
2177 .exit
= pci_ite887x_exit
,
2180 * National Instruments
2183 .vendor
= PCI_VENDOR_ID_NI
,
2184 .device
= PCI_DEVICE_ID_NI_PCI23216
,
2185 .subvendor
= PCI_ANY_ID
,
2186 .subdevice
= PCI_ANY_ID
,
2187 .init
= pci_ni8420_init
,
2188 .setup
= pci_default_setup
,
2189 .exit
= pci_ni8420_exit
,
2192 .vendor
= PCI_VENDOR_ID_NI
,
2193 .device
= PCI_DEVICE_ID_NI_PCI2328
,
2194 .subvendor
= PCI_ANY_ID
,
2195 .subdevice
= PCI_ANY_ID
,
2196 .init
= pci_ni8420_init
,
2197 .setup
= pci_default_setup
,
2198 .exit
= pci_ni8420_exit
,
2201 .vendor
= PCI_VENDOR_ID_NI
,
2202 .device
= PCI_DEVICE_ID_NI_PCI2324
,
2203 .subvendor
= PCI_ANY_ID
,
2204 .subdevice
= PCI_ANY_ID
,
2205 .init
= pci_ni8420_init
,
2206 .setup
= pci_default_setup
,
2207 .exit
= pci_ni8420_exit
,
2210 .vendor
= PCI_VENDOR_ID_NI
,
2211 .device
= PCI_DEVICE_ID_NI_PCI2322
,
2212 .subvendor
= PCI_ANY_ID
,
2213 .subdevice
= PCI_ANY_ID
,
2214 .init
= pci_ni8420_init
,
2215 .setup
= pci_default_setup
,
2216 .exit
= pci_ni8420_exit
,
2219 .vendor
= PCI_VENDOR_ID_NI
,
2220 .device
= PCI_DEVICE_ID_NI_PCI2324I
,
2221 .subvendor
= PCI_ANY_ID
,
2222 .subdevice
= PCI_ANY_ID
,
2223 .init
= pci_ni8420_init
,
2224 .setup
= pci_default_setup
,
2225 .exit
= pci_ni8420_exit
,
2228 .vendor
= PCI_VENDOR_ID_NI
,
2229 .device
= PCI_DEVICE_ID_NI_PCI2322I
,
2230 .subvendor
= PCI_ANY_ID
,
2231 .subdevice
= PCI_ANY_ID
,
2232 .init
= pci_ni8420_init
,
2233 .setup
= pci_default_setup
,
2234 .exit
= pci_ni8420_exit
,
2237 .vendor
= PCI_VENDOR_ID_NI
,
2238 .device
= PCI_DEVICE_ID_NI_PXI8420_23216
,
2239 .subvendor
= PCI_ANY_ID
,
2240 .subdevice
= PCI_ANY_ID
,
2241 .init
= pci_ni8420_init
,
2242 .setup
= pci_default_setup
,
2243 .exit
= pci_ni8420_exit
,
2246 .vendor
= PCI_VENDOR_ID_NI
,
2247 .device
= PCI_DEVICE_ID_NI_PXI8420_2328
,
2248 .subvendor
= PCI_ANY_ID
,
2249 .subdevice
= PCI_ANY_ID
,
2250 .init
= pci_ni8420_init
,
2251 .setup
= pci_default_setup
,
2252 .exit
= pci_ni8420_exit
,
2255 .vendor
= PCI_VENDOR_ID_NI
,
2256 .device
= PCI_DEVICE_ID_NI_PXI8420_2324
,
2257 .subvendor
= PCI_ANY_ID
,
2258 .subdevice
= PCI_ANY_ID
,
2259 .init
= pci_ni8420_init
,
2260 .setup
= pci_default_setup
,
2261 .exit
= pci_ni8420_exit
,
2264 .vendor
= PCI_VENDOR_ID_NI
,
2265 .device
= PCI_DEVICE_ID_NI_PXI8420_2322
,
2266 .subvendor
= PCI_ANY_ID
,
2267 .subdevice
= PCI_ANY_ID
,
2268 .init
= pci_ni8420_init
,
2269 .setup
= pci_default_setup
,
2270 .exit
= pci_ni8420_exit
,
2273 .vendor
= PCI_VENDOR_ID_NI
,
2274 .device
= PCI_DEVICE_ID_NI_PXI8422_2324
,
2275 .subvendor
= PCI_ANY_ID
,
2276 .subdevice
= PCI_ANY_ID
,
2277 .init
= pci_ni8420_init
,
2278 .setup
= pci_default_setup
,
2279 .exit
= pci_ni8420_exit
,
2282 .vendor
= PCI_VENDOR_ID_NI
,
2283 .device
= PCI_DEVICE_ID_NI_PXI8422_2322
,
2284 .subvendor
= PCI_ANY_ID
,
2285 .subdevice
= PCI_ANY_ID
,
2286 .init
= pci_ni8420_init
,
2287 .setup
= pci_default_setup
,
2288 .exit
= pci_ni8420_exit
,
2291 .vendor
= PCI_VENDOR_ID_NI
,
2292 .device
= PCI_ANY_ID
,
2293 .subvendor
= PCI_ANY_ID
,
2294 .subdevice
= PCI_ANY_ID
,
2295 .init
= pci_ni8430_init
,
2296 .setup
= pci_ni8430_setup
,
2297 .exit
= pci_ni8430_exit
,
2301 .vendor
= PCI_VENDOR_ID_QUATECH
,
2302 .device
= PCI_ANY_ID
,
2303 .subvendor
= PCI_ANY_ID
,
2304 .subdevice
= PCI_ANY_ID
,
2305 .init
= pci_quatech_init
,
2306 .setup
= pci_quatech_setup
,
2307 .exit
= pci_quatech_exit
,
2313 .vendor
= PCI_VENDOR_ID_PANACOM
,
2314 .device
= PCI_DEVICE_ID_PANACOM_QUADMODEM
,
2315 .subvendor
= PCI_ANY_ID
,
2316 .subdevice
= PCI_ANY_ID
,
2317 .init
= pci_plx9050_init
,
2318 .setup
= pci_default_setup
,
2319 .exit
= pci_plx9050_exit
,
2322 .vendor
= PCI_VENDOR_ID_PANACOM
,
2323 .device
= PCI_DEVICE_ID_PANACOM_DUALMODEM
,
2324 .subvendor
= PCI_ANY_ID
,
2325 .subdevice
= PCI_ANY_ID
,
2326 .init
= pci_plx9050_init
,
2327 .setup
= pci_default_setup
,
2328 .exit
= pci_plx9050_exit
,
2336 .subvendor
= PCI_ANY_ID
,
2337 .subdevice
= PCI_ANY_ID
,
2338 .setup
= pci_pericom_setup
,
2343 .subvendor
= PCI_ANY_ID
,
2344 .subdevice
= PCI_ANY_ID
,
2345 .setup
= pci_pericom_setup
,
2350 .subvendor
= PCI_ANY_ID
,
2351 .subdevice
= PCI_ANY_ID
,
2352 .setup
= pci_pericom_setup
,
2359 .vendor
= PCI_VENDOR_ID_PLX
,
2360 .device
= PCI_DEVICE_ID_PLX_9050
,
2361 .subvendor
= PCI_SUBVENDOR_ID_EXSYS
,
2362 .subdevice
= PCI_SUBDEVICE_ID_EXSYS_4055
,
2363 .init
= pci_plx9050_init
,
2364 .setup
= pci_default_setup
,
2365 .exit
= pci_plx9050_exit
,
2368 .vendor
= PCI_VENDOR_ID_PLX
,
2369 .device
= PCI_DEVICE_ID_PLX_9050
,
2370 .subvendor
= PCI_SUBVENDOR_ID_KEYSPAN
,
2371 .subdevice
= PCI_SUBDEVICE_ID_KEYSPAN_SX2
,
2372 .init
= pci_plx9050_init
,
2373 .setup
= pci_default_setup
,
2374 .exit
= pci_plx9050_exit
,
2377 .vendor
= PCI_VENDOR_ID_PLX
,
2378 .device
= PCI_DEVICE_ID_PLX_ROMULUS
,
2379 .subvendor
= PCI_VENDOR_ID_PLX
,
2380 .subdevice
= PCI_DEVICE_ID_PLX_ROMULUS
,
2381 .init
= pci_plx9050_init
,
2382 .setup
= pci_default_setup
,
2383 .exit
= pci_plx9050_exit
,
2386 * SBS Technologies, Inc., PMC-OCTALPRO 232
2389 .vendor
= PCI_VENDOR_ID_SBSMODULARIO
,
2390 .device
= PCI_DEVICE_ID_OCTPRO
,
2391 .subvendor
= PCI_SUBVENDOR_ID_SBSMODULARIO
,
2392 .subdevice
= PCI_SUBDEVICE_ID_OCTPRO232
,
2398 * SBS Technologies, Inc., PMC-OCTALPRO 422
2401 .vendor
= PCI_VENDOR_ID_SBSMODULARIO
,
2402 .device
= PCI_DEVICE_ID_OCTPRO
,
2403 .subvendor
= PCI_SUBVENDOR_ID_SBSMODULARIO
,
2404 .subdevice
= PCI_SUBDEVICE_ID_OCTPRO422
,
2410 * SBS Technologies, Inc., P-Octal 232
2413 .vendor
= PCI_VENDOR_ID_SBSMODULARIO
,
2414 .device
= PCI_DEVICE_ID_OCTPRO
,
2415 .subvendor
= PCI_SUBVENDOR_ID_SBSMODULARIO
,
2416 .subdevice
= PCI_SUBDEVICE_ID_POCTAL232
,
2422 * SBS Technologies, Inc., P-Octal 422
2425 .vendor
= PCI_VENDOR_ID_SBSMODULARIO
,
2426 .device
= PCI_DEVICE_ID_OCTPRO
,
2427 .subvendor
= PCI_SUBVENDOR_ID_SBSMODULARIO
,
2428 .subdevice
= PCI_SUBDEVICE_ID_POCTAL422
,
2434 * SIIG cards - these may be called via parport_serial
2437 .vendor
= PCI_VENDOR_ID_SIIG
,
2438 .device
= PCI_ANY_ID
,
2439 .subvendor
= PCI_ANY_ID
,
2440 .subdevice
= PCI_ANY_ID
,
2441 .init
= pci_siig_init
,
2442 .setup
= pci_siig_setup
,
2448 .vendor
= PCI_VENDOR_ID_TITAN
,
2449 .device
= PCI_DEVICE_ID_TITAN_400L
,
2450 .subvendor
= PCI_ANY_ID
,
2451 .subdevice
= PCI_ANY_ID
,
2452 .setup
= titan_400l_800l_setup
,
2455 .vendor
= PCI_VENDOR_ID_TITAN
,
2456 .device
= PCI_DEVICE_ID_TITAN_800L
,
2457 .subvendor
= PCI_ANY_ID
,
2458 .subdevice
= PCI_ANY_ID
,
2459 .setup
= titan_400l_800l_setup
,
2465 .vendor
= PCI_VENDOR_ID_TIMEDIA
,
2466 .device
= PCI_DEVICE_ID_TIMEDIA_1889
,
2467 .subvendor
= PCI_VENDOR_ID_TIMEDIA
,
2468 .subdevice
= PCI_ANY_ID
,
2469 .probe
= pci_timedia_probe
,
2470 .init
= pci_timedia_init
,
2471 .setup
= pci_timedia_setup
,
2474 .vendor
= PCI_VENDOR_ID_TIMEDIA
,
2475 .device
= PCI_ANY_ID
,
2476 .subvendor
= PCI_ANY_ID
,
2477 .subdevice
= PCI_ANY_ID
,
2478 .setup
= pci_timedia_setup
,
2481 * SUNIX (Timedia) cards
2482 * Do not "probe" for these cards as there is at least one combination
2483 * card that should be handled by parport_pc that doesn't match the
2484 * rule in pci_timedia_probe.
2485 * It is part number is MIO5079A but its subdevice ID is 0x0102.
2486 * There are some boards with part number SER5037AL that report
2487 * subdevice ID 0x0002.
2490 .vendor
= PCI_VENDOR_ID_SUNIX
,
2491 .device
= PCI_DEVICE_ID_SUNIX_1999
,
2492 .subvendor
= PCI_VENDOR_ID_SUNIX
,
2493 .subdevice
= PCI_ANY_ID
,
2494 .init
= pci_timedia_init
,
2495 .setup
= pci_timedia_setup
,
2501 .vendor
= PCI_VENDOR_ID_EXAR
,
2502 .device
= PCI_DEVICE_ID_EXAR_XR17C152
,
2503 .subvendor
= PCI_ANY_ID
,
2504 .subdevice
= PCI_ANY_ID
,
2505 .setup
= pci_xr17c154_setup
,
2508 .vendor
= PCI_VENDOR_ID_EXAR
,
2509 .device
= PCI_DEVICE_ID_EXAR_XR17C154
,
2510 .subvendor
= PCI_ANY_ID
,
2511 .subdevice
= PCI_ANY_ID
,
2512 .setup
= pci_xr17c154_setup
,
2515 .vendor
= PCI_VENDOR_ID_EXAR
,
2516 .device
= PCI_DEVICE_ID_EXAR_XR17C158
,
2517 .subvendor
= PCI_ANY_ID
,
2518 .subdevice
= PCI_ANY_ID
,
2519 .setup
= pci_xr17c154_setup
,
2522 .vendor
= PCI_VENDOR_ID_EXAR
,
2523 .device
= PCI_DEVICE_ID_EXAR_XR17V352
,
2524 .subvendor
= PCI_ANY_ID
,
2525 .subdevice
= PCI_ANY_ID
,
2526 .setup
= pci_xr17v35x_setup
,
2529 .vendor
= PCI_VENDOR_ID_EXAR
,
2530 .device
= PCI_DEVICE_ID_EXAR_XR17V354
,
2531 .subvendor
= PCI_ANY_ID
,
2532 .subdevice
= PCI_ANY_ID
,
2533 .setup
= pci_xr17v35x_setup
,
2536 .vendor
= PCI_VENDOR_ID_EXAR
,
2537 .device
= PCI_DEVICE_ID_EXAR_XR17V358
,
2538 .subvendor
= PCI_ANY_ID
,
2539 .subdevice
= PCI_ANY_ID
,
2540 .setup
= pci_xr17v35x_setup
,
2543 .vendor
= PCI_VENDOR_ID_EXAR
,
2544 .device
= PCI_DEVICE_ID_EXAR_XR17V4358
,
2545 .subvendor
= PCI_ANY_ID
,
2546 .subdevice
= PCI_ANY_ID
,
2547 .setup
= pci_xr17v35x_setup
,
2550 .vendor
= PCI_VENDOR_ID_EXAR
,
2551 .device
= PCI_DEVICE_ID_EXAR_XR17V8358
,
2552 .subvendor
= PCI_ANY_ID
,
2553 .subdevice
= PCI_ANY_ID
,
2554 .setup
= pci_xr17v35x_setup
,
2560 .vendor
= PCI_VENDOR_ID_XIRCOM
,
2561 .device
= PCI_DEVICE_ID_XIRCOM_X3201_MDM
,
2562 .subvendor
= PCI_ANY_ID
,
2563 .subdevice
= PCI_ANY_ID
,
2564 .init
= pci_xircom_init
,
2565 .setup
= pci_default_setup
,
2568 * Netmos cards - these may be called via parport_serial
2571 .vendor
= PCI_VENDOR_ID_NETMOS
,
2572 .device
= PCI_ANY_ID
,
2573 .subvendor
= PCI_ANY_ID
,
2574 .subdevice
= PCI_ANY_ID
,
2575 .init
= pci_netmos_init
,
2576 .setup
= pci_netmos_9900_setup
,
2579 * EndRun Technologies
2582 .vendor
= PCI_VENDOR_ID_ENDRUN
,
2583 .device
= PCI_ANY_ID
,
2584 .subvendor
= PCI_ANY_ID
,
2585 .subdevice
= PCI_ANY_ID
,
2586 .init
= pci_endrun_init
,
2587 .setup
= pci_default_setup
,
2590 * For Oxford Semiconductor Tornado based devices
2593 .vendor
= PCI_VENDOR_ID_OXSEMI
,
2594 .device
= PCI_ANY_ID
,
2595 .subvendor
= PCI_ANY_ID
,
2596 .subdevice
= PCI_ANY_ID
,
2597 .init
= pci_oxsemi_tornado_init
,
2598 .setup
= pci_default_setup
,
2601 .vendor
= PCI_VENDOR_ID_MAINPINE
,
2602 .device
= PCI_ANY_ID
,
2603 .subvendor
= PCI_ANY_ID
,
2604 .subdevice
= PCI_ANY_ID
,
2605 .init
= pci_oxsemi_tornado_init
,
2606 .setup
= pci_default_setup
,
2609 .vendor
= PCI_VENDOR_ID_DIGI
,
2610 .device
= PCIE_DEVICE_ID_NEO_2_OX_IBM
,
2611 .subvendor
= PCI_SUBVENDOR_ID_IBM
,
2612 .subdevice
= PCI_ANY_ID
,
2613 .init
= pci_oxsemi_tornado_init
,
2614 .setup
= pci_default_setup
,
2617 .vendor
= PCI_VENDOR_ID_INTEL
,
2619 .subvendor
= PCI_ANY_ID
,
2620 .subdevice
= PCI_ANY_ID
,
2621 .init
= pci_eg20t_init
,
2622 .setup
= pci_default_setup
,
2625 .vendor
= PCI_VENDOR_ID_INTEL
,
2627 .subvendor
= PCI_ANY_ID
,
2628 .subdevice
= PCI_ANY_ID
,
2629 .init
= pci_eg20t_init
,
2630 .setup
= pci_default_setup
,
2633 .vendor
= PCI_VENDOR_ID_INTEL
,
2635 .subvendor
= PCI_ANY_ID
,
2636 .subdevice
= PCI_ANY_ID
,
2637 .init
= pci_eg20t_init
,
2638 .setup
= pci_default_setup
,
2641 .vendor
= PCI_VENDOR_ID_INTEL
,
2643 .subvendor
= PCI_ANY_ID
,
2644 .subdevice
= PCI_ANY_ID
,
2645 .init
= pci_eg20t_init
,
2646 .setup
= pci_default_setup
,
2651 .subvendor
= PCI_ANY_ID
,
2652 .subdevice
= PCI_ANY_ID
,
2653 .init
= pci_eg20t_init
,
2654 .setup
= pci_default_setup
,
2659 .subvendor
= PCI_ANY_ID
,
2660 .subdevice
= PCI_ANY_ID
,
2661 .init
= pci_eg20t_init
,
2662 .setup
= pci_default_setup
,
2667 .subvendor
= PCI_ANY_ID
,
2668 .subdevice
= PCI_ANY_ID
,
2669 .init
= pci_eg20t_init
,
2670 .setup
= pci_default_setup
,
2675 .subvendor
= PCI_ANY_ID
,
2676 .subdevice
= PCI_ANY_ID
,
2677 .init
= pci_eg20t_init
,
2678 .setup
= pci_default_setup
,
2683 .subvendor
= PCI_ANY_ID
,
2684 .subdevice
= PCI_ANY_ID
,
2685 .init
= pci_eg20t_init
,
2686 .setup
= pci_default_setup
,
2689 * Cronyx Omega PCI (PLX-chip based)
2692 .vendor
= PCI_VENDOR_ID_PLX
,
2693 .device
= PCI_DEVICE_ID_PLX_CRONYX_OMEGA
,
2694 .subvendor
= PCI_ANY_ID
,
2695 .subdevice
= PCI_ANY_ID
,
2696 .setup
= pci_omegapci_setup
,
2698 /* WCH CH353 1S1P card (16550 clone) */
2700 .vendor
= PCI_VENDOR_ID_WCH
,
2701 .device
= PCI_DEVICE_ID_WCH_CH353_1S1P
,
2702 .subvendor
= PCI_ANY_ID
,
2703 .subdevice
= PCI_ANY_ID
,
2704 .setup
= pci_wch_ch353_setup
,
2706 /* WCH CH353 2S1P card (16550 clone) */
2708 .vendor
= PCI_VENDOR_ID_WCH
,
2709 .device
= PCI_DEVICE_ID_WCH_CH353_2S1P
,
2710 .subvendor
= PCI_ANY_ID
,
2711 .subdevice
= PCI_ANY_ID
,
2712 .setup
= pci_wch_ch353_setup
,
2714 /* WCH CH353 4S card (16550 clone) */
2716 .vendor
= PCI_VENDOR_ID_WCH
,
2717 .device
= PCI_DEVICE_ID_WCH_CH353_4S
,
2718 .subvendor
= PCI_ANY_ID
,
2719 .subdevice
= PCI_ANY_ID
,
2720 .setup
= pci_wch_ch353_setup
,
2722 /* WCH CH353 2S1PF card (16550 clone) */
2724 .vendor
= PCI_VENDOR_ID_WCH
,
2725 .device
= PCI_DEVICE_ID_WCH_CH353_2S1PF
,
2726 .subvendor
= PCI_ANY_ID
,
2727 .subdevice
= PCI_ANY_ID
,
2728 .setup
= pci_wch_ch353_setup
,
2730 /* WCH CH352 2S card (16550 clone) */
2732 .vendor
= PCI_VENDOR_ID_WCH
,
2733 .device
= PCI_DEVICE_ID_WCH_CH352_2S
,
2734 .subvendor
= PCI_ANY_ID
,
2735 .subdevice
= PCI_ANY_ID
,
2736 .setup
= pci_wch_ch353_setup
,
2738 /* WCH CH382 2S1P card (16850 clone) */
2740 .vendor
= PCIE_VENDOR_ID_WCH
,
2741 .device
= PCIE_DEVICE_ID_WCH_CH382_2S1P
,
2742 .subvendor
= PCI_ANY_ID
,
2743 .subdevice
= PCI_ANY_ID
,
2744 .setup
= pci_wch_ch38x_setup
,
2746 /* WCH CH384 4S card (16850 clone) */
2748 .vendor
= PCIE_VENDOR_ID_WCH
,
2749 .device
= PCIE_DEVICE_ID_WCH_CH384_4S
,
2750 .subvendor
= PCI_ANY_ID
,
2751 .subdevice
= PCI_ANY_ID
,
2752 .setup
= pci_wch_ch38x_setup
,
2755 * ASIX devices with FIFO bug
2758 .vendor
= PCI_VENDOR_ID_ASIX
,
2759 .device
= PCI_ANY_ID
,
2760 .subvendor
= PCI_ANY_ID
,
2761 .subdevice
= PCI_ANY_ID
,
2762 .setup
= pci_asix_setup
,
2765 * Commtech, Inc. Fastcom adapters
2769 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2770 .device
= PCI_DEVICE_ID_COMMTECH_4222PCI335
,
2771 .subvendor
= PCI_ANY_ID
,
2772 .subdevice
= PCI_ANY_ID
,
2773 .setup
= pci_fastcom335_setup
,
2776 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2777 .device
= PCI_DEVICE_ID_COMMTECH_4224PCI335
,
2778 .subvendor
= PCI_ANY_ID
,
2779 .subdevice
= PCI_ANY_ID
,
2780 .setup
= pci_fastcom335_setup
,
2783 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2784 .device
= PCI_DEVICE_ID_COMMTECH_2324PCI335
,
2785 .subvendor
= PCI_ANY_ID
,
2786 .subdevice
= PCI_ANY_ID
,
2787 .setup
= pci_fastcom335_setup
,
2790 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2791 .device
= PCI_DEVICE_ID_COMMTECH_2328PCI335
,
2792 .subvendor
= PCI_ANY_ID
,
2793 .subdevice
= PCI_ANY_ID
,
2794 .setup
= pci_fastcom335_setup
,
2797 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2798 .device
= PCI_DEVICE_ID_COMMTECH_4222PCIE
,
2799 .subvendor
= PCI_ANY_ID
,
2800 .subdevice
= PCI_ANY_ID
,
2801 .setup
= pci_xr17v35x_setup
,
2804 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2805 .device
= PCI_DEVICE_ID_COMMTECH_4224PCIE
,
2806 .subvendor
= PCI_ANY_ID
,
2807 .subdevice
= PCI_ANY_ID
,
2808 .setup
= pci_xr17v35x_setup
,
2811 .vendor
= PCI_VENDOR_ID_COMMTECH
,
2812 .device
= PCI_DEVICE_ID_COMMTECH_4228PCIE
,
2813 .subvendor
= PCI_ANY_ID
,
2814 .subdevice
= PCI_ANY_ID
,
2815 .setup
= pci_xr17v35x_setup
,
2818 * Broadcom TruManage (NetXtreme)
2821 .vendor
= PCI_VENDOR_ID_BROADCOM
,
2822 .device
= PCI_DEVICE_ID_BROADCOM_TRUMANAGE
,
2823 .subvendor
= PCI_ANY_ID
,
2824 .subdevice
= PCI_ANY_ID
,
2825 .setup
= pci_brcm_trumanage_setup
,
2830 .subvendor
= PCI_ANY_ID
,
2831 .subdevice
= PCI_ANY_ID
,
2832 .setup
= pci_fintek_setup
,
2833 .init
= pci_fintek_init
,
2838 .subvendor
= PCI_ANY_ID
,
2839 .subdevice
= PCI_ANY_ID
,
2840 .setup
= pci_fintek_setup
,
2841 .init
= pci_fintek_init
,
2846 .subvendor
= PCI_ANY_ID
,
2847 .subdevice
= PCI_ANY_ID
,
2848 .setup
= pci_fintek_setup
,
2849 .init
= pci_fintek_init
,
2853 * Default "match everything" terminator entry
2856 .vendor
= PCI_ANY_ID
,
2857 .device
= PCI_ANY_ID
,
2858 .subvendor
= PCI_ANY_ID
,
2859 .subdevice
= PCI_ANY_ID
,
2860 .setup
= pci_default_setup
,
2864 static inline int quirk_id_matches(u32 quirk_id
, u32 dev_id
)
2866 return quirk_id
== PCI_ANY_ID
|| quirk_id
== dev_id
;
2869 static struct pci_serial_quirk
*find_quirk(struct pci_dev
*dev
)
2871 struct pci_serial_quirk
*quirk
;
2873 for (quirk
= pci_serial_quirks
; ; quirk
++)
2874 if (quirk_id_matches(quirk
->vendor
, dev
->vendor
) &&
2875 quirk_id_matches(quirk
->device
, dev
->device
) &&
2876 quirk_id_matches(quirk
->subvendor
, dev
->subsystem_vendor
) &&
2877 quirk_id_matches(quirk
->subdevice
, dev
->subsystem_device
))
2882 static inline int get_pci_irq(struct pci_dev
*dev
,
2883 const struct pciserial_board
*board
)
2885 if (board
->flags
& FL_NOIRQ
)
2892 * This is the configuration table for all of the PCI serial boards
2893 * which we support. It is directly indexed by the pci_board_num_t enum
2894 * value, which is encoded in the pci_device_id PCI probe table's
2895 * driver_data member.
2897 * The makeup of these names are:
2898 * pbn_bn{_bt}_n_baud{_offsetinhex}
2900 * bn = PCI BAR number
2901 * bt = Index using PCI BARs
2902 * n = number of serial ports
2904 * offsetinhex = offset for each sequential port (in hex)
2906 * This table is sorted by (in order): bn, bt, baud, offsetindex, n.
2908 * Please note: in theory if n = 1, _bt infix should make no difference.
2909 * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200
2911 enum pci_board_num_t
{
2928 pbn_b0_2_1152000_200
,
2929 pbn_b0_4_1152000_200
,
2930 pbn_b0_8_1152000_200
,
2935 pbn_b0_2_1843200_200
,
2936 pbn_b0_4_1843200_200
,
2937 pbn_b0_8_1843200_200
,
3011 * Board-specific versions.
3017 pbn_endrun_2_4000000
,
3019 pbn_oxsemi_1_4000000
,
3020 pbn_oxsemi_2_4000000
,
3021 pbn_oxsemi_4_4000000
,
3022 pbn_oxsemi_8_4000000
,
3037 pbn_exar_ibm_saturn
,
3043 pbn_ADDIDATA_PCIe_1_3906250
,
3044 pbn_ADDIDATA_PCIe_2_3906250
,
3045 pbn_ADDIDATA_PCIe_4_3906250
,
3046 pbn_ADDIDATA_PCIe_8_3906250
,
3047 pbn_ce4100_1_115200
,
3053 pbn_NETMOS9900_2s_115200
,
3062 * uart_offset - the space between channels
3063 * reg_shift - describes how the UART registers are mapped
3064 * to PCI memory by the card.
3065 * For example IER register on SBS, Inc. PMC-OctPro is located at
3066 * offset 0x10 from the UART base, while UART_IER is defined as 1
3067 * in include/linux/serial_reg.h,
3068 * see first lines of serial_in() and serial_out() in 8250.c
3071 static struct pciserial_board pci_boards
[] = {
3075 .base_baud
= 115200,
3078 [pbn_b0_1_115200
] = {
3081 .base_baud
= 115200,
3084 [pbn_b0_2_115200
] = {
3087 .base_baud
= 115200,
3090 [pbn_b0_4_115200
] = {
3093 .base_baud
= 115200,
3096 [pbn_b0_5_115200
] = {
3099 .base_baud
= 115200,
3102 [pbn_b0_8_115200
] = {
3105 .base_baud
= 115200,
3108 [pbn_b0_1_921600
] = {
3111 .base_baud
= 921600,
3114 [pbn_b0_2_921600
] = {
3117 .base_baud
= 921600,
3120 [pbn_b0_4_921600
] = {
3123 .base_baud
= 921600,
3127 [pbn_b0_2_1130000
] = {
3130 .base_baud
= 1130000,
3134 [pbn_b0_4_1152000
] = {
3137 .base_baud
= 1152000,
3141 [pbn_b0_2_1152000_200
] = {
3144 .base_baud
= 1152000,
3145 .uart_offset
= 0x200,
3148 [pbn_b0_4_1152000_200
] = {
3151 .base_baud
= 1152000,
3152 .uart_offset
= 0x200,
3155 [pbn_b0_8_1152000_200
] = {
3158 .base_baud
= 1152000,
3159 .uart_offset
= 0x200,
3162 [pbn_b0_2_1843200
] = {
3165 .base_baud
= 1843200,
3168 [pbn_b0_4_1843200
] = {
3171 .base_baud
= 1843200,
3175 [pbn_b0_2_1843200_200
] = {
3178 .base_baud
= 1843200,
3179 .uart_offset
= 0x200,
3181 [pbn_b0_4_1843200_200
] = {
3184 .base_baud
= 1843200,
3185 .uart_offset
= 0x200,
3187 [pbn_b0_8_1843200_200
] = {
3190 .base_baud
= 1843200,
3191 .uart_offset
= 0x200,
3193 [pbn_b0_1_4000000
] = {
3196 .base_baud
= 4000000,
3200 [pbn_b0_bt_1_115200
] = {
3201 .flags
= FL_BASE0
|FL_BASE_BARS
,
3203 .base_baud
= 115200,
3206 [pbn_b0_bt_2_115200
] = {
3207 .flags
= FL_BASE0
|FL_BASE_BARS
,
3209 .base_baud
= 115200,
3212 [pbn_b0_bt_4_115200
] = {
3213 .flags
= FL_BASE0
|FL_BASE_BARS
,
3215 .base_baud
= 115200,
3218 [pbn_b0_bt_8_115200
] = {
3219 .flags
= FL_BASE0
|FL_BASE_BARS
,
3221 .base_baud
= 115200,
3225 [pbn_b0_bt_1_460800
] = {
3226 .flags
= FL_BASE0
|FL_BASE_BARS
,
3228 .base_baud
= 460800,
3231 [pbn_b0_bt_2_460800
] = {
3232 .flags
= FL_BASE0
|FL_BASE_BARS
,
3234 .base_baud
= 460800,
3237 [pbn_b0_bt_4_460800
] = {
3238 .flags
= FL_BASE0
|FL_BASE_BARS
,
3240 .base_baud
= 460800,
3244 [pbn_b0_bt_1_921600
] = {
3245 .flags
= FL_BASE0
|FL_BASE_BARS
,
3247 .base_baud
= 921600,
3250 [pbn_b0_bt_2_921600
] = {
3251 .flags
= FL_BASE0
|FL_BASE_BARS
,
3253 .base_baud
= 921600,
3256 [pbn_b0_bt_4_921600
] = {
3257 .flags
= FL_BASE0
|FL_BASE_BARS
,
3259 .base_baud
= 921600,
3262 [pbn_b0_bt_8_921600
] = {
3263 .flags
= FL_BASE0
|FL_BASE_BARS
,
3265 .base_baud
= 921600,
3269 [pbn_b1_1_115200
] = {
3272 .base_baud
= 115200,
3275 [pbn_b1_2_115200
] = {
3278 .base_baud
= 115200,
3281 [pbn_b1_4_115200
] = {
3284 .base_baud
= 115200,
3287 [pbn_b1_8_115200
] = {
3290 .base_baud
= 115200,
3293 [pbn_b1_16_115200
] = {
3296 .base_baud
= 115200,
3300 [pbn_b1_1_921600
] = {
3303 .base_baud
= 921600,
3306 [pbn_b1_2_921600
] = {
3309 .base_baud
= 921600,
3312 [pbn_b1_4_921600
] = {
3315 .base_baud
= 921600,
3318 [pbn_b1_8_921600
] = {
3321 .base_baud
= 921600,
3324 [pbn_b1_2_1250000
] = {
3327 .base_baud
= 1250000,
3331 [pbn_b1_bt_1_115200
] = {
3332 .flags
= FL_BASE1
|FL_BASE_BARS
,
3334 .base_baud
= 115200,
3337 [pbn_b1_bt_2_115200
] = {
3338 .flags
= FL_BASE1
|FL_BASE_BARS
,
3340 .base_baud
= 115200,
3343 [pbn_b1_bt_4_115200
] = {
3344 .flags
= FL_BASE1
|FL_BASE_BARS
,
3346 .base_baud
= 115200,
3350 [pbn_b1_bt_2_921600
] = {
3351 .flags
= FL_BASE1
|FL_BASE_BARS
,
3353 .base_baud
= 921600,
3357 [pbn_b1_1_1382400
] = {
3360 .base_baud
= 1382400,
3363 [pbn_b1_2_1382400
] = {
3366 .base_baud
= 1382400,
3369 [pbn_b1_4_1382400
] = {
3372 .base_baud
= 1382400,
3375 [pbn_b1_8_1382400
] = {
3378 .base_baud
= 1382400,
3382 [pbn_b2_1_115200
] = {
3385 .base_baud
= 115200,
3388 [pbn_b2_2_115200
] = {
3391 .base_baud
= 115200,
3394 [pbn_b2_4_115200
] = {
3397 .base_baud
= 115200,
3400 [pbn_b2_8_115200
] = {
3403 .base_baud
= 115200,
3407 [pbn_b2_1_460800
] = {
3410 .base_baud
= 460800,
3413 [pbn_b2_4_460800
] = {
3416 .base_baud
= 460800,
3419 [pbn_b2_8_460800
] = {
3422 .base_baud
= 460800,
3425 [pbn_b2_16_460800
] = {
3428 .base_baud
= 460800,
3432 [pbn_b2_1_921600
] = {
3435 .base_baud
= 921600,
3438 [pbn_b2_4_921600
] = {
3441 .base_baud
= 921600,
3444 [pbn_b2_8_921600
] = {
3447 .base_baud
= 921600,
3451 [pbn_b2_8_1152000
] = {
3454 .base_baud
= 1152000,
3458 [pbn_b2_bt_1_115200
] = {
3459 .flags
= FL_BASE2
|FL_BASE_BARS
,
3461 .base_baud
= 115200,
3464 [pbn_b2_bt_2_115200
] = {
3465 .flags
= FL_BASE2
|FL_BASE_BARS
,
3467 .base_baud
= 115200,
3470 [pbn_b2_bt_4_115200
] = {
3471 .flags
= FL_BASE2
|FL_BASE_BARS
,
3473 .base_baud
= 115200,
3477 [pbn_b2_bt_2_921600
] = {
3478 .flags
= FL_BASE2
|FL_BASE_BARS
,
3480 .base_baud
= 921600,
3483 [pbn_b2_bt_4_921600
] = {
3484 .flags
= FL_BASE2
|FL_BASE_BARS
,
3486 .base_baud
= 921600,
3490 [pbn_b3_2_115200
] = {
3493 .base_baud
= 115200,
3496 [pbn_b3_4_115200
] = {
3499 .base_baud
= 115200,
3502 [pbn_b3_8_115200
] = {
3505 .base_baud
= 115200,
3509 [pbn_b4_bt_2_921600
] = {
3512 .base_baud
= 921600,
3515 [pbn_b4_bt_4_921600
] = {
3518 .base_baud
= 921600,
3521 [pbn_b4_bt_8_921600
] = {
3524 .base_baud
= 921600,
3529 * Entries following this are board-specific.
3538 .base_baud
= 921600,
3539 .uart_offset
= 0x400,
3543 .flags
= FL_BASE2
|FL_BASE_BARS
,
3545 .base_baud
= 921600,
3546 .uart_offset
= 0x400,
3550 .flags
= FL_BASE2
|FL_BASE_BARS
,
3552 .base_baud
= 921600,
3553 .uart_offset
= 0x400,
3557 /* I think this entry is broken - the first_offset looks wrong --rmk */
3558 [pbn_plx_romulus
] = {
3561 .base_baud
= 921600,
3562 .uart_offset
= 8 << 2,
3564 .first_offset
= 0x03,
3568 * EndRun Technologies
3569 * Uses the size of PCI Base region 0 to
3570 * signal now many ports are available
3571 * 2 port 952 Uart support
3573 [pbn_endrun_2_4000000
] = {
3576 .base_baud
= 4000000,
3577 .uart_offset
= 0x200,
3578 .first_offset
= 0x1000,
3582 * This board uses the size of PCI Base region 0 to
3583 * signal now many ports are available
3586 .flags
= FL_BASE0
|FL_REGION_SZ_CAP
,
3588 .base_baud
= 115200,
3591 [pbn_oxsemi_1_4000000
] = {
3594 .base_baud
= 4000000,
3595 .uart_offset
= 0x200,
3596 .first_offset
= 0x1000,
3598 [pbn_oxsemi_2_4000000
] = {
3601 .base_baud
= 4000000,
3602 .uart_offset
= 0x200,
3603 .first_offset
= 0x1000,
3605 [pbn_oxsemi_4_4000000
] = {
3608 .base_baud
= 4000000,
3609 .uart_offset
= 0x200,
3610 .first_offset
= 0x1000,
3612 [pbn_oxsemi_8_4000000
] = {
3615 .base_baud
= 4000000,
3616 .uart_offset
= 0x200,
3617 .first_offset
= 0x1000,
3622 * EKF addition for i960 Boards form EKF with serial port.
3625 [pbn_intel_i960
] = {
3628 .base_baud
= 921600,
3629 .uart_offset
= 8 << 2,
3631 .first_offset
= 0x10000,
3634 .flags
= FL_BASE0
|FL_NOIRQ
,
3636 .base_baud
= 458333,
3639 .first_offset
= 0x20178,
3643 * Computone - uses IOMEM.
3645 [pbn_computone_4
] = {
3648 .base_baud
= 921600,
3649 .uart_offset
= 0x40,
3651 .first_offset
= 0x200,
3653 [pbn_computone_6
] = {
3656 .base_baud
= 921600,
3657 .uart_offset
= 0x40,
3659 .first_offset
= 0x200,
3661 [pbn_computone_8
] = {
3664 .base_baud
= 921600,
3665 .uart_offset
= 0x40,
3667 .first_offset
= 0x200,
3672 .base_baud
= 460800,
3677 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
3678 * Only basic 16550A support.
3679 * XR17C15[24] are not tested, but they should work.
3681 [pbn_exar_XR17C152
] = {
3684 .base_baud
= 921600,
3685 .uart_offset
= 0x200,
3687 [pbn_exar_XR17C154
] = {
3690 .base_baud
= 921600,
3691 .uart_offset
= 0x200,
3693 [pbn_exar_XR17C158
] = {
3696 .base_baud
= 921600,
3697 .uart_offset
= 0x200,
3699 [pbn_exar_XR17V352
] = {
3702 .base_baud
= 7812500,
3703 .uart_offset
= 0x400,
3707 [pbn_exar_XR17V354
] = {
3710 .base_baud
= 7812500,
3711 .uart_offset
= 0x400,
3715 [pbn_exar_XR17V358
] = {
3718 .base_baud
= 7812500,
3719 .uart_offset
= 0x400,
3723 [pbn_exar_XR17V4358
] = {
3726 .base_baud
= 7812500,
3727 .uart_offset
= 0x400,
3731 [pbn_exar_XR17V8358
] = {
3734 .base_baud
= 7812500,
3735 .uart_offset
= 0x400,
3739 [pbn_exar_ibm_saturn
] = {
3742 .base_baud
= 921600,
3743 .uart_offset
= 0x200,
3747 * PA Semi PWRficient PA6T-1682M on-chip UART
3749 [pbn_pasemi_1682M
] = {
3752 .base_baud
= 8333333,
3755 * National Instruments 843x
3760 .base_baud
= 3686400,
3761 .uart_offset
= 0x10,
3762 .first_offset
= 0x800,
3767 .base_baud
= 3686400,
3768 .uart_offset
= 0x10,
3769 .first_offset
= 0x800,
3774 .base_baud
= 3686400,
3775 .uart_offset
= 0x10,
3776 .first_offset
= 0x800,
3781 .base_baud
= 3686400,
3782 .uart_offset
= 0x10,
3783 .first_offset
= 0x800,
3786 * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com>
3788 [pbn_ADDIDATA_PCIe_1_3906250
] = {
3791 .base_baud
= 3906250,
3792 .uart_offset
= 0x200,
3793 .first_offset
= 0x1000,
3795 [pbn_ADDIDATA_PCIe_2_3906250
] = {
3798 .base_baud
= 3906250,
3799 .uart_offset
= 0x200,
3800 .first_offset
= 0x1000,
3802 [pbn_ADDIDATA_PCIe_4_3906250
] = {
3805 .base_baud
= 3906250,
3806 .uart_offset
= 0x200,
3807 .first_offset
= 0x1000,
3809 [pbn_ADDIDATA_PCIe_8_3906250
] = {
3812 .base_baud
= 3906250,
3813 .uart_offset
= 0x200,
3814 .first_offset
= 0x1000,
3816 [pbn_ce4100_1_115200
] = {
3817 .flags
= FL_BASE_BARS
,
3819 .base_baud
= 921600,
3823 * Intel BayTrail HSUART reference clock is 44.2368 MHz at power-on,
3824 * but is overridden by byt_set_termios.
3829 .base_baud
= 2764800,
3830 .uart_offset
= 0x80,
3836 .base_baud
= 115200,
3841 .base_baud
= 1843200,
3846 .base_baud
= 2764800,
3852 .base_baud
= 115200,
3853 .uart_offset
= 0x200,
3855 [pbn_NETMOS9900_2s_115200
] = {
3858 .base_baud
= 115200,
3860 [pbn_brcm_trumanage
] = {
3864 .base_baud
= 115200,
3869 .base_baud
= 115200,
3870 .first_offset
= 0x40,
3875 .base_baud
= 115200,
3876 .first_offset
= 0x40,
3881 .base_baud
= 115200,
3882 .first_offset
= 0x40,
3888 .base_baud
= 115200,
3890 .first_offset
= 0xC0,
3894 static const struct pci_device_id blacklist
[] = {
3896 { PCI_VDEVICE(AL
, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */
3897 { PCI_VDEVICE(MOTOROLA
, 0x3052), }, /* Motorola Si3052-based modem */
3898 { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */
3900 /* multi-io cards handled by parport_serial */
3901 { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */
3902 { PCI_DEVICE(0x4348, 0x5053), }, /* WCH CH353 1S1P */
3903 { PCI_DEVICE(0x1c00, 0x3250), }, /* WCH CH382 2S1P */
3904 { PCI_DEVICE(0x1c00, 0x3470), }, /* WCH CH384 4S */
3908 * Given a complete unknown PCI device, try to use some heuristics to
3909 * guess what the configuration might be, based on the pitiful PCI
3910 * serial specs. Returns 0 on success, 1 on failure.
3913 serial_pci_guess_board(struct pci_dev
*dev
, struct pciserial_board
*board
)
3915 const struct pci_device_id
*bldev
;
3916 int num_iomem
, num_port
, first_port
= -1, i
;
3919 * If it is not a communications device or the programming
3920 * interface is greater than 6, give up.
3922 * (Should we try to make guesses for multiport serial devices
3925 if ((((dev
->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL
) &&
3926 ((dev
->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM
)) ||
3927 (dev
->class & 0xff) > 6)
3931 * Do not access blacklisted devices that are known not to
3932 * feature serial ports or are handled by other modules.
3934 for (bldev
= blacklist
;
3935 bldev
< blacklist
+ ARRAY_SIZE(blacklist
);
3937 if (dev
->vendor
== bldev
->vendor
&&
3938 dev
->device
== bldev
->device
)
3942 num_iomem
= num_port
= 0;
3943 for (i
= 0; i
< PCI_NUM_BAR_RESOURCES
; i
++) {
3944 if (pci_resource_flags(dev
, i
) & IORESOURCE_IO
) {
3946 if (first_port
== -1)
3949 if (pci_resource_flags(dev
, i
) & IORESOURCE_MEM
)
3954 * If there is 1 or 0 iomem regions, and exactly one port,
3955 * use it. We guess the number of ports based on the IO
3958 if (num_iomem
<= 1 && num_port
== 1) {
3959 board
->flags
= first_port
;
3960 board
->num_ports
= pci_resource_len(dev
, first_port
) / 8;
3965 * Now guess if we've got a board which indexes by BARs.
3966 * Each IO BAR should be 8 bytes, and they should follow
3971 for (i
= 0; i
< PCI_NUM_BAR_RESOURCES
; i
++) {
3972 if (pci_resource_flags(dev
, i
) & IORESOURCE_IO
&&
3973 pci_resource_len(dev
, i
) == 8 &&
3974 (first_port
== -1 || (first_port
+ num_port
) == i
)) {
3976 if (first_port
== -1)
3982 board
->flags
= first_port
| FL_BASE_BARS
;
3983 board
->num_ports
= num_port
;
3991 serial_pci_matches(const struct pciserial_board
*board
,
3992 const struct pciserial_board
*guessed
)
3995 board
->num_ports
== guessed
->num_ports
&&
3996 board
->base_baud
== guessed
->base_baud
&&
3997 board
->uart_offset
== guessed
->uart_offset
&&
3998 board
->reg_shift
== guessed
->reg_shift
&&
3999 board
->first_offset
== guessed
->first_offset
;
4002 struct serial_private
*
4003 pciserial_init_ports(struct pci_dev
*dev
, const struct pciserial_board
*board
)
4005 struct uart_8250_port uart
;
4006 struct serial_private
*priv
;
4007 struct pci_serial_quirk
*quirk
;
4008 int rc
, nr_ports
, i
;
4010 nr_ports
= board
->num_ports
;
4013 * Find an init and setup quirks.
4015 quirk
= find_quirk(dev
);
4018 * Run the new-style initialization function.
4019 * The initialization function returns:
4021 * 0 - use board->num_ports
4022 * >0 - number of ports
4025 rc
= quirk
->init(dev
);
4034 priv
= kzalloc(sizeof(struct serial_private
) +
4035 sizeof(unsigned int) * nr_ports
,
4038 priv
= ERR_PTR(-ENOMEM
);
4043 priv
->quirk
= quirk
;
4045 memset(&uart
, 0, sizeof(uart
));
4046 uart
.port
.flags
= UPF_SKIP_TEST
| UPF_BOOT_AUTOCONF
| UPF_SHARE_IRQ
;
4047 uart
.port
.uartclk
= board
->base_baud
* 16;
4048 uart
.port
.irq
= get_pci_irq(dev
, board
);
4049 uart
.port
.dev
= &dev
->dev
;
4051 for (i
= 0; i
< nr_ports
; i
++) {
4052 if (quirk
->setup(priv
, board
, &uart
, i
))
4055 dev_dbg(&dev
->dev
, "Setup PCI port: port %lx, irq %d, type %d\n",
4056 uart
.port
.iobase
, uart
.port
.irq
, uart
.port
.iotype
);
4058 priv
->line
[i
] = serial8250_register_8250_port(&uart
);
4059 if (priv
->line
[i
] < 0) {
4061 "Couldn't register serial port %lx, irq %d, type %d, error %d\n",
4062 uart
.port
.iobase
, uart
.port
.irq
,
4063 uart
.port
.iotype
, priv
->line
[i
]);
4076 EXPORT_SYMBOL_GPL(pciserial_init_ports
);
4078 void pciserial_remove_ports(struct serial_private
*priv
)
4080 struct pci_serial_quirk
*quirk
;
4083 for (i
= 0; i
< priv
->nr
; i
++)
4084 serial8250_unregister_port(priv
->line
[i
]);
4086 for (i
= 0; i
< PCI_NUM_BAR_RESOURCES
; i
++) {
4087 if (priv
->remapped_bar
[i
])
4088 iounmap(priv
->remapped_bar
[i
]);
4089 priv
->remapped_bar
[i
] = NULL
;
4093 * Find the exit quirks.
4095 quirk
= find_quirk(priv
->dev
);
4097 quirk
->exit(priv
->dev
);
4101 EXPORT_SYMBOL_GPL(pciserial_remove_ports
);
4103 void pciserial_suspend_ports(struct serial_private
*priv
)
4107 for (i
= 0; i
< priv
->nr
; i
++)
4108 if (priv
->line
[i
] >= 0)
4109 serial8250_suspend_port(priv
->line
[i
]);
4112 * Ensure that every init quirk is properly torn down
4114 if (priv
->quirk
->exit
)
4115 priv
->quirk
->exit(priv
->dev
);
4117 EXPORT_SYMBOL_GPL(pciserial_suspend_ports
);
4119 void pciserial_resume_ports(struct serial_private
*priv
)
4124 * Ensure that the board is correctly configured.
4126 if (priv
->quirk
->init
)
4127 priv
->quirk
->init(priv
->dev
);
4129 for (i
= 0; i
< priv
->nr
; i
++)
4130 if (priv
->line
[i
] >= 0)
4131 serial8250_resume_port(priv
->line
[i
]);
4133 EXPORT_SYMBOL_GPL(pciserial_resume_ports
);
4136 * Probe one serial board. Unfortunately, there is no rhyme nor reason
4137 * to the arrangement of serial ports on a PCI card.
4140 pciserial_init_one(struct pci_dev
*dev
, const struct pci_device_id
*ent
)
4142 struct pci_serial_quirk
*quirk
;
4143 struct serial_private
*priv
;
4144 const struct pciserial_board
*board
;
4145 struct pciserial_board tmp
;
4148 quirk
= find_quirk(dev
);
4150 rc
= quirk
->probe(dev
);
4155 if (ent
->driver_data
>= ARRAY_SIZE(pci_boards
)) {
4156 dev_err(&dev
->dev
, "invalid driver_data: %ld\n",
4161 board
= &pci_boards
[ent
->driver_data
];
4163 rc
= pci_enable_device(dev
);
4164 pci_save_state(dev
);
4168 if (ent
->driver_data
== pbn_default
) {
4170 * Use a copy of the pci_board entry for this;
4171 * avoid changing entries in the table.
4173 memcpy(&tmp
, board
, sizeof(struct pciserial_board
));
4177 * We matched one of our class entries. Try to
4178 * determine the parameters of this board.
4180 rc
= serial_pci_guess_board(dev
, &tmp
);
4185 * We matched an explicit entry. If we are able to
4186 * detect this boards settings with our heuristic,
4187 * then we no longer need this entry.
4189 memcpy(&tmp
, &pci_boards
[pbn_default
],
4190 sizeof(struct pciserial_board
));
4191 rc
= serial_pci_guess_board(dev
, &tmp
);
4192 if (rc
== 0 && serial_pci_matches(board
, &tmp
))
4193 moan_device("Redundant entry in serial pci_table.",
4197 priv
= pciserial_init_ports(dev
, board
);
4198 if (!IS_ERR(priv
)) {
4199 pci_set_drvdata(dev
, priv
);
4206 pci_disable_device(dev
);
4210 static void pciserial_remove_one(struct pci_dev
*dev
)
4212 struct serial_private
*priv
= pci_get_drvdata(dev
);
4214 pciserial_remove_ports(priv
);
4216 pci_disable_device(dev
);
4219 #ifdef CONFIG_PM_SLEEP
4220 static int pciserial_suspend_one(struct device
*dev
)
4222 struct pci_dev
*pdev
= to_pci_dev(dev
);
4223 struct serial_private
*priv
= pci_get_drvdata(pdev
);
4226 pciserial_suspend_ports(priv
);
4231 static int pciserial_resume_one(struct device
*dev
)
4233 struct pci_dev
*pdev
= to_pci_dev(dev
);
4234 struct serial_private
*priv
= pci_get_drvdata(pdev
);
4239 * The device may have been disabled. Re-enable it.
4241 err
= pci_enable_device(pdev
);
4242 /* FIXME: We cannot simply error out here */
4244 dev_err(dev
, "Unable to re-enable ports, trying to continue.\n");
4245 pciserial_resume_ports(priv
);
4251 static SIMPLE_DEV_PM_OPS(pciserial_pm_ops
, pciserial_suspend_one
,
4252 pciserial_resume_one
);
4254 static struct pci_device_id serial_pci_tbl
[] = {
4255 /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */
4256 { PCI_VENDOR_ID_ADVANTECH
, PCI_DEVICE_ID_ADVANTECH_PCI3620
,
4257 PCI_DEVICE_ID_ADVANTECH_PCI3620
, 0x0001, 0, 0,
4259 /* Advantech also use 0x3618 and 0xf618 */
4260 { PCI_VENDOR_ID_ADVANTECH
, PCI_DEVICE_ID_ADVANTECH_PCI3618
,
4261 PCI_DEVICE_ID_ADVANTECH_PCI3618
, PCI_ANY_ID
, 0, 0,
4263 { PCI_VENDOR_ID_ADVANTECH
, PCI_DEVICE_ID_ADVANTECH_PCIf618
,
4264 PCI_DEVICE_ID_ADVANTECH_PCI3618
, PCI_ANY_ID
, 0, 0,
4266 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V960
,
4267 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4268 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232
, 0, 0,
4270 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V960
,
4271 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4272 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232
, 0, 0,
4274 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V960
,
4275 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4276 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232
, 0, 0,
4278 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4279 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4280 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232
, 0, 0,
4282 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4283 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4284 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232
, 0, 0,
4286 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4287 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4288 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232
, 0, 0,
4290 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4291 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4292 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485
, 0, 0,
4294 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4295 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4296 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4
, 0, 0,
4298 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4299 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4300 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485
, 0, 0,
4302 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4303 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4304 PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2
, 0, 0,
4306 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4307 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4308 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485
, 0, 0,
4310 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4311 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4312 PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6
, 0, 0,
4314 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4315 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4316 PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1
, 0, 0,
4318 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4319 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4320 PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1
, 0, 0,
4322 { PCI_VENDOR_ID_V3
, PCI_DEVICE_ID_V3_V351
,
4323 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4324 PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ
, 0, 0,
4326 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI954
,
4327 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4328 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2
, 0, 0,
4330 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI954
,
4331 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4332 PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4
, 0, 0,
4334 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI954
,
4335 PCI_VENDOR_ID_AFAVLAB
,
4336 PCI_SUBDEVICE_ID_AFAVLAB_P061
, 0, 0,
4338 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C152
,
4339 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4340 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232
, 0, 0,
4341 pbn_b0_2_1843200_200
},
4342 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C154
,
4343 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4344 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232
, 0, 0,
4345 pbn_b0_4_1843200_200
},
4346 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C158
,
4347 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4348 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232
, 0, 0,
4349 pbn_b0_8_1843200_200
},
4350 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C152
,
4351 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4352 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1
, 0, 0,
4353 pbn_b0_2_1843200_200
},
4354 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C154
,
4355 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4356 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2
, 0, 0,
4357 pbn_b0_4_1843200_200
},
4358 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C158
,
4359 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4360 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4
, 0, 0,
4361 pbn_b0_8_1843200_200
},
4362 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C152
,
4363 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4364 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2
, 0, 0,
4365 pbn_b0_2_1843200_200
},
4366 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C154
,
4367 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4368 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4
, 0, 0,
4369 pbn_b0_4_1843200_200
},
4370 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C158
,
4371 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4372 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8
, 0, 0,
4373 pbn_b0_8_1843200_200
},
4374 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C152
,
4375 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4376 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485
, 0, 0,
4377 pbn_b0_2_1843200_200
},
4378 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C154
,
4379 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4380 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485
, 0, 0,
4381 pbn_b0_4_1843200_200
},
4382 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C158
,
4383 PCI_SUBVENDOR_ID_CONNECT_TECH
,
4384 PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485
, 0, 0,
4385 pbn_b0_8_1843200_200
},
4386 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C152
,
4387 PCI_VENDOR_ID_IBM
, PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT
,
4388 0, 0, pbn_exar_ibm_saturn
},
4390 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_U530
,
4391 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4392 pbn_b2_bt_1_115200
},
4393 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_UCOMM2
,
4394 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4395 pbn_b2_bt_2_115200
},
4396 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_UCOMM422
,
4397 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4398 pbn_b2_bt_4_115200
},
4399 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_UCOMM232
,
4400 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4401 pbn_b2_bt_2_115200
},
4402 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_COMM4
,
4403 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4404 pbn_b2_bt_4_115200
},
4405 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_COMM8
,
4406 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4408 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_7803
,
4409 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4411 { PCI_VENDOR_ID_SEALEVEL
, PCI_DEVICE_ID_SEALEVEL_UCOMM8
,
4412 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4415 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_GTEK_SERIAL2
,
4416 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4417 pbn_b2_bt_2_115200
},
4418 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_SPCOM200
,
4419 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4420 pbn_b2_bt_2_921600
},
4422 * VScom SPCOM800, from sl@s.pl
4424 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_SPCOM800
,
4425 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4427 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_1077
,
4428 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4430 /* Unknown card - subdevice 0x1584 */
4431 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4433 PCI_SUBDEVICE_ID_UNKNOWN_0x1584
, 0, 0,
4435 /* Unknown card - subdevice 0x1588 */
4436 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4438 PCI_SUBDEVICE_ID_UNKNOWN_0x1588
, 0, 0,
4440 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4441 PCI_SUBVENDOR_ID_KEYSPAN
,
4442 PCI_SUBDEVICE_ID_KEYSPAN_SX2
, 0, 0,
4444 { PCI_VENDOR_ID_PANACOM
, PCI_DEVICE_ID_PANACOM_QUADMODEM
,
4445 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4447 { PCI_VENDOR_ID_PANACOM
, PCI_DEVICE_ID_PANACOM_DUALMODEM
,
4448 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4450 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9030
,
4451 PCI_VENDOR_ID_ESDGMBH
,
4452 PCI_DEVICE_ID_ESDGMBH_CPCIASIO4
, 0, 0,
4454 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4455 PCI_SUBVENDOR_ID_CHASE_PCIFAST
,
4456 PCI_SUBDEVICE_ID_CHASE_PCIFAST4
, 0, 0,
4458 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4459 PCI_SUBVENDOR_ID_CHASE_PCIFAST
,
4460 PCI_SUBDEVICE_ID_CHASE_PCIFAST8
, 0, 0,
4462 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4463 PCI_SUBVENDOR_ID_CHASE_PCIFAST
,
4464 PCI_SUBDEVICE_ID_CHASE_PCIFAST16
, 0, 0,
4466 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4467 PCI_SUBVENDOR_ID_CHASE_PCIFAST
,
4468 PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC
, 0, 0,
4470 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4471 PCI_SUBVENDOR_ID_CHASE_PCIRAS
,
4472 PCI_SUBDEVICE_ID_CHASE_PCIRAS4
, 0, 0,
4474 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4475 PCI_SUBVENDOR_ID_CHASE_PCIRAS
,
4476 PCI_SUBDEVICE_ID_CHASE_PCIRAS8
, 0, 0,
4478 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9050
,
4479 PCI_SUBVENDOR_ID_EXSYS
,
4480 PCI_SUBDEVICE_ID_EXSYS_4055
, 0, 0,
4483 * Megawolf Romulus PCI Serial Card, from Mike Hudson
4486 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_ROMULUS
,
4487 0x10b5, 0x106a, 0, 0,
4490 * EndRun Technologies. PCI express device range.
4491 * EndRun PTP/1588 has 2 Native UARTs.
4493 { PCI_VENDOR_ID_ENDRUN
, PCI_DEVICE_ID_ENDRUN_1588
,
4494 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4495 pbn_endrun_2_4000000
},
4497 * Quatech cards. These actually have configurable clocks but for
4498 * now we just use the default.
4500 * 100 series are RS232, 200 series RS422,
4502 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_QSC100
,
4503 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4505 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSC100
,
4506 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4508 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSC100E
,
4509 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4511 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSC200
,
4512 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4514 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSC200E
,
4515 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4517 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_QSC200
,
4518 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4520 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_ESC100D
,
4521 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4523 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_ESC100M
,
4524 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4526 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_QSCP100
,
4527 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4529 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSCP100
,
4530 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4532 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_QSCP200
,
4533 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4535 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSCP200
,
4536 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4538 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_QSCLP100
,
4539 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4541 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSCLP100
,
4542 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4544 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_SSCLP100
,
4545 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4547 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_QSCLP200
,
4548 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4550 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_DSCLP200
,
4551 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4553 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_SSCLP200
,
4554 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4556 { PCI_VENDOR_ID_QUATECH
, PCI_DEVICE_ID_QUATECH_ESCLP100
,
4557 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4560 { PCI_VENDOR_ID_SPECIALIX
, PCI_DEVICE_ID_OXSEMI_16PCI954
,
4561 PCI_VENDOR_ID_SPECIALIX
, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4
,
4564 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI954
,
4565 PCI_SUBVENDOR_ID_SIIG
, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL
,
4568 { PCI_VENDOR_ID_OXSEMI
, 0x9505,
4569 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4570 pbn_b0_bt_2_921600
},
4573 * The below card is a little controversial since it is the
4574 * subject of a PCI vendor/device ID clash. (See
4575 * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html).
4576 * For now just used the hex ID 0x950a.
4578 { PCI_VENDOR_ID_OXSEMI
, 0x950a,
4579 PCI_SUBVENDOR_ID_SIIG
, PCI_SUBDEVICE_ID_SIIG_DUAL_00
,
4580 0, 0, pbn_b0_2_115200
},
4581 { PCI_VENDOR_ID_OXSEMI
, 0x950a,
4582 PCI_SUBVENDOR_ID_SIIG
, PCI_SUBDEVICE_ID_SIIG_DUAL_30
,
4583 0, 0, pbn_b0_2_115200
},
4584 { PCI_VENDOR_ID_OXSEMI
, 0x950a,
4585 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4587 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_C950
,
4588 PCI_VENDOR_ID_OXSEMI
, PCI_SUBDEVICE_ID_OXSEMI_C950
, 0, 0,
4590 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI954
,
4591 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4593 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI952
,
4594 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4595 pbn_b0_bt_2_921600
},
4596 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI958
,
4597 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4601 * Oxford Semiconductor Inc. Tornado PCI express device range.
4603 { PCI_VENDOR_ID_OXSEMI
, 0xc101, /* OXPCIe952 1 Legacy UART */
4604 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4606 { PCI_VENDOR_ID_OXSEMI
, 0xc105, /* OXPCIe952 1 Legacy UART */
4607 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4609 { PCI_VENDOR_ID_OXSEMI
, 0xc11b, /* OXPCIe952 1 Native UART */
4610 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4611 pbn_oxsemi_1_4000000
},
4612 { PCI_VENDOR_ID_OXSEMI
, 0xc11f, /* OXPCIe952 1 Native UART */
4613 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4614 pbn_oxsemi_1_4000000
},
4615 { PCI_VENDOR_ID_OXSEMI
, 0xc120, /* OXPCIe952 1 Legacy UART */
4616 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4618 { PCI_VENDOR_ID_OXSEMI
, 0xc124, /* OXPCIe952 1 Legacy UART */
4619 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4621 { PCI_VENDOR_ID_OXSEMI
, 0xc138, /* OXPCIe952 1 Native UART */
4622 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4623 pbn_oxsemi_1_4000000
},
4624 { PCI_VENDOR_ID_OXSEMI
, 0xc13d, /* OXPCIe952 1 Native UART */
4625 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4626 pbn_oxsemi_1_4000000
},
4627 { PCI_VENDOR_ID_OXSEMI
, 0xc140, /* OXPCIe952 1 Legacy UART */
4628 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4630 { PCI_VENDOR_ID_OXSEMI
, 0xc141, /* OXPCIe952 1 Legacy UART */
4631 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4633 { PCI_VENDOR_ID_OXSEMI
, 0xc144, /* OXPCIe952 1 Legacy UART */
4634 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4636 { PCI_VENDOR_ID_OXSEMI
, 0xc145, /* OXPCIe952 1 Legacy UART */
4637 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4639 { PCI_VENDOR_ID_OXSEMI
, 0xc158, /* OXPCIe952 2 Native UART */
4640 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4641 pbn_oxsemi_2_4000000
},
4642 { PCI_VENDOR_ID_OXSEMI
, 0xc15d, /* OXPCIe952 2 Native UART */
4643 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4644 pbn_oxsemi_2_4000000
},
4645 { PCI_VENDOR_ID_OXSEMI
, 0xc208, /* OXPCIe954 4 Native UART */
4646 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4647 pbn_oxsemi_4_4000000
},
4648 { PCI_VENDOR_ID_OXSEMI
, 0xc20d, /* OXPCIe954 4 Native UART */
4649 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4650 pbn_oxsemi_4_4000000
},
4651 { PCI_VENDOR_ID_OXSEMI
, 0xc308, /* OXPCIe958 8 Native UART */
4652 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4653 pbn_oxsemi_8_4000000
},
4654 { PCI_VENDOR_ID_OXSEMI
, 0xc30d, /* OXPCIe958 8 Native UART */
4655 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4656 pbn_oxsemi_8_4000000
},
4657 { PCI_VENDOR_ID_OXSEMI
, 0xc40b, /* OXPCIe200 1 Native UART */
4658 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4659 pbn_oxsemi_1_4000000
},
4660 { PCI_VENDOR_ID_OXSEMI
, 0xc40f, /* OXPCIe200 1 Native UART */
4661 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4662 pbn_oxsemi_1_4000000
},
4663 { PCI_VENDOR_ID_OXSEMI
, 0xc41b, /* OXPCIe200 1 Native UART */
4664 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4665 pbn_oxsemi_1_4000000
},
4666 { PCI_VENDOR_ID_OXSEMI
, 0xc41f, /* OXPCIe200 1 Native UART */
4667 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4668 pbn_oxsemi_1_4000000
},
4669 { PCI_VENDOR_ID_OXSEMI
, 0xc42b, /* OXPCIe200 1 Native UART */
4670 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4671 pbn_oxsemi_1_4000000
},
4672 { PCI_VENDOR_ID_OXSEMI
, 0xc42f, /* OXPCIe200 1 Native UART */
4673 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4674 pbn_oxsemi_1_4000000
},
4675 { PCI_VENDOR_ID_OXSEMI
, 0xc43b, /* OXPCIe200 1 Native UART */
4676 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4677 pbn_oxsemi_1_4000000
},
4678 { PCI_VENDOR_ID_OXSEMI
, 0xc43f, /* OXPCIe200 1 Native UART */
4679 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4680 pbn_oxsemi_1_4000000
},
4681 { PCI_VENDOR_ID_OXSEMI
, 0xc44b, /* OXPCIe200 1 Native UART */
4682 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4683 pbn_oxsemi_1_4000000
},
4684 { PCI_VENDOR_ID_OXSEMI
, 0xc44f, /* OXPCIe200 1 Native UART */
4685 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4686 pbn_oxsemi_1_4000000
},
4687 { PCI_VENDOR_ID_OXSEMI
, 0xc45b, /* OXPCIe200 1 Native UART */
4688 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4689 pbn_oxsemi_1_4000000
},
4690 { PCI_VENDOR_ID_OXSEMI
, 0xc45f, /* OXPCIe200 1 Native UART */
4691 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4692 pbn_oxsemi_1_4000000
},
4693 { PCI_VENDOR_ID_OXSEMI
, 0xc46b, /* OXPCIe200 1 Native UART */
4694 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4695 pbn_oxsemi_1_4000000
},
4696 { PCI_VENDOR_ID_OXSEMI
, 0xc46f, /* OXPCIe200 1 Native UART */
4697 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4698 pbn_oxsemi_1_4000000
},
4699 { PCI_VENDOR_ID_OXSEMI
, 0xc47b, /* OXPCIe200 1 Native UART */
4700 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4701 pbn_oxsemi_1_4000000
},
4702 { PCI_VENDOR_ID_OXSEMI
, 0xc47f, /* OXPCIe200 1 Native UART */
4703 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4704 pbn_oxsemi_1_4000000
},
4705 { PCI_VENDOR_ID_OXSEMI
, 0xc48b, /* OXPCIe200 1 Native UART */
4706 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4707 pbn_oxsemi_1_4000000
},
4708 { PCI_VENDOR_ID_OXSEMI
, 0xc48f, /* OXPCIe200 1 Native UART */
4709 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4710 pbn_oxsemi_1_4000000
},
4711 { PCI_VENDOR_ID_OXSEMI
, 0xc49b, /* OXPCIe200 1 Native UART */
4712 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4713 pbn_oxsemi_1_4000000
},
4714 { PCI_VENDOR_ID_OXSEMI
, 0xc49f, /* OXPCIe200 1 Native UART */
4715 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4716 pbn_oxsemi_1_4000000
},
4717 { PCI_VENDOR_ID_OXSEMI
, 0xc4ab, /* OXPCIe200 1 Native UART */
4718 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4719 pbn_oxsemi_1_4000000
},
4720 { PCI_VENDOR_ID_OXSEMI
, 0xc4af, /* OXPCIe200 1 Native UART */
4721 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4722 pbn_oxsemi_1_4000000
},
4723 { PCI_VENDOR_ID_OXSEMI
, 0xc4bb, /* OXPCIe200 1 Native UART */
4724 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4725 pbn_oxsemi_1_4000000
},
4726 { PCI_VENDOR_ID_OXSEMI
, 0xc4bf, /* OXPCIe200 1 Native UART */
4727 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4728 pbn_oxsemi_1_4000000
},
4729 { PCI_VENDOR_ID_OXSEMI
, 0xc4cb, /* OXPCIe200 1 Native UART */
4730 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4731 pbn_oxsemi_1_4000000
},
4732 { PCI_VENDOR_ID_OXSEMI
, 0xc4cf, /* OXPCIe200 1 Native UART */
4733 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4734 pbn_oxsemi_1_4000000
},
4736 * Mainpine Inc. IQ Express "Rev3" utilizing OxSemi Tornado
4738 { PCI_VENDOR_ID_MAINPINE
, 0x4000, /* IQ Express 1 Port V.34 Super-G3 Fax */
4739 PCI_VENDOR_ID_MAINPINE
, 0x4001, 0, 0,
4740 pbn_oxsemi_1_4000000
},
4741 { PCI_VENDOR_ID_MAINPINE
, 0x4000, /* IQ Express 2 Port V.34 Super-G3 Fax */
4742 PCI_VENDOR_ID_MAINPINE
, 0x4002, 0, 0,
4743 pbn_oxsemi_2_4000000
},
4744 { PCI_VENDOR_ID_MAINPINE
, 0x4000, /* IQ Express 4 Port V.34 Super-G3 Fax */
4745 PCI_VENDOR_ID_MAINPINE
, 0x4004, 0, 0,
4746 pbn_oxsemi_4_4000000
},
4747 { PCI_VENDOR_ID_MAINPINE
, 0x4000, /* IQ Express 8 Port V.34 Super-G3 Fax */
4748 PCI_VENDOR_ID_MAINPINE
, 0x4008, 0, 0,
4749 pbn_oxsemi_8_4000000
},
4752 * Digi/IBM PCIe 2-port Async EIA-232 Adapter utilizing OxSemi Tornado
4754 { PCI_VENDOR_ID_DIGI
, PCIE_DEVICE_ID_NEO_2_OX_IBM
,
4755 PCI_SUBVENDOR_ID_IBM
, PCI_ANY_ID
, 0, 0,
4756 pbn_oxsemi_2_4000000
},
4759 * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
4760 * from skokodyn@yahoo.com
4762 { PCI_VENDOR_ID_SBSMODULARIO
, PCI_DEVICE_ID_OCTPRO
,
4763 PCI_SUBVENDOR_ID_SBSMODULARIO
, PCI_SUBDEVICE_ID_OCTPRO232
, 0, 0,
4765 { PCI_VENDOR_ID_SBSMODULARIO
, PCI_DEVICE_ID_OCTPRO
,
4766 PCI_SUBVENDOR_ID_SBSMODULARIO
, PCI_SUBDEVICE_ID_OCTPRO422
, 0, 0,
4768 { PCI_VENDOR_ID_SBSMODULARIO
, PCI_DEVICE_ID_OCTPRO
,
4769 PCI_SUBVENDOR_ID_SBSMODULARIO
, PCI_SUBDEVICE_ID_POCTAL232
, 0, 0,
4771 { PCI_VENDOR_ID_SBSMODULARIO
, PCI_DEVICE_ID_OCTPRO
,
4772 PCI_SUBVENDOR_ID_SBSMODULARIO
, PCI_SUBDEVICE_ID_POCTAL422
, 0, 0,
4776 * Digitan DS560-558, from jimd@esoft.com
4778 { PCI_VENDOR_ID_ATT
, PCI_DEVICE_ID_ATT_VENUS_MODEM
,
4779 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4783 * Titan Electronic cards
4784 * The 400L and 800L have a custom setup quirk.
4786 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_100
,
4787 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4789 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200
,
4790 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4792 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_400
,
4793 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4795 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800B
,
4796 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4798 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_100L
,
4799 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4801 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200L
,
4802 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4803 pbn_b1_bt_2_921600
},
4804 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_400L
,
4805 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4806 pbn_b0_bt_4_921600
},
4807 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800L
,
4808 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4809 pbn_b0_bt_8_921600
},
4810 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200I
,
4811 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4812 pbn_b4_bt_2_921600
},
4813 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_400I
,
4814 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4815 pbn_b4_bt_4_921600
},
4816 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800I
,
4817 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4818 pbn_b4_bt_8_921600
},
4819 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_400EH
,
4820 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4822 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800EH
,
4823 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4825 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800EHB
,
4826 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4828 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_100E
,
4829 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4830 pbn_oxsemi_1_4000000
},
4831 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200E
,
4832 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4833 pbn_oxsemi_2_4000000
},
4834 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_400E
,
4835 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4836 pbn_oxsemi_4_4000000
},
4837 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800E
,
4838 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4839 pbn_oxsemi_8_4000000
},
4840 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200EI
,
4841 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4842 pbn_oxsemi_2_4000000
},
4843 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200EISI
,
4844 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4845 pbn_oxsemi_2_4000000
},
4846 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_200V3
,
4847 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4848 pbn_b0_bt_2_921600
},
4849 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_400V3
,
4850 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4852 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_410V3
,
4853 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4855 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800V3
,
4856 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4858 { PCI_VENDOR_ID_TITAN
, PCI_DEVICE_ID_TITAN_800V3B
,
4859 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4862 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_1S_10x_550
,
4863 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4865 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_1S_10x_650
,
4866 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4868 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_1S_10x_850
,
4869 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4871 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_2S_10x_550
,
4872 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4873 pbn_b2_bt_2_921600
},
4874 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_2S_10x_650
,
4875 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4876 pbn_b2_bt_2_921600
},
4877 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_2S_10x_850
,
4878 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4879 pbn_b2_bt_2_921600
},
4880 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_4S_10x_550
,
4881 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4882 pbn_b2_bt_4_921600
},
4883 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_4S_10x_650
,
4884 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4885 pbn_b2_bt_4_921600
},
4886 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_4S_10x_850
,
4887 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4888 pbn_b2_bt_4_921600
},
4889 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_1S_20x_550
,
4890 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4892 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_1S_20x_650
,
4893 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4895 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_1S_20x_850
,
4896 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4898 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_2S_20x_550
,
4899 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4900 pbn_b0_bt_2_921600
},
4901 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_2S_20x_650
,
4902 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4903 pbn_b0_bt_2_921600
},
4904 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_2S_20x_850
,
4905 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4906 pbn_b0_bt_2_921600
},
4907 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_4S_20x_550
,
4908 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4909 pbn_b0_bt_4_921600
},
4910 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_4S_20x_650
,
4911 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4912 pbn_b0_bt_4_921600
},
4913 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_4S_20x_850
,
4914 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4915 pbn_b0_bt_4_921600
},
4916 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_8S_20x_550
,
4917 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4918 pbn_b0_bt_8_921600
},
4919 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_8S_20x_650
,
4920 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4921 pbn_b0_bt_8_921600
},
4922 { PCI_VENDOR_ID_SIIG
, PCI_DEVICE_ID_SIIG_8S_20x_850
,
4923 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4924 pbn_b0_bt_8_921600
},
4927 * Computone devices submitted by Doug McNash dmcnash@computone.com
4929 { PCI_VENDOR_ID_COMPUTONE
, PCI_DEVICE_ID_COMPUTONE_PG
,
4930 PCI_SUBVENDOR_ID_COMPUTONE
, PCI_SUBDEVICE_ID_COMPUTONE_PG4
,
4931 0, 0, pbn_computone_4
},
4932 { PCI_VENDOR_ID_COMPUTONE
, PCI_DEVICE_ID_COMPUTONE_PG
,
4933 PCI_SUBVENDOR_ID_COMPUTONE
, PCI_SUBDEVICE_ID_COMPUTONE_PG8
,
4934 0, 0, pbn_computone_8
},
4935 { PCI_VENDOR_ID_COMPUTONE
, PCI_DEVICE_ID_COMPUTONE_PG
,
4936 PCI_SUBVENDOR_ID_COMPUTONE
, PCI_SUBDEVICE_ID_COMPUTONE_PG6
,
4937 0, 0, pbn_computone_6
},
4939 { PCI_VENDOR_ID_OXSEMI
, PCI_DEVICE_ID_OXSEMI_16PCI95N
,
4940 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4942 { PCI_VENDOR_ID_TIMEDIA
, PCI_DEVICE_ID_TIMEDIA_1889
,
4943 PCI_VENDOR_ID_TIMEDIA
, PCI_ANY_ID
, 0, 0,
4944 pbn_b0_bt_1_921600
},
4949 { PCI_VENDOR_ID_SUNIX
, PCI_DEVICE_ID_SUNIX_1999
,
4950 PCI_VENDOR_ID_SUNIX
, PCI_ANY_ID
,
4951 PCI_CLASS_COMMUNICATION_SERIAL
<< 8, 0xffff00,
4952 pbn_b0_bt_1_921600
},
4954 { PCI_VENDOR_ID_SUNIX
, PCI_DEVICE_ID_SUNIX_1999
,
4955 PCI_VENDOR_ID_SUNIX
, PCI_ANY_ID
,
4956 PCI_CLASS_COMMUNICATION_MULTISERIAL
<< 8, 0xffff00,
4957 pbn_b0_bt_1_921600
},
4960 * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org>
4962 { PCI_VENDOR_ID_AFAVLAB
, PCI_DEVICE_ID_AFAVLAB_P028
,
4963 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4964 pbn_b0_bt_8_115200
},
4965 { PCI_VENDOR_ID_AFAVLAB
, PCI_DEVICE_ID_AFAVLAB_P030
,
4966 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4967 pbn_b0_bt_8_115200
},
4969 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_DSERIAL
,
4970 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4971 pbn_b0_bt_2_115200
},
4972 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_QUATRO_A
,
4973 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4974 pbn_b0_bt_2_115200
},
4975 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_QUATRO_B
,
4976 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4977 pbn_b0_bt_2_115200
},
4978 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_QUATTRO_A
,
4979 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4980 pbn_b0_bt_2_115200
},
4981 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_QUATTRO_B
,
4982 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4983 pbn_b0_bt_2_115200
},
4984 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_OCTO_A
,
4985 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4986 pbn_b0_bt_4_460800
},
4987 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_OCTO_B
,
4988 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4989 pbn_b0_bt_4_460800
},
4990 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_PORT_PLUS
,
4991 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4992 pbn_b0_bt_2_460800
},
4993 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_QUAD_A
,
4994 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4995 pbn_b0_bt_2_460800
},
4996 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_QUAD_B
,
4997 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
4998 pbn_b0_bt_2_460800
},
4999 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_SSERIAL
,
5000 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5001 pbn_b0_bt_1_115200
},
5002 { PCI_VENDOR_ID_LAVA
, PCI_DEVICE_ID_LAVA_PORT_650
,
5003 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5004 pbn_b0_bt_1_460800
},
5007 * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408).
5008 * Cards are identified by their subsystem vendor IDs, which
5009 * (in hex) match the model number.
5011 * Note that JC140x are RS422/485 cards which require ox950
5012 * ACR = 0x10, and as such are not currently fully supported.
5014 { PCI_VENDOR_ID_KORENIX
, PCI_DEVICE_ID_KORENIX_JETCARDF0
,
5015 0x1204, 0x0004, 0, 0,
5017 { PCI_VENDOR_ID_KORENIX
, PCI_DEVICE_ID_KORENIX_JETCARDF0
,
5018 0x1208, 0x0004, 0, 0,
5020 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
5021 0x1402, 0x0002, 0, 0,
5022 pbn_b0_2_921600 }, */
5023 /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0,
5024 0x1404, 0x0004, 0, 0,
5025 pbn_b0_4_921600 }, */
5026 { PCI_VENDOR_ID_KORENIX
, PCI_DEVICE_ID_KORENIX_JETCARDF1
,
5027 0x1208, 0x0004, 0, 0,
5030 { PCI_VENDOR_ID_KORENIX
, PCI_DEVICE_ID_KORENIX_JETCARDF2
,
5031 0x1204, 0x0004, 0, 0,
5033 { PCI_VENDOR_ID_KORENIX
, PCI_DEVICE_ID_KORENIX_JETCARDF2
,
5034 0x1208, 0x0004, 0, 0,
5036 { PCI_VENDOR_ID_KORENIX
, PCI_DEVICE_ID_KORENIX_JETCARDF3
,
5037 0x1208, 0x0004, 0, 0,
5040 * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com
5042 { PCI_VENDOR_ID_DELL
, PCI_DEVICE_ID_DELL_RAC4
,
5043 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5047 * Dell Remote Access Card III - Tim_T_Murphy@Dell.com
5049 { PCI_VENDOR_ID_DELL
, PCI_DEVICE_ID_DELL_RACIII
,
5050 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5054 * RAStel 2 port modem, gerg@moreton.com.au
5056 { PCI_VENDOR_ID_MORETON
, PCI_DEVICE_ID_RASTEL_2PORT
,
5057 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5058 pbn_b2_bt_2_115200
},
5061 * EKF addition for i960 Boards form EKF with serial port
5063 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_80960_RP
,
5064 0xE4BF, PCI_ANY_ID
, 0, 0,
5068 * Xircom Cardbus/Ethernet combos
5070 { PCI_VENDOR_ID_XIRCOM
, PCI_DEVICE_ID_XIRCOM_X3201_MDM
,
5071 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5074 * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry)
5076 { PCI_VENDOR_ID_XIRCOM
, PCI_DEVICE_ID_XIRCOM_RBM56G
,
5077 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5081 * Untested PCI modems, sent in from various folks...
5085 * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de>
5087 { PCI_VENDOR_ID_ROCKWELL
, 0x1004,
5088 0x1048, 0x1500, 0, 0,
5091 { PCI_VENDOR_ID_SGI
, PCI_DEVICE_ID_SGI_IOC3
,
5098 { PCI_VENDOR_ID_HP
, PCI_DEVICE_ID_HP_DIVA
,
5099 PCI_VENDOR_ID_HP
, PCI_DEVICE_ID_HP_DIVA_RMP3
, 0, 0,
5101 { PCI_VENDOR_ID_HP
, PCI_DEVICE_ID_HP_DIVA
,
5102 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5104 { PCI_VENDOR_ID_HP
, PCI_DEVICE_ID_HP_DIVA_AUX
,
5105 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5108 { PCI_VENDOR_ID_DCI
, PCI_DEVICE_ID_DCI_PCCOM2
,
5109 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5111 { PCI_VENDOR_ID_DCI
, PCI_DEVICE_ID_DCI_PCCOM4
,
5112 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5114 { PCI_VENDOR_ID_DCI
, PCI_DEVICE_ID_DCI_PCCOM8
,
5115 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5119 * Exar Corp. XR17C15[248] Dual/Quad/Octal UART
5121 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C152
,
5122 PCI_ANY_ID
, PCI_ANY_ID
,
5124 0, pbn_exar_XR17C152
},
5125 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C154
,
5126 PCI_ANY_ID
, PCI_ANY_ID
,
5128 0, pbn_exar_XR17C154
},
5129 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17C158
,
5130 PCI_ANY_ID
, PCI_ANY_ID
,
5132 0, pbn_exar_XR17C158
},
5134 * Exar Corp. XR17V[48]35[248] Dual/Quad/Octal/Hexa PCIe UARTs
5136 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17V352
,
5137 PCI_ANY_ID
, PCI_ANY_ID
,
5139 0, pbn_exar_XR17V352
},
5140 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17V354
,
5141 PCI_ANY_ID
, PCI_ANY_ID
,
5143 0, pbn_exar_XR17V354
},
5144 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17V358
,
5145 PCI_ANY_ID
, PCI_ANY_ID
,
5147 0, pbn_exar_XR17V358
},
5148 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17V4358
,
5149 PCI_ANY_ID
, PCI_ANY_ID
,
5151 0, pbn_exar_XR17V4358
},
5152 { PCI_VENDOR_ID_EXAR
, PCI_DEVICE_ID_EXAR_XR17V8358
,
5153 PCI_ANY_ID
, PCI_ANY_ID
,
5155 0, pbn_exar_XR17V8358
},
5157 * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
5159 { PCI_VENDOR_ID_TOPIC
, PCI_DEVICE_ID_TOPIC_TP560
,
5160 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5165 { PCI_VENDOR_ID_ITE
, PCI_DEVICE_ID_ITE_8872
,
5166 PCI_ANY_ID
, PCI_ANY_ID
,
5168 pbn_b1_bt_1_115200
},
5173 { PCI_VENDOR_ID_INTASHIELD
, PCI_DEVICE_ID_INTASHIELD_IS200
,
5174 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0, /* 135a.0811 */
5179 { PCI_VENDOR_ID_INTASHIELD
, PCI_DEVICE_ID_INTASHIELD_IS400
,
5180 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0, /* 135a.0dc0 */
5183 * Perle PCI-RAS cards
5185 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9030
,
5186 PCI_SUBVENDOR_ID_PERLE
, PCI_SUBDEVICE_ID_PCI_RAS4
,
5187 0, 0, pbn_b2_4_921600
},
5188 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_9030
,
5189 PCI_SUBVENDOR_ID_PERLE
, PCI_SUBDEVICE_ID_PCI_RAS8
,
5190 0, 0, pbn_b2_8_921600
},
5193 * Mainpine series cards: Fairly standard layout but fools
5194 * parts of the autodetect in some cases and uses otherwise
5195 * unmatched communications subclasses in the PCI Express case
5198 { /* RockForceDUO */
5199 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5200 PCI_VENDOR_ID_MAINPINE
, 0x0200,
5201 0, 0, pbn_b0_2_115200
},
5202 { /* RockForceQUATRO */
5203 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5204 PCI_VENDOR_ID_MAINPINE
, 0x0300,
5205 0, 0, pbn_b0_4_115200
},
5206 { /* RockForceDUO+ */
5207 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5208 PCI_VENDOR_ID_MAINPINE
, 0x0400,
5209 0, 0, pbn_b0_2_115200
},
5210 { /* RockForceQUATRO+ */
5211 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5212 PCI_VENDOR_ID_MAINPINE
, 0x0500,
5213 0, 0, pbn_b0_4_115200
},
5215 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5216 PCI_VENDOR_ID_MAINPINE
, 0x0600,
5217 0, 0, pbn_b0_2_115200
},
5219 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5220 PCI_VENDOR_ID_MAINPINE
, 0x0700,
5221 0, 0, pbn_b0_4_115200
},
5222 { /* RockForceOCTO+ */
5223 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5224 PCI_VENDOR_ID_MAINPINE
, 0x0800,
5225 0, 0, pbn_b0_8_115200
},
5226 { /* RockForceDUO+ */
5227 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5228 PCI_VENDOR_ID_MAINPINE
, 0x0C00,
5229 0, 0, pbn_b0_2_115200
},
5230 { /* RockForceQUARTRO+ */
5231 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5232 PCI_VENDOR_ID_MAINPINE
, 0x0D00,
5233 0, 0, pbn_b0_4_115200
},
5234 { /* RockForceOCTO+ */
5235 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5236 PCI_VENDOR_ID_MAINPINE
, 0x1D00,
5237 0, 0, pbn_b0_8_115200
},
5239 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5240 PCI_VENDOR_ID_MAINPINE
, 0x2000,
5241 0, 0, pbn_b0_1_115200
},
5243 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5244 PCI_VENDOR_ID_MAINPINE
, 0x2100,
5245 0, 0, pbn_b0_1_115200
},
5247 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5248 PCI_VENDOR_ID_MAINPINE
, 0x2200,
5249 0, 0, pbn_b0_2_115200
},
5251 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5252 PCI_VENDOR_ID_MAINPINE
, 0x2300,
5253 0, 0, pbn_b0_2_115200
},
5255 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5256 PCI_VENDOR_ID_MAINPINE
, 0x2400,
5257 0, 0, pbn_b0_4_115200
},
5259 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5260 PCI_VENDOR_ID_MAINPINE
, 0x2500,
5261 0, 0, pbn_b0_4_115200
},
5263 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5264 PCI_VENDOR_ID_MAINPINE
, 0x2600,
5265 0, 0, pbn_b0_8_115200
},
5267 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5268 PCI_VENDOR_ID_MAINPINE
, 0x2700,
5269 0, 0, pbn_b0_8_115200
},
5270 { /* IQ Express D1 */
5271 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5272 PCI_VENDOR_ID_MAINPINE
, 0x3000,
5273 0, 0, pbn_b0_1_115200
},
5274 { /* IQ Express F1 */
5275 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5276 PCI_VENDOR_ID_MAINPINE
, 0x3100,
5277 0, 0, pbn_b0_1_115200
},
5278 { /* IQ Express D2 */
5279 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5280 PCI_VENDOR_ID_MAINPINE
, 0x3200,
5281 0, 0, pbn_b0_2_115200
},
5282 { /* IQ Express F2 */
5283 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5284 PCI_VENDOR_ID_MAINPINE
, 0x3300,
5285 0, 0, pbn_b0_2_115200
},
5286 { /* IQ Express D4 */
5287 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5288 PCI_VENDOR_ID_MAINPINE
, 0x3400,
5289 0, 0, pbn_b0_4_115200
},
5290 { /* IQ Express F4 */
5291 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5292 PCI_VENDOR_ID_MAINPINE
, 0x3500,
5293 0, 0, pbn_b0_4_115200
},
5294 { /* IQ Express D8 */
5295 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5296 PCI_VENDOR_ID_MAINPINE
, 0x3C00,
5297 0, 0, pbn_b0_8_115200
},
5298 { /* IQ Express F8 */
5299 PCI_VENDOR_ID_MAINPINE
, PCI_DEVICE_ID_MAINPINE_PBRIDGE
,
5300 PCI_VENDOR_ID_MAINPINE
, 0x3D00,
5301 0, 0, pbn_b0_8_115200
},
5305 * PA Semi PA6T-1682M on-chip UART
5307 { PCI_VENDOR_ID_PASEMI
, 0xa004,
5308 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5312 * National Instruments
5314 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI23216
,
5315 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5317 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI2328
,
5318 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5320 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI2324
,
5321 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5322 pbn_b1_bt_4_115200
},
5323 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI2322
,
5324 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5325 pbn_b1_bt_2_115200
},
5326 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI2324I
,
5327 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5328 pbn_b1_bt_4_115200
},
5329 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI2322I
,
5330 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5331 pbn_b1_bt_2_115200
},
5332 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8420_23216
,
5333 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5335 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8420_2328
,
5336 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5338 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8420_2324
,
5339 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5340 pbn_b1_bt_4_115200
},
5341 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8420_2322
,
5342 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5343 pbn_b1_bt_2_115200
},
5344 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8422_2324
,
5345 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5346 pbn_b1_bt_4_115200
},
5347 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8422_2322
,
5348 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5349 pbn_b1_bt_2_115200
},
5350 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8430_2322
,
5351 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5353 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI8430_2322
,
5354 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5356 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8430_2324
,
5357 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5359 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI8430_2324
,
5360 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5362 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8430_2328
,
5363 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5365 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI8430_2328
,
5366 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5368 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8430_23216
,
5369 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5371 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI8430_23216
,
5372 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5374 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8432_2322
,
5375 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5377 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI8432_2322
,
5378 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5380 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PXI8432_2324
,
5381 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5383 { PCI_VENDOR_ID_NI
, PCI_DEVICE_ID_NI_PCI8432_2324
,
5384 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5388 * ADDI-DATA GmbH communication cards <info@addi-data.com>
5390 { PCI_VENDOR_ID_ADDIDATA
,
5391 PCI_DEVICE_ID_ADDIDATA_APCI7500
,
5398 { PCI_VENDOR_ID_ADDIDATA
,
5399 PCI_DEVICE_ID_ADDIDATA_APCI7420
,
5406 { PCI_VENDOR_ID_ADDIDATA
,
5407 PCI_DEVICE_ID_ADDIDATA_APCI7300
,
5414 { PCI_VENDOR_ID_AMCC
,
5415 PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800
,
5422 { PCI_VENDOR_ID_ADDIDATA
,
5423 PCI_DEVICE_ID_ADDIDATA_APCI7500_2
,
5430 { PCI_VENDOR_ID_ADDIDATA
,
5431 PCI_DEVICE_ID_ADDIDATA_APCI7420_2
,
5438 { PCI_VENDOR_ID_ADDIDATA
,
5439 PCI_DEVICE_ID_ADDIDATA_APCI7300_2
,
5446 { PCI_VENDOR_ID_ADDIDATA
,
5447 PCI_DEVICE_ID_ADDIDATA_APCI7500_3
,
5454 { PCI_VENDOR_ID_ADDIDATA
,
5455 PCI_DEVICE_ID_ADDIDATA_APCI7420_3
,
5462 { PCI_VENDOR_ID_ADDIDATA
,
5463 PCI_DEVICE_ID_ADDIDATA_APCI7300_3
,
5470 { PCI_VENDOR_ID_ADDIDATA
,
5471 PCI_DEVICE_ID_ADDIDATA_APCI7800_3
,
5478 { PCI_VENDOR_ID_ADDIDATA
,
5479 PCI_DEVICE_ID_ADDIDATA_APCIe7500
,
5484 pbn_ADDIDATA_PCIe_4_3906250
},
5486 { PCI_VENDOR_ID_ADDIDATA
,
5487 PCI_DEVICE_ID_ADDIDATA_APCIe7420
,
5492 pbn_ADDIDATA_PCIe_2_3906250
},
5494 { PCI_VENDOR_ID_ADDIDATA
,
5495 PCI_DEVICE_ID_ADDIDATA_APCIe7300
,
5500 pbn_ADDIDATA_PCIe_1_3906250
},
5502 { PCI_VENDOR_ID_ADDIDATA
,
5503 PCI_DEVICE_ID_ADDIDATA_APCIe7800
,
5508 pbn_ADDIDATA_PCIe_8_3906250
},
5510 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9835
,
5511 PCI_VENDOR_ID_IBM
, 0x0299,
5512 0, 0, pbn_b0_bt_2_115200
},
5515 * other NetMos 9835 devices are most likely handled by the
5516 * parport_serial driver, check drivers/parport/parport_serial.c
5517 * before adding them here.
5520 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9901
,
5522 0, 0, pbn_b0_1_115200
},
5524 /* the 9901 is a rebranded 9912 */
5525 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9912
,
5527 0, 0, pbn_b0_1_115200
},
5529 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9922
,
5531 0, 0, pbn_b0_1_115200
},
5533 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9904
,
5535 0, 0, pbn_b0_1_115200
},
5537 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9900
,
5539 0, 0, pbn_b0_1_115200
},
5541 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9900
,
5543 0, 0, pbn_NETMOS9900_2s_115200
},
5546 * Best Connectivity and Rosewill PCI Multi I/O cards
5549 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9865
,
5551 0, 0, pbn_b0_1_115200
},
5553 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9865
,
5555 0, 0, pbn_b0_bt_2_115200
},
5557 { PCI_VENDOR_ID_NETMOS
, PCI_DEVICE_ID_NETMOS_9865
,
5559 0, 0, pbn_b0_bt_4_115200
},
5561 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_CE4100_UART
,
5562 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5563 pbn_ce4100_1_115200
},
5564 /* Intel BayTrail */
5565 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_BYT_UART1
,
5566 PCI_ANY_ID
, PCI_ANY_ID
,
5567 PCI_CLASS_COMMUNICATION_SERIAL
<< 8, 0xff0000,
5569 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_BYT_UART2
,
5570 PCI_ANY_ID
, PCI_ANY_ID
,
5571 PCI_CLASS_COMMUNICATION_SERIAL
<< 8, 0xff0000,
5573 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_BSW_UART1
,
5574 PCI_ANY_ID
, PCI_ANY_ID
,
5575 PCI_CLASS_COMMUNICATION_SERIAL
<< 8, 0xff0000,
5577 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_BSW_UART2
,
5578 PCI_ANY_ID
, PCI_ANY_ID
,
5579 PCI_CLASS_COMMUNICATION_SERIAL
<< 8, 0xff0000,
5585 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_PNW_UART1
,
5586 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5588 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_PNW_UART2
,
5589 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5591 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_PNW_UART3
,
5592 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5598 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_TNG_UART
,
5599 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5605 { PCI_VENDOR_ID_INTEL
, PCI_DEVICE_ID_INTEL_QRK_UART
,
5606 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5611 { PCI_VENDOR_ID_PLX
, PCI_DEVICE_ID_PLX_CRONYX_OMEGA
,
5612 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5616 * Broadcom TruManage
5618 { PCI_VENDOR_ID_BROADCOM
, PCI_DEVICE_ID_BROADCOM_TRUMANAGE
,
5619 PCI_ANY_ID
, PCI_ANY_ID
, 0, 0,
5620 pbn_brcm_trumanage
},
5623 * AgeStar as-prs2-009
5625 { PCI_VENDOR_ID_AGESTAR
, PCI_DEVICE_ID_AGESTAR_9375
,
5626 PCI_ANY_ID
, PCI_ANY_ID
,
5627 0, 0, pbn_b0_bt_2_115200
},
5630 * WCH CH353 series devices: The 2S1P is handled by parport_serial
5631 * so not listed here.
5633 { PCI_VENDOR_ID_WCH
, PCI_DEVICE_ID_WCH_CH353_4S
,
5634 PCI_ANY_ID
, PCI_ANY_ID
,
5635 0, 0, pbn_b0_bt_4_115200
},
5637 { PCI_VENDOR_ID_WCH
, PCI_DEVICE_ID_WCH_CH353_2S1PF
,
5638 PCI_ANY_ID
, PCI_ANY_ID
,
5639 0, 0, pbn_b0_bt_2_115200
},
5641 { PCIE_VENDOR_ID_WCH
, PCIE_DEVICE_ID_WCH_CH384_4S
,
5642 PCI_ANY_ID
, PCI_ANY_ID
,
5643 0, 0, pbn_wch384_4
},
5646 * Commtech, Inc. Fastcom adapters
5648 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_4222PCI335
,
5649 PCI_ANY_ID
, PCI_ANY_ID
,
5651 0, pbn_b0_2_1152000_200
},
5652 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_4224PCI335
,
5653 PCI_ANY_ID
, PCI_ANY_ID
,
5655 0, pbn_b0_4_1152000_200
},
5656 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_2324PCI335
,
5657 PCI_ANY_ID
, PCI_ANY_ID
,
5659 0, pbn_b0_4_1152000_200
},
5660 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_2328PCI335
,
5661 PCI_ANY_ID
, PCI_ANY_ID
,
5663 0, pbn_b0_8_1152000_200
},
5664 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_4222PCIE
,
5665 PCI_ANY_ID
, PCI_ANY_ID
,
5667 0, pbn_exar_XR17V352
},
5668 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_4224PCIE
,
5669 PCI_ANY_ID
, PCI_ANY_ID
,
5671 0, pbn_exar_XR17V354
},
5672 { PCI_VENDOR_ID_COMMTECH
, PCI_DEVICE_ID_COMMTECH_4228PCIE
,
5673 PCI_ANY_ID
, PCI_ANY_ID
,
5675 0, pbn_exar_XR17V358
},
5677 /* Fintek PCI serial cards */
5678 { PCI_DEVICE(0x1c29, 0x1104), .driver_data
= pbn_fintek_4
},
5679 { PCI_DEVICE(0x1c29, 0x1108), .driver_data
= pbn_fintek_8
},
5680 { PCI_DEVICE(0x1c29, 0x1112), .driver_data
= pbn_fintek_12
},
5683 * These entries match devices with class COMMUNICATION_SERIAL,
5684 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
5686 { PCI_ANY_ID
, PCI_ANY_ID
,
5687 PCI_ANY_ID
, PCI_ANY_ID
,
5688 PCI_CLASS_COMMUNICATION_SERIAL
<< 8,
5689 0xffff00, pbn_default
},
5690 { PCI_ANY_ID
, PCI_ANY_ID
,
5691 PCI_ANY_ID
, PCI_ANY_ID
,
5692 PCI_CLASS_COMMUNICATION_MODEM
<< 8,
5693 0xffff00, pbn_default
},
5694 { PCI_ANY_ID
, PCI_ANY_ID
,
5695 PCI_ANY_ID
, PCI_ANY_ID
,
5696 PCI_CLASS_COMMUNICATION_MULTISERIAL
<< 8,
5697 0xffff00, pbn_default
},
5701 static pci_ers_result_t
serial8250_io_error_detected(struct pci_dev
*dev
,
5702 pci_channel_state_t state
)
5704 struct serial_private
*priv
= pci_get_drvdata(dev
);
5706 if (state
== pci_channel_io_perm_failure
)
5707 return PCI_ERS_RESULT_DISCONNECT
;
5710 pciserial_suspend_ports(priv
);
5712 pci_disable_device(dev
);
5714 return PCI_ERS_RESULT_NEED_RESET
;
5717 static pci_ers_result_t
serial8250_io_slot_reset(struct pci_dev
*dev
)
5721 rc
= pci_enable_device(dev
);
5724 return PCI_ERS_RESULT_DISCONNECT
;
5726 pci_restore_state(dev
);
5727 pci_save_state(dev
);
5729 return PCI_ERS_RESULT_RECOVERED
;
5732 static void serial8250_io_resume(struct pci_dev
*dev
)
5734 struct serial_private
*priv
= pci_get_drvdata(dev
);
5737 pciserial_resume_ports(priv
);
5740 static const struct pci_error_handlers serial8250_err_handler
= {
5741 .error_detected
= serial8250_io_error_detected
,
5742 .slot_reset
= serial8250_io_slot_reset
,
5743 .resume
= serial8250_io_resume
,
5746 static struct pci_driver serial_pci_driver
= {
5748 .probe
= pciserial_init_one
,
5749 .remove
= pciserial_remove_one
,
5751 .pm
= &pciserial_pm_ops
,
5753 .id_table
= serial_pci_tbl
,
5754 .err_handler
= &serial8250_err_handler
,
5757 module_pci_driver(serial_pci_driver
);
5759 MODULE_LICENSE("GPL");
5760 MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");
5761 MODULE_DEVICE_TABLE(pci
, serial_pci_tbl
);