Greg Kroah-Hartman | e3b3d0f | 2017-11-06 18:11:51 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | * Probe module for 8250/16550-type PCI serial ports. |
| 4 | * |
| 5 | * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. |
| 6 | * |
| 7 | * Copyright (C) 2001 Russell King, All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | */ |
Greg Kroah-Hartman | af8c5b8 | 2013-09-28 13:01:59 -0700 | [diff] [blame] | 9 | #undef DEBUG |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | #include <linux/module.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | #include <linux/pci.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/string.h> |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/slab.h> |
| 15 | #include <linux/delay.h> |
| 16 | #include <linux/tty.h> |
Sudhakar Mamillapalli | 0ad372b | 2012-04-10 14:10:58 -0700 | [diff] [blame] | 17 | #include <linux/serial_reg.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <linux/serial_core.h> |
| 19 | #include <linux/8250_pci.h> |
| 20 | #include <linux/bitops.h> |
| 21 | |
| 22 | #include <asm/byteorder.h> |
| 23 | #include <asm/io.h> |
| 24 | |
| 25 | #include "8250.h" |
| 26 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | * init function returns: |
| 29 | * > 0 - number of ports |
| 30 | * = 0 - use board->num_ports |
| 31 | * < 0 - error |
| 32 | */ |
| 33 | struct pci_serial_quirk { |
| 34 | u32 vendor; |
| 35 | u32 device; |
| 36 | u32 subvendor; |
| 37 | u32 subdevice; |
Frédéric Brière | 5bf8f50 | 2011-05-29 15:08:03 -0400 | [diff] [blame] | 38 | int (*probe)(struct pci_dev *dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | int (*init)(struct pci_dev *dev); |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 40 | int (*setup)(struct serial_private *, |
| 41 | const struct pciserial_board *, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 42 | struct uart_8250_port *, int); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | void (*exit)(struct pci_dev *dev); |
| 44 | }; |
| 45 | |
Ji-Ze Hong (Peter Hong) | 68e26a8 | 2019-08-16 13:27:29 +0800 | [diff] [blame] | 46 | struct f815xxa_data { |
| 47 | spinlock_t lock; |
| 48 | int idx; |
| 49 | }; |
| 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | struct serial_private { |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 52 | struct pci_dev *dev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | unsigned int nr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | struct pci_serial_quirk *quirk; |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 55 | const struct pciserial_board *board; |
Gustavo A. R. Silva | 02042a4 | 2020-02-12 18:44:26 -0600 | [diff] [blame] | 56 | int line[]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | }; |
| 58 | |
Randy Wright | e0e2420 | 2021-05-14 10:26:54 -0600 | [diff] [blame] | 59 | #define PCI_DEVICE_ID_HPE_PCI_SERIAL 0x37e |
| 60 | |
Ralf Ramsauer | 8428413 | 2019-08-12 13:21:52 +0200 | [diff] [blame] | 61 | static const struct pci_device_id pci_use_msi[] = { |
| 62 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900, |
| 63 | 0xA000, 0x1000) }, |
| 64 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912, |
| 65 | 0xA000, 0x1000) }, |
| 66 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922, |
| 67 | 0xA000, 0x1000) }, |
Randy Wright | e0e2420 | 2021-05-14 10:26:54 -0600 | [diff] [blame] | 68 | { PCI_DEVICE_SUB(PCI_VENDOR_ID_HP_3PAR, PCI_DEVICE_ID_HPE_PCI_SERIAL, |
| 69 | PCI_ANY_ID, PCI_ANY_ID) }, |
Ralf Ramsauer | 8428413 | 2019-08-12 13:21:52 +0200 | [diff] [blame] | 70 | { } |
| 71 | }; |
| 72 | |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 73 | static int pci_default_setup(struct serial_private*, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 74 | const struct pciserial_board*, struct uart_8250_port *, int); |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 75 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | static void moan_device(const char *str, struct pci_dev *dev) |
| 77 | { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 78 | pci_err(dev, "%s\n" |
Joe Perches | ad361c9 | 2009-07-06 13:05:40 -0700 | [diff] [blame] | 79 | "Please send the output of lspci -vv, this\n" |
| 80 | "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n" |
| 81 | "manufacturer and name of serial board or\n" |
Russell King | f2e0ea8 | 2015-03-06 10:49:21 +0000 | [diff] [blame] | 82 | "modem board to <linux-serial@vger.kernel.org>.\n", |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 83 | str, dev->vendor, dev->device, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | dev->subsystem_vendor, dev->subsystem_device); |
| 85 | } |
| 86 | |
| 87 | static int |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 88 | setup_port(struct serial_private *priv, struct uart_8250_port *port, |
Greg Kroah-Hartman | 3a96e97 | 2021-07-26 15:07:17 +0200 | [diff] [blame] | 89 | u8 bar, unsigned int offset, int regshift) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | { |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 91 | struct pci_dev *dev = priv->dev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | |
Denis Efremov | c9c13ba | 2019-09-28 02:43:08 +0300 | [diff] [blame] | 93 | if (bar >= PCI_STD_NUM_BARS) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | return -EINVAL; |
| 95 | |
| 96 | if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) { |
Andy Shevchenko | 3f64b1d | 2016-02-15 18:01:51 +0200 | [diff] [blame] | 97 | if (!pcim_iomap(dev, bar, 0) && !pcim_iomap_table(dev)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 98 | return -ENOMEM; |
| 99 | |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 100 | port->port.iotype = UPIO_MEM; |
| 101 | port->port.iobase = 0; |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 102 | port->port.mapbase = pci_resource_start(dev, bar) + offset; |
Andy Shevchenko | 3f64b1d | 2016-02-15 18:01:51 +0200 | [diff] [blame] | 103 | port->port.membase = pcim_iomap_table(dev)[bar] + offset; |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 104 | port->port.regshift = regshift; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | } else { |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 106 | port->port.iotype = UPIO_PORT; |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 107 | port->port.iobase = pci_resource_start(dev, bar) + offset; |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 108 | port->port.mapbase = 0; |
| 109 | port->port.membase = NULL; |
| 110 | port->port.regshift = 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | } |
| 112 | return 0; |
| 113 | } |
| 114 | |
| 115 | /* |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 116 | * ADDI-DATA GmbH communication cards <info@addi-data.com> |
| 117 | */ |
| 118 | static int addidata_apci7800_setup(struct serial_private *priv, |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 119 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 120 | struct uart_8250_port *port, int idx) |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 121 | { |
| 122 | unsigned int bar = 0, offset = board->first_offset; |
| 123 | bar = FL_GET_BASE(board->flags); |
| 124 | |
| 125 | if (idx < 2) { |
| 126 | offset += idx * board->uart_offset; |
| 127 | } else if ((idx >= 2) && (idx < 4)) { |
| 128 | bar += 1; |
| 129 | offset += ((idx - 2) * board->uart_offset); |
| 130 | } else if ((idx >= 4) && (idx < 6)) { |
| 131 | bar += 2; |
| 132 | offset += ((idx - 4) * board->uart_offset); |
| 133 | } else if (idx >= 6) { |
| 134 | bar += 3; |
| 135 | offset += ((idx - 6) * board->uart_offset); |
| 136 | } |
| 137 | |
| 138 | return setup_port(priv, port, bar, offset, board->reg_shift); |
| 139 | } |
| 140 | |
| 141 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | * AFAVLAB uses a different mixture of BARs and offsets |
| 143 | * Not that ugly ;) -- HW |
| 144 | */ |
| 145 | static int |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 146 | afavlab_setup(struct serial_private *priv, const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 147 | struct uart_8250_port *port, int idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | { |
| 149 | unsigned int bar, offset = board->first_offset; |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 150 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | bar = FL_GET_BASE(board->flags); |
| 152 | if (idx < 4) |
| 153 | bar += idx; |
| 154 | else { |
| 155 | bar = 4; |
| 156 | offset += (idx - 4) * board->uart_offset; |
| 157 | } |
| 158 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 159 | return setup_port(priv, port, bar, offset, board->reg_shift); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | /* |
| 163 | * HP's Remote Management Console. The Diva chip came in several |
| 164 | * different versions. N-class, L2000 and A500 have two Diva chips, each |
| 165 | * with 3 UARTs (the third UART on the second chip is unused). Superdome |
| 166 | * and Keystone have one Diva chip with 3 UARTs. Some later machines have |
| 167 | * one Diva chip, but it has been expanded to 5 UARTs. |
| 168 | */ |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 169 | static int pci_hp_diva_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 170 | { |
| 171 | int rc = 0; |
| 172 | |
| 173 | switch (dev->subsystem_device) { |
| 174 | case PCI_DEVICE_ID_HP_DIVA_TOSCA1: |
| 175 | case PCI_DEVICE_ID_HP_DIVA_HALFDOME: |
| 176 | case PCI_DEVICE_ID_HP_DIVA_KEYSTONE: |
| 177 | case PCI_DEVICE_ID_HP_DIVA_EVEREST: |
| 178 | rc = 3; |
| 179 | break; |
| 180 | case PCI_DEVICE_ID_HP_DIVA_TOSCA2: |
| 181 | rc = 2; |
| 182 | break; |
| 183 | case PCI_DEVICE_ID_HP_DIVA_MAESTRO: |
| 184 | rc = 4; |
| 185 | break; |
| 186 | case PCI_DEVICE_ID_HP_DIVA_POWERBAR: |
Justin Chen | 551f8f0 | 2005-10-24 22:16:38 +0100 | [diff] [blame] | 187 | case PCI_DEVICE_ID_HP_DIVA_HURRICANE: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 188 | rc = 1; |
| 189 | break; |
| 190 | } |
| 191 | |
| 192 | return rc; |
| 193 | } |
| 194 | |
| 195 | /* |
| 196 | * HP's Diva chip puts the 4th/5th serial port further out, and |
| 197 | * some serial ports are supposed to be hidden on certain models. |
| 198 | */ |
| 199 | static int |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 200 | pci_hp_diva_setup(struct serial_private *priv, |
| 201 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 202 | struct uart_8250_port *port, int idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | { |
| 204 | unsigned int offset = board->first_offset; |
| 205 | unsigned int bar = FL_GET_BASE(board->flags); |
| 206 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 207 | switch (priv->dev->subsystem_device) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 | case PCI_DEVICE_ID_HP_DIVA_MAESTRO: |
| 209 | if (idx == 3) |
| 210 | idx++; |
| 211 | break; |
| 212 | case PCI_DEVICE_ID_HP_DIVA_EVEREST: |
| 213 | if (idx > 0) |
| 214 | idx++; |
| 215 | if (idx > 2) |
| 216 | idx++; |
| 217 | break; |
| 218 | } |
| 219 | if (idx > 2) |
| 220 | offset = 0x18; |
| 221 | |
| 222 | offset += idx * board->uart_offset; |
| 223 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 224 | return setup_port(priv, port, bar, offset, board->reg_shift); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | } |
| 226 | |
| 227 | /* |
| 228 | * Added for EKF Intel i960 serial boards |
| 229 | */ |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 230 | static int pci_inteli960ni_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | { |
Heikki Krogerus | 0a0d412 | 2015-01-12 13:47:46 +0200 | [diff] [blame] | 232 | u32 oldval; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | |
| 234 | if (!(dev->subsystem_device & 0x1000)) |
| 235 | return -ENODEV; |
| 236 | |
| 237 | /* is firmware started? */ |
Heikki Krogerus | 0a0d412 | 2015-01-12 13:47:46 +0200 | [diff] [blame] | 238 | pci_read_config_dword(dev, 0x44, &oldval); |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 239 | if (oldval == 0x00001000L) { /* RESET value */ |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 240 | pci_dbg(dev, "Local i960 firmware missing\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | return -ENODEV; |
| 242 | } |
| 243 | return 0; |
| 244 | } |
| 245 | |
| 246 | /* |
| 247 | * Some PCI serial cards using the PLX 9050 PCI interface chip require |
| 248 | * that the card interrupt be explicitly enabled or disabled. This |
| 249 | * seems to be mainly needed on card using the PLX which also use I/O |
| 250 | * mapped memory. |
| 251 | */ |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 252 | static int pci_plx9050_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 253 | { |
| 254 | u8 irq_config; |
| 255 | void __iomem *p; |
| 256 | |
| 257 | if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) { |
| 258 | moan_device("no memory in bar 0", dev); |
| 259 | return 0; |
| 260 | } |
| 261 | |
| 262 | irq_config = 0x41; |
Bjorn Helgaas | add7b58 | 2005-10-24 22:11:57 +0100 | [diff] [blame] | 263 | if (dev->vendor == PCI_VENDOR_ID_PANACOM || |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 264 | dev->subsystem_vendor == PCI_SUBVENDOR_ID_EXSYS) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 265 | irq_config = 0x43; |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 266 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | if ((dev->vendor == PCI_VENDOR_ID_PLX) && |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 268 | (dev->device == PCI_DEVICE_ID_PLX_ROMULUS)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | /* |
| 270 | * As the megawolf cards have the int pins active |
| 271 | * high, and have 2 UART chips, both ints must be |
| 272 | * enabled on the 9050. Also, the UARTS are set in |
| 273 | * 16450 mode by default, so we have to enable the |
| 274 | * 16C950 'enhanced' mode so that we can use the |
| 275 | * deep FIFOs |
| 276 | */ |
| 277 | irq_config = 0x5b; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | /* |
| 279 | * enable/disable interrupts |
| 280 | */ |
Christoph Hellwig | 4bdc0d6 | 2020-01-06 09:43:50 +0100 | [diff] [blame] | 281 | p = ioremap(pci_resource_start(dev, 0), 0x80); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 282 | if (p == NULL) |
| 283 | return -ENOMEM; |
| 284 | writel(irq_config, p + 0x4c); |
| 285 | |
| 286 | /* |
| 287 | * Read the register back to ensure that it took effect. |
| 288 | */ |
| 289 | readl(p + 0x4c); |
| 290 | iounmap(p); |
| 291 | |
| 292 | return 0; |
| 293 | } |
| 294 | |
Bill Pemberton | ae8d8a1 | 2012-11-19 13:26:18 -0500 | [diff] [blame] | 295 | static void pci_plx9050_exit(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 296 | { |
| 297 | u8 __iomem *p; |
| 298 | |
| 299 | if ((pci_resource_flags(dev, 0) & IORESOURCE_MEM) == 0) |
| 300 | return; |
| 301 | |
| 302 | /* |
| 303 | * disable interrupts |
| 304 | */ |
Christoph Hellwig | 4bdc0d6 | 2020-01-06 09:43:50 +0100 | [diff] [blame] | 305 | p = ioremap(pci_resource_start(dev, 0), 0x80); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 306 | if (p != NULL) { |
| 307 | writel(0, p + 0x4c); |
| 308 | |
| 309 | /* |
| 310 | * Read the register back to ensure that it took effect. |
| 311 | */ |
| 312 | readl(p + 0x4c); |
| 313 | iounmap(p); |
| 314 | } |
| 315 | } |
| 316 | |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 317 | #define NI8420_INT_ENABLE_REG 0x38 |
| 318 | #define NI8420_INT_ENABLE_BIT 0x2000 |
| 319 | |
Bill Pemberton | ae8d8a1 | 2012-11-19 13:26:18 -0500 | [diff] [blame] | 320 | static void pci_ni8420_exit(struct pci_dev *dev) |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 321 | { |
| 322 | void __iomem *p; |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 323 | unsigned int bar = 0; |
| 324 | |
| 325 | if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) { |
| 326 | moan_device("no memory in bar", dev); |
| 327 | return; |
| 328 | } |
| 329 | |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 330 | p = pci_ioremap_bar(dev, bar); |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 331 | if (p == NULL) |
| 332 | return; |
| 333 | |
| 334 | /* Disable the CPU Interrupt */ |
| 335 | writel(readl(p + NI8420_INT_ENABLE_REG) & ~(NI8420_INT_ENABLE_BIT), |
| 336 | p + NI8420_INT_ENABLE_REG); |
| 337 | iounmap(p); |
| 338 | } |
| 339 | |
| 340 | |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 341 | /* MITE registers */ |
| 342 | #define MITE_IOWBSR1 0xc4 |
| 343 | #define MITE_IOWCR1 0xf4 |
| 344 | #define MITE_LCIMR1 0x08 |
| 345 | #define MITE_LCIMR2 0x10 |
| 346 | |
| 347 | #define MITE_LCIMR2_CLR_CPU_IE (1 << 30) |
| 348 | |
Bill Pemberton | ae8d8a1 | 2012-11-19 13:26:18 -0500 | [diff] [blame] | 349 | static void pci_ni8430_exit(struct pci_dev *dev) |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 350 | { |
| 351 | void __iomem *p; |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 352 | unsigned int bar = 0; |
| 353 | |
| 354 | if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) { |
| 355 | moan_device("no memory in bar", dev); |
| 356 | return; |
| 357 | } |
| 358 | |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 359 | p = pci_ioremap_bar(dev, bar); |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 360 | if (p == NULL) |
| 361 | return; |
| 362 | |
| 363 | /* Disable the CPU Interrupt */ |
| 364 | writel(MITE_LCIMR2_CLR_CPU_IE, p + MITE_LCIMR2); |
| 365 | iounmap(p); |
| 366 | } |
| 367 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 368 | /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ |
| 369 | static int |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 370 | sbs_setup(struct serial_private *priv, const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 371 | struct uart_8250_port *port, int idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 372 | { |
| 373 | unsigned int bar, offset = board->first_offset; |
| 374 | |
| 375 | bar = 0; |
| 376 | |
| 377 | if (idx < 4) { |
| 378 | /* first four channels map to 0, 0x100, 0x200, 0x300 */ |
| 379 | offset += idx * board->uart_offset; |
| 380 | } else if (idx < 8) { |
| 381 | /* last four channels map to 0x1000, 0x1100, 0x1200, 0x1300 */ |
| 382 | offset += idx * board->uart_offset + 0xC00; |
| 383 | } else /* we have only 8 ports on PMC-OCTALPRO */ |
| 384 | return 1; |
| 385 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 386 | return setup_port(priv, port, bar, offset, board->reg_shift); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | } |
| 388 | |
| 389 | /* |
| 390 | * This does initialization for PMC OCTALPRO cards: |
| 391 | * maps the device memory, resets the UARTs (needed, bc |
| 392 | * if the module is removed and inserted again, the card |
| 393 | * is in the sleep mode) and enables global interrupt. |
| 394 | */ |
| 395 | |
| 396 | /* global control register offset for SBS PMC-OctalPro */ |
| 397 | #define OCT_REG_CR_OFF 0x500 |
| 398 | |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 399 | static int sbs_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 400 | { |
| 401 | u8 __iomem *p; |
| 402 | |
Arjan van de Ven | 24ed3ab | 2009-06-24 18:34:58 +0100 | [diff] [blame] | 403 | p = pci_ioremap_bar(dev, 0); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 404 | |
| 405 | if (p == NULL) |
| 406 | return -ENOMEM; |
| 407 | /* Set bit-4 Control Register (UART RESET) in to reset the uarts */ |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 408 | writeb(0x10, p + OCT_REG_CR_OFF); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 409 | udelay(50); |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 410 | writeb(0x0, p + OCT_REG_CR_OFF); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 411 | |
| 412 | /* Set bit-2 (INTENABLE) of Control Register */ |
| 413 | writeb(0x4, p + OCT_REG_CR_OFF); |
| 414 | iounmap(p); |
| 415 | |
| 416 | return 0; |
| 417 | } |
| 418 | |
| 419 | /* |
| 420 | * Disables the global interrupt of PMC-OctalPro |
| 421 | */ |
| 422 | |
Bill Pemberton | ae8d8a1 | 2012-11-19 13:26:18 -0500 | [diff] [blame] | 423 | static void sbs_exit(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 424 | { |
| 425 | u8 __iomem *p; |
| 426 | |
Arjan van de Ven | 24ed3ab | 2009-06-24 18:34:58 +0100 | [diff] [blame] | 427 | p = pci_ioremap_bar(dev, 0); |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 428 | /* FIXME: What if resource_len < OCT_REG_CR_OFF */ |
| 429 | if (p != NULL) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | writeb(0, p + OCT_REG_CR_OFF); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 431 | iounmap(p); |
| 432 | } |
| 433 | |
| 434 | /* |
| 435 | * SIIG serial cards have an PCI interface chip which also controls |
| 436 | * the UART clocking frequency. Each UART can be clocked independently |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 437 | * (except cards equipped with 4 UARTs) and initial clocking settings |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 438 | * are stored in the EEPROM chip. It can cause problems because this |
| 439 | * version of serial driver doesn't support differently clocked UART's |
| 440 | * on single PCI card. To prevent this, initialization functions set |
| 441 | * high frequency clocking for all UART's on given card. It is safe (I |
| 442 | * hope) because it doesn't touch EEPROM settings to prevent conflicts |
| 443 | * with other OSes (like M$ DOS). |
| 444 | * |
| 445 | * SIIG support added by Andrey Panin <pazke@donpac.ru>, 10/1999 |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 446 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 447 | * There is two family of SIIG serial cards with different PCI |
| 448 | * interface chip and different configuration methods: |
| 449 | * - 10x cards have control registers in IO and/or memory space; |
| 450 | * - 20x cards have control registers in standard PCI configuration space. |
| 451 | * |
Russell King | 67d74b8 | 2005-07-27 11:33:03 +0100 | [diff] [blame] | 452 | * Note: all 10x cards have PCI device ids 0x10.. |
| 453 | * all 20x cards have PCI device ids 0x20.. |
| 454 | * |
Andrey Panin | fbc0dc0 | 2005-07-18 11:38:09 +0100 | [diff] [blame] | 455 | * There are also Quartet Serial cards which use Oxford Semiconductor |
| 456 | * 16954 quad UART PCI chip clocked by 18.432 MHz quartz. |
| 457 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 458 | * Note: some SIIG cards are probed by the parport_serial object. |
| 459 | */ |
| 460 | |
| 461 | #define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc) |
| 462 | #define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8) |
| 463 | |
| 464 | static int pci_siig10x_init(struct pci_dev *dev) |
| 465 | { |
| 466 | u16 data; |
| 467 | void __iomem *p; |
| 468 | |
| 469 | switch (dev->device & 0xfff8) { |
| 470 | case PCI_DEVICE_ID_SIIG_1S_10x: /* 1S */ |
| 471 | data = 0xffdf; |
| 472 | break; |
| 473 | case PCI_DEVICE_ID_SIIG_2S_10x: /* 2S, 2S1P */ |
| 474 | data = 0xf7ff; |
| 475 | break; |
| 476 | default: /* 1S1P, 4S */ |
| 477 | data = 0xfffb; |
| 478 | break; |
| 479 | } |
| 480 | |
Christoph Hellwig | 4bdc0d6 | 2020-01-06 09:43:50 +0100 | [diff] [blame] | 481 | p = ioremap(pci_resource_start(dev, 0), 0x80); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 482 | if (p == NULL) |
| 483 | return -ENOMEM; |
| 484 | |
| 485 | writew(readw(p + 0x28) & data, p + 0x28); |
| 486 | readw(p + 0x28); |
| 487 | iounmap(p); |
| 488 | return 0; |
| 489 | } |
| 490 | |
| 491 | #define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc) |
| 492 | #define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc) |
| 493 | |
| 494 | static int pci_siig20x_init(struct pci_dev *dev) |
| 495 | { |
| 496 | u8 data; |
| 497 | |
| 498 | /* Change clock frequency for the first UART. */ |
| 499 | pci_read_config_byte(dev, 0x6f, &data); |
| 500 | pci_write_config_byte(dev, 0x6f, data & 0xef); |
| 501 | |
| 502 | /* If this card has 2 UART, we have to do the same with second UART. */ |
| 503 | if (((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S_20x) || |
| 504 | ((dev->device & 0xfffc) == PCI_DEVICE_ID_SIIG_2S1P_20x)) { |
| 505 | pci_read_config_byte(dev, 0x73, &data); |
| 506 | pci_write_config_byte(dev, 0x73, data & 0xef); |
| 507 | } |
| 508 | return 0; |
| 509 | } |
| 510 | |
Russell King | 67d74b8 | 2005-07-27 11:33:03 +0100 | [diff] [blame] | 511 | static int pci_siig_init(struct pci_dev *dev) |
| 512 | { |
| 513 | unsigned int type = dev->device & 0xff00; |
| 514 | |
| 515 | if (type == 0x1000) |
| 516 | return pci_siig10x_init(dev); |
Andy Shevchenko | 0187f88 | 2021-10-22 16:51:46 +0300 | [diff] [blame] | 517 | if (type == 0x2000) |
Russell King | 67d74b8 | 2005-07-27 11:33:03 +0100 | [diff] [blame] | 518 | return pci_siig20x_init(dev); |
| 519 | |
| 520 | moan_device("Unknown SIIG card", dev); |
| 521 | return -ENODEV; |
| 522 | } |
| 523 | |
Andrey Panin | 3ec9c59 | 2006-02-02 20:15:09 +0000 | [diff] [blame] | 524 | static int pci_siig_setup(struct serial_private *priv, |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 525 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 526 | struct uart_8250_port *port, int idx) |
Andrey Panin | 3ec9c59 | 2006-02-02 20:15:09 +0000 | [diff] [blame] | 527 | { |
| 528 | unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0; |
| 529 | |
| 530 | if (idx > 3) { |
| 531 | bar = 4; |
| 532 | offset = (idx - 4) * 8; |
| 533 | } |
| 534 | |
| 535 | return setup_port(priv, port, bar, offset, 0); |
| 536 | } |
| 537 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 538 | /* |
| 539 | * Timedia has an explosion of boards, and to avoid the PCI table from |
| 540 | * growing *huge*, we use this function to collapse some 70 entries |
| 541 | * in the PCI table into one, for sanity's and compactness's sake. |
| 542 | */ |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 543 | static const unsigned short timedia_single_port[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 544 | 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0 |
| 545 | }; |
| 546 | |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 547 | static const unsigned short timedia_dual_port[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 548 | 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 549 | 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, |
| 550 | 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 551 | 0x9137, 0x9138, 0x9237, 0x9238, 0xA079, 0xB079, 0xC079, |
| 552 | 0xD079, 0 |
| 553 | }; |
| 554 | |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 555 | static const unsigned short timedia_quad_port[] = { |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 556 | 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, |
| 557 | 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 558 | 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, |
| 559 | 0xB157, 0 |
| 560 | }; |
| 561 | |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 562 | static const unsigned short timedia_eight_port[] = { |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 563 | 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 564 | 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 |
| 565 | }; |
| 566 | |
Arjan van de Ven | cb3592b | 2005-11-28 21:04:11 +0000 | [diff] [blame] | 567 | static const struct timedia_struct { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 568 | int num; |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 569 | const unsigned short *ids; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 570 | } timedia_data[] = { |
| 571 | { 1, timedia_single_port }, |
| 572 | { 2, timedia_dual_port }, |
| 573 | { 4, timedia_quad_port }, |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 574 | { 8, timedia_eight_port } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 575 | }; |
| 576 | |
Frédéric Brière | b9b2455 | 2011-05-29 15:08:04 -0400 | [diff] [blame] | 577 | /* |
| 578 | * There are nearly 70 different Timedia/SUNIX PCI serial devices. Instead of |
| 579 | * listing them individually, this driver merely grabs them all with |
| 580 | * PCI_ANY_ID. Some of these devices, however, also feature a parallel port, |
| 581 | * and should be left free to be claimed by parport_serial instead. |
| 582 | */ |
| 583 | static int pci_timedia_probe(struct pci_dev *dev) |
| 584 | { |
| 585 | /* |
| 586 | * Check the third digit of the subdevice ID |
| 587 | * (0,2,3,5,6: serial only -- 7,8,9: serial + parallel) |
| 588 | */ |
| 589 | if ((dev->subsystem_device & 0x00f0) >= 0x70) { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 590 | pci_info(dev, "ignoring Timedia subdevice %04x for parport_serial\n", |
| 591 | dev->subsystem_device); |
Frédéric Brière | b9b2455 | 2011-05-29 15:08:04 -0400 | [diff] [blame] | 592 | return -ENODEV; |
| 593 | } |
| 594 | |
| 595 | return 0; |
| 596 | } |
| 597 | |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 598 | static int pci_timedia_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 599 | { |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 600 | const unsigned short *ids; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 601 | int i, j; |
| 602 | |
Helge Deller | e9422e0 | 2006-08-29 21:57:29 +0200 | [diff] [blame] | 603 | for (i = 0; i < ARRAY_SIZE(timedia_data); i++) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 604 | ids = timedia_data[i].ids; |
| 605 | for (j = 0; ids[j]; j++) |
| 606 | if (dev->subsystem_device == ids[j]) |
| 607 | return timedia_data[i].num; |
| 608 | } |
| 609 | return 0; |
| 610 | } |
| 611 | |
| 612 | /* |
| 613 | * Timedia/SUNIX uses a mixture of BARs and offsets |
| 614 | * Ugh, this is ugly as all hell --- TYT |
| 615 | */ |
| 616 | static int |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 617 | pci_timedia_setup(struct serial_private *priv, |
| 618 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 619 | struct uart_8250_port *port, int idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 620 | { |
| 621 | unsigned int bar = 0, offset = board->first_offset; |
| 622 | |
| 623 | switch (idx) { |
| 624 | case 0: |
| 625 | bar = 0; |
| 626 | break; |
| 627 | case 1: |
| 628 | offset = board->uart_offset; |
| 629 | bar = 0; |
| 630 | break; |
| 631 | case 2: |
| 632 | bar = 1; |
| 633 | break; |
| 634 | case 3: |
| 635 | offset = board->uart_offset; |
Gustavo A. R. Silva | df561f66 | 2020-08-23 17:36:59 -0500 | [diff] [blame] | 636 | fallthrough; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 637 | case 4: /* BAR 2 */ |
| 638 | case 5: /* BAR 3 */ |
| 639 | case 6: /* BAR 4 */ |
| 640 | case 7: /* BAR 5 */ |
| 641 | bar = idx - 2; |
| 642 | } |
| 643 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 644 | return setup_port(priv, port, bar, offset, board->reg_shift); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 645 | } |
| 646 | |
| 647 | /* |
| 648 | * Some Titan cards are also a little weird |
| 649 | */ |
| 650 | static int |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 651 | titan_400l_800l_setup(struct serial_private *priv, |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 652 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 653 | struct uart_8250_port *port, int idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 654 | { |
| 655 | unsigned int bar, offset = board->first_offset; |
| 656 | |
| 657 | switch (idx) { |
| 658 | case 0: |
| 659 | bar = 1; |
| 660 | break; |
| 661 | case 1: |
| 662 | bar = 2; |
| 663 | break; |
| 664 | default: |
| 665 | bar = 4; |
| 666 | offset = (idx - 2) * board->uart_offset; |
| 667 | } |
| 668 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 669 | return setup_port(priv, port, bar, offset, board->reg_shift); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 670 | } |
| 671 | |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 672 | static int pci_xircom_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 673 | { |
| 674 | msleep(100); |
| 675 | return 0; |
| 676 | } |
| 677 | |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 678 | static int pci_ni8420_init(struct pci_dev *dev) |
| 679 | { |
| 680 | void __iomem *p; |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 681 | unsigned int bar = 0; |
| 682 | |
| 683 | if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) { |
| 684 | moan_device("no memory in bar", dev); |
| 685 | return 0; |
| 686 | } |
| 687 | |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 688 | p = pci_ioremap_bar(dev, bar); |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 689 | if (p == NULL) |
| 690 | return -ENOMEM; |
| 691 | |
| 692 | /* Enable CPU Interrupt */ |
| 693 | writel(readl(p + NI8420_INT_ENABLE_REG) | NI8420_INT_ENABLE_BIT, |
| 694 | p + NI8420_INT_ENABLE_REG); |
| 695 | |
| 696 | iounmap(p); |
| 697 | return 0; |
| 698 | } |
| 699 | |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 700 | #define MITE_IOWBSR1_WSIZE 0xa |
| 701 | #define MITE_IOWBSR1_WIN_OFFSET 0x800 |
| 702 | #define MITE_IOWBSR1_WENAB (1 << 7) |
| 703 | #define MITE_LCIMR1_IO_IE_0 (1 << 24) |
| 704 | #define MITE_LCIMR2_SET_CPU_IE (1 << 31) |
| 705 | #define MITE_IOWCR1_RAMSEL_MASK 0xfffffffe |
| 706 | |
| 707 | static int pci_ni8430_init(struct pci_dev *dev) |
| 708 | { |
| 709 | void __iomem *p; |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 710 | struct pci_bus_region region; |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 711 | u32 device_window; |
| 712 | unsigned int bar = 0; |
| 713 | |
| 714 | if ((pci_resource_flags(dev, bar) & IORESOURCE_MEM) == 0) { |
| 715 | moan_device("no memory in bar", dev); |
| 716 | return 0; |
| 717 | } |
| 718 | |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 719 | p = pci_ioremap_bar(dev, bar); |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 720 | if (p == NULL) |
| 721 | return -ENOMEM; |
| 722 | |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 723 | /* |
| 724 | * Set device window address and size in BAR0, while acknowledging that |
| 725 | * the resource structure may contain a translated address that differs |
| 726 | * from the address the device responds to. |
| 727 | */ |
| 728 | pcibios_resource_to_bus(dev->bus, ®ion, &dev->resource[bar]); |
| 729 | device_window = ((region.start + MITE_IOWBSR1_WIN_OFFSET) & 0xffffff00) |
Anton Wuerfel | 6d7c157 | 2016-01-14 16:08:11 +0100 | [diff] [blame] | 730 | | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE; |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 731 | writel(device_window, p + MITE_IOWBSR1); |
| 732 | |
| 733 | /* Set window access to go to RAMSEL IO address space */ |
| 734 | writel((readl(p + MITE_IOWCR1) & MITE_IOWCR1_RAMSEL_MASK), |
| 735 | p + MITE_IOWCR1); |
| 736 | |
| 737 | /* Enable IO Bus Interrupt 0 */ |
| 738 | writel(MITE_LCIMR1_IO_IE_0, p + MITE_LCIMR1); |
| 739 | |
| 740 | /* Enable CPU Interrupt */ |
| 741 | writel(MITE_LCIMR2_SET_CPU_IE, p + MITE_LCIMR2); |
| 742 | |
| 743 | iounmap(p); |
| 744 | return 0; |
| 745 | } |
| 746 | |
| 747 | /* UART Port Control Register */ |
Je Yen Tam | 27ed14d | 2019-11-27 15:53:01 +0800 | [diff] [blame] | 748 | #define NI8430_PORTCON 0x0f |
| 749 | #define NI8430_PORTCON_TXVR_ENABLE (1 << 3) |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 750 | |
| 751 | static int |
Alan Cox | bf538fe | 2009-04-06 17:35:42 +0100 | [diff] [blame] | 752 | pci_ni8430_setup(struct serial_private *priv, |
| 753 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 754 | struct uart_8250_port *port, int idx) |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 755 | { |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 756 | struct pci_dev *dev = priv->dev; |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 757 | void __iomem *p; |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 758 | unsigned int bar, offset = board->first_offset; |
| 759 | |
| 760 | if (idx >= board->num_ports) |
| 761 | return 1; |
| 762 | |
| 763 | bar = FL_GET_BASE(board->flags); |
| 764 | offset += idx * board->uart_offset; |
| 765 | |
Aaron Sierra | 398a9db | 2014-10-30 19:49:45 -0500 | [diff] [blame] | 766 | p = pci_ioremap_bar(dev, bar); |
Aaron Sierra | 5d14bba | 2014-10-30 19:49:52 -0500 | [diff] [blame] | 767 | if (!p) |
| 768 | return -ENOMEM; |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 769 | |
Joe Perches | 7c9d440 | 2011-06-23 11:39:20 -0700 | [diff] [blame] | 770 | /* enable the transceiver */ |
Je Yen Tam | 27ed14d | 2019-11-27 15:53:01 +0800 | [diff] [blame] | 771 | writeb(readb(p + offset + NI8430_PORTCON) | NI8430_PORTCON_TXVR_ENABLE, |
| 772 | p + offset + NI8430_PORTCON); |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 773 | |
| 774 | iounmap(p); |
| 775 | |
| 776 | return setup_port(priv, port, bar, offset, board->reg_shift); |
| 777 | } |
| 778 | |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 779 | static int pci_netmos_9900_setup(struct serial_private *priv, |
| 780 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 781 | struct uart_8250_port *port, int idx) |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 782 | { |
| 783 | unsigned int bar; |
| 784 | |
Dmitry Eremin-Solenikov | 333c085 | 2014-02-11 14:18:13 +0400 | [diff] [blame] | 785 | if ((priv->dev->device != PCI_DEVICE_ID_NETMOS_9865) && |
| 786 | (priv->dev->subsystem_device & 0xff00) == 0x3000) { |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 787 | /* netmos apparently orders BARs by datasheet layout, so serial |
| 788 | * ports get BARs 0 and 3 (or 1 and 4 for memmapped) |
| 789 | */ |
| 790 | bar = 3 * idx; |
| 791 | |
| 792 | return setup_port(priv, port, bar, 0, board->reg_shift); |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 793 | } |
Andy Shevchenko | 0187f88 | 2021-10-22 16:51:46 +0300 | [diff] [blame] | 794 | |
| 795 | return pci_default_setup(priv, board, port, idx); |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 796 | } |
| 797 | |
| 798 | /* the 99xx series comes with a range of device IDs and a variety |
| 799 | * of capabilities: |
| 800 | * |
| 801 | * 9900 has varying capabilities and can cascade to sub-controllers |
| 802 | * (cascading should be purely internal) |
| 803 | * 9904 is hardwired with 4 serial ports |
| 804 | * 9912 and 9922 are hardwired with 2 serial ports |
| 805 | */ |
| 806 | static int pci_netmos_9900_numports(struct pci_dev *dev) |
| 807 | { |
| 808 | unsigned int c = dev->class; |
| 809 | unsigned int pi; |
| 810 | unsigned short sub_serports; |
| 811 | |
Anton Wuerfel | 149a44c | 2016-01-14 16:08:17 +0100 | [diff] [blame] | 812 | pi = c & 0xff; |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 813 | |
Anton Wuerfel | c2f5fde | 2016-01-14 16:08:14 +0100 | [diff] [blame] | 814 | if (pi == 2) |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 815 | return 1; |
Anton Wuerfel | c2f5fde | 2016-01-14 16:08:14 +0100 | [diff] [blame] | 816 | |
| 817 | if ((pi == 0) && (dev->device == PCI_DEVICE_ID_NETMOS_9900)) { |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 818 | /* two possibilities: 0x30ps encodes number of parallel and |
| 819 | * serial ports, or 0x1000 indicates *something*. This is not |
| 820 | * immediately obvious, since the 2s1p+4s configuration seems |
| 821 | * to offer all functionality on functions 0..2, while still |
| 822 | * advertising the same function 3 as the 4s+2s1p config. |
| 823 | */ |
| 824 | sub_serports = dev->subsystem_device & 0xf; |
Anton Wuerfel | c2f5fde | 2016-01-14 16:08:14 +0100 | [diff] [blame] | 825 | if (sub_serports > 0) |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 826 | return sub_serports; |
Anton Wuerfel | c2f5fde | 2016-01-14 16:08:14 +0100 | [diff] [blame] | 827 | |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 828 | pci_err(dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n"); |
Anton Wuerfel | c2f5fde | 2016-01-14 16:08:14 +0100 | [diff] [blame] | 829 | return 0; |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 830 | } |
| 831 | |
| 832 | moan_device("unknown NetMos/Mostech program interface", dev); |
| 833 | return 0; |
| 834 | } |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 835 | |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 836 | static int pci_netmos_init(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 837 | { |
| 838 | /* subdevice 0x00PS means <P> parallel, <S> serial */ |
| 839 | unsigned int num_serial = dev->subsystem_device & 0xf; |
| 840 | |
Ira W. Snyder | ac6ec5b | 2009-12-21 16:26:45 -0800 | [diff] [blame] | 841 | if ((dev->device == PCI_DEVICE_ID_NETMOS_9901) || |
| 842 | (dev->device == PCI_DEVICE_ID_NETMOS_9865)) |
Michael Buesch | c4285b4 | 2009-06-30 11:41:21 -0700 | [diff] [blame] | 843 | return 0; |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 844 | |
Jiri Slaby | 25cf9bc | 2009-01-15 13:30:34 +0000 | [diff] [blame] | 845 | if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM && |
| 846 | dev->subsystem_device == 0x0299) |
| 847 | return 0; |
| 848 | |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 849 | switch (dev->device) { /* FALLTHROUGH on all */ |
Anton Wuerfel | b3d6793 | 2016-01-14 16:08:23 +0100 | [diff] [blame] | 850 | case PCI_DEVICE_ID_NETMOS_9904: |
| 851 | case PCI_DEVICE_ID_NETMOS_9912: |
| 852 | case PCI_DEVICE_ID_NETMOS_9922: |
| 853 | case PCI_DEVICE_ID_NETMOS_9900: |
| 854 | num_serial = pci_netmos_9900_numports(dev); |
| 855 | break; |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 856 | |
Anton Wuerfel | b3d6793 | 2016-01-14 16:08:23 +0100 | [diff] [blame] | 857 | default: |
| 858 | break; |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 859 | } |
| 860 | |
Anton Wuerfel | 829b000 | 2016-01-14 16:08:22 +0100 | [diff] [blame] | 861 | if (num_serial == 0) { |
| 862 | moan_device("unknown NetMos/Mostech device", dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 863 | return -ENODEV; |
Anton Wuerfel | 829b000 | 2016-01-14 16:08:22 +0100 | [diff] [blame] | 864 | } |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 865 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 866 | return num_serial; |
| 867 | } |
| 868 | |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 869 | /* |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 870 | * These chips are available with optionally one parallel port and up to |
| 871 | * two serial ports. Unfortunately they all have the same product id. |
| 872 | * |
| 873 | * Basic configuration is done over a region of 32 I/O ports. The base |
| 874 | * ioport is called INTA or INTC, depending on docs/other drivers. |
| 875 | * |
| 876 | * The region of the 32 I/O ports is configured in POSIO0R... |
| 877 | */ |
| 878 | |
| 879 | /* registers */ |
| 880 | #define ITE_887x_MISCR 0x9c |
| 881 | #define ITE_887x_INTCBAR 0x78 |
| 882 | #define ITE_887x_UARTBAR 0x7c |
| 883 | #define ITE_887x_PS0BAR 0x10 |
| 884 | #define ITE_887x_POSIO0 0x60 |
| 885 | |
| 886 | /* I/O space size */ |
| 887 | #define ITE_887x_IOSIZE 32 |
| 888 | /* I/O space size (bits 26-24; 8 bytes = 011b) */ |
| 889 | #define ITE_887x_POSIO_IOSIZE_8 (3 << 24) |
| 890 | /* I/O space size (bits 26-24; 32 bytes = 101b) */ |
| 891 | #define ITE_887x_POSIO_IOSIZE_32 (5 << 24) |
| 892 | /* Decoding speed (1 = slow, 2 = medium, 3 = fast) */ |
| 893 | #define ITE_887x_POSIO_SPEED (3 << 29) |
| 894 | /* enable IO_Space bit */ |
| 895 | #define ITE_887x_POSIO_ENABLE (1 << 31) |
| 896 | |
Andy Shevchenko | 35b4f17 | 2021-10-22 16:51:45 +0300 | [diff] [blame] | 897 | /* inta_addr are the configuration addresses of the ITE */ |
| 898 | static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0, 0x200, 0x280 }; |
Ralf Baechle | f79abb8 | 2007-08-30 23:56:31 -0700 | [diff] [blame] | 899 | static int pci_ite887x_init(struct pci_dev *dev) |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 900 | { |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 901 | int ret, i, type; |
| 902 | struct resource *iobase = NULL; |
| 903 | u32 miscr, uartbar, ioport; |
| 904 | |
| 905 | /* search for the base-ioport */ |
Andy Shevchenko | 35b4f17 | 2021-10-22 16:51:45 +0300 | [diff] [blame] | 906 | for (i = 0; i < ARRAY_SIZE(inta_addr); i++) { |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 907 | iobase = request_region(inta_addr[i], ITE_887x_IOSIZE, |
| 908 | "ite887x"); |
| 909 | if (iobase != NULL) { |
| 910 | /* write POSIO0R - speed | size | ioport */ |
| 911 | pci_write_config_dword(dev, ITE_887x_POSIO0, |
| 912 | ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED | |
| 913 | ITE_887x_POSIO_IOSIZE_32 | inta_addr[i]); |
| 914 | /* write INTCBAR - ioport */ |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 915 | pci_write_config_dword(dev, ITE_887x_INTCBAR, |
| 916 | inta_addr[i]); |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 917 | ret = inb(inta_addr[i]); |
| 918 | if (ret != 0xff) { |
| 919 | /* ioport connected */ |
| 920 | break; |
| 921 | } |
| 922 | release_region(iobase->start, ITE_887x_IOSIZE); |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 923 | } |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 924 | } |
| 925 | |
Andy Shevchenko | 35b4f17 | 2021-10-22 16:51:45 +0300 | [diff] [blame] | 926 | if (i == ARRAY_SIZE(inta_addr)) { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 927 | pci_err(dev, "could not find iobase\n"); |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 928 | return -ENODEV; |
| 929 | } |
| 930 | |
| 931 | /* start of undocumented type checking (see parport_pc.c) */ |
| 932 | type = inb(iobase->start + 0x18) & 0x0f; |
| 933 | |
| 934 | switch (type) { |
| 935 | case 0x2: /* ITE8871 (1P) */ |
| 936 | case 0xa: /* ITE8875 (1P) */ |
| 937 | ret = 0; |
| 938 | break; |
| 939 | case 0xe: /* ITE8872 (2S1P) */ |
| 940 | ret = 2; |
| 941 | break; |
| 942 | case 0x6: /* ITE8873 (1S) */ |
| 943 | ret = 1; |
| 944 | break; |
| 945 | case 0x8: /* ITE8874 (2S) */ |
| 946 | ret = 2; |
| 947 | break; |
| 948 | default: |
| 949 | moan_device("Unknown ITE887x", dev); |
| 950 | ret = -ENODEV; |
| 951 | } |
| 952 | |
| 953 | /* configure all serial ports */ |
| 954 | for (i = 0; i < ret; i++) { |
| 955 | /* read the I/O port from the device */ |
| 956 | pci_read_config_dword(dev, ITE_887x_PS0BAR + (0x4 * (i + 1)), |
| 957 | &ioport); |
| 958 | ioport &= 0x0000FF00; /* the actual base address */ |
| 959 | pci_write_config_dword(dev, ITE_887x_POSIO0 + (0x4 * (i + 1)), |
| 960 | ITE_887x_POSIO_ENABLE | ITE_887x_POSIO_SPEED | |
| 961 | ITE_887x_POSIO_IOSIZE_8 | ioport); |
| 962 | |
| 963 | /* write the ioport to the UARTBAR */ |
| 964 | pci_read_config_dword(dev, ITE_887x_UARTBAR, &uartbar); |
| 965 | uartbar &= ~(0xffff << (16 * i)); /* clear half the reg */ |
| 966 | uartbar |= (ioport << (16 * i)); /* set the ioport */ |
| 967 | pci_write_config_dword(dev, ITE_887x_UARTBAR, uartbar); |
| 968 | |
| 969 | /* get current config */ |
| 970 | pci_read_config_dword(dev, ITE_887x_MISCR, &miscr); |
| 971 | /* disable interrupts (UARTx_Routing[3:0]) */ |
| 972 | miscr &= ~(0xf << (12 - 4 * i)); |
| 973 | /* activate the UART (UARTx_En) */ |
| 974 | miscr |= 1 << (23 - i); |
| 975 | /* write new config with activated UART */ |
| 976 | pci_write_config_dword(dev, ITE_887x_MISCR, miscr); |
| 977 | } |
| 978 | |
| 979 | if (ret <= 0) { |
| 980 | /* the device has no UARTs if we get here */ |
| 981 | release_region(iobase->start, ITE_887x_IOSIZE); |
| 982 | } |
| 983 | |
| 984 | return ret; |
| 985 | } |
| 986 | |
Bill Pemberton | ae8d8a1 | 2012-11-19 13:26:18 -0500 | [diff] [blame] | 987 | static void pci_ite887x_exit(struct pci_dev *dev) |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 988 | { |
| 989 | u32 ioport; |
| 990 | /* the ioport is bit 0-15 in POSIO0R */ |
| 991 | pci_read_config_dword(dev, ITE_887x_POSIO0, &ioport); |
| 992 | ioport &= 0xffff; |
| 993 | release_region(ioport, ITE_887x_IOSIZE); |
| 994 | } |
| 995 | |
Russell King | 9f2a036 | 2009-01-02 13:44:20 +0000 | [diff] [blame] | 996 | /* |
Mike Skoog | 1bc8cde | 2014-10-16 13:10:01 -0700 | [diff] [blame] | 997 | * EndRun Technologies. |
| 998 | * Determine the number of ports available on the device. |
| 999 | */ |
| 1000 | #define PCI_VENDOR_ID_ENDRUN 0x7401 |
| 1001 | #define PCI_DEVICE_ID_ENDRUN_1588 0xe100 |
| 1002 | |
| 1003 | static int pci_endrun_init(struct pci_dev *dev) |
| 1004 | { |
| 1005 | u8 __iomem *p; |
| 1006 | unsigned long deviceID; |
| 1007 | unsigned int number_uarts = 0; |
| 1008 | |
| 1009 | /* EndRun device is all 0xexxx */ |
| 1010 | if (dev->vendor == PCI_VENDOR_ID_ENDRUN && |
| 1011 | (dev->device & 0xf000) != 0xe000) |
| 1012 | return 0; |
| 1013 | |
| 1014 | p = pci_iomap(dev, 0, 5); |
| 1015 | if (p == NULL) |
| 1016 | return -ENOMEM; |
| 1017 | |
| 1018 | deviceID = ioread32(p); |
| 1019 | /* EndRun device */ |
| 1020 | if (deviceID == 0x07000200) { |
| 1021 | number_uarts = ioread8(p + 4); |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 1022 | pci_dbg(dev, "%d ports detected on EndRun PCI Express device\n", number_uarts); |
Mike Skoog | 1bc8cde | 2014-10-16 13:10:01 -0700 | [diff] [blame] | 1023 | } |
| 1024 | pci_iounmap(dev, p); |
| 1025 | return number_uarts; |
| 1026 | } |
| 1027 | |
| 1028 | /* |
Russell King | 9f2a036 | 2009-01-02 13:44:20 +0000 | [diff] [blame] | 1029 | * Oxford Semiconductor Inc. |
| 1030 | * Check that device is part of the Tornado range of devices, then determine |
| 1031 | * the number of ports available on the device. |
| 1032 | */ |
| 1033 | static int pci_oxsemi_tornado_init(struct pci_dev *dev) |
| 1034 | { |
| 1035 | u8 __iomem *p; |
| 1036 | unsigned long deviceID; |
| 1037 | unsigned int number_uarts = 0; |
| 1038 | |
| 1039 | /* OxSemi Tornado devices are all 0xCxxx */ |
| 1040 | if (dev->vendor == PCI_VENDOR_ID_OXSEMI && |
| 1041 | (dev->device & 0xF000) != 0xC000) |
| 1042 | return 0; |
| 1043 | |
| 1044 | p = pci_iomap(dev, 0, 5); |
| 1045 | if (p == NULL) |
| 1046 | return -ENOMEM; |
| 1047 | |
| 1048 | deviceID = ioread32(p); |
| 1049 | /* Tornado device */ |
| 1050 | if (deviceID == 0x07000200) { |
| 1051 | number_uarts = ioread8(p + 4); |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 1052 | pci_dbg(dev, "%d ports detected on Oxford PCI Express device\n", number_uarts); |
Russell King | 9f2a036 | 2009-01-02 13:44:20 +0000 | [diff] [blame] | 1053 | } |
| 1054 | pci_iounmap(dev, p); |
| 1055 | return number_uarts; |
| 1056 | } |
| 1057 | |
Alan Cox | eb26dfe | 2012-07-12 13:00:31 +0100 | [diff] [blame] | 1058 | static int pci_asix_setup(struct serial_private *priv, |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 1059 | const struct pciserial_board *board, |
Alan Cox | eb26dfe | 2012-07-12 13:00:31 +0100 | [diff] [blame] | 1060 | struct uart_8250_port *port, int idx) |
| 1061 | { |
| 1062 | port->bugs |= UART_BUG_PARITY; |
| 1063 | return pci_default_setup(priv, board, port, idx); |
| 1064 | } |
| 1065 | |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1066 | #define QPCR_TEST_FOR1 0x3F |
| 1067 | #define QPCR_TEST_GET1 0x00 |
| 1068 | #define QPCR_TEST_FOR2 0x40 |
| 1069 | #define QPCR_TEST_GET2 0x40 |
| 1070 | #define QPCR_TEST_FOR3 0x80 |
| 1071 | #define QPCR_TEST_GET3 0x40 |
| 1072 | #define QPCR_TEST_FOR4 0xC0 |
| 1073 | #define QPCR_TEST_GET4 0x80 |
| 1074 | |
| 1075 | #define QOPR_CLOCK_X1 0x0000 |
| 1076 | #define QOPR_CLOCK_X2 0x0001 |
| 1077 | #define QOPR_CLOCK_X4 0x0002 |
| 1078 | #define QOPR_CLOCK_X8 0x0003 |
| 1079 | #define QOPR_CLOCK_RATE_MASK 0x0003 |
| 1080 | |
Andy Shevchenko | 4290242 | 2021-10-26 16:34:51 +0300 | [diff] [blame^] | 1081 | /* Quatech devices have their own extra interface features */ |
| 1082 | static struct pci_device_id quatech_cards[] = { |
| 1083 | { PCI_DEVICE_DATA(QUATECH, QSC100, 1) }, |
| 1084 | { PCI_DEVICE_DATA(QUATECH, DSC100, 1) }, |
| 1085 | { PCI_DEVICE_DATA(QUATECH, DSC100E, 0) }, |
| 1086 | { PCI_DEVICE_DATA(QUATECH, DSC200, 1) }, |
| 1087 | { PCI_DEVICE_DATA(QUATECH, DSC200E, 0) }, |
| 1088 | { PCI_DEVICE_DATA(QUATECH, ESC100D, 1) }, |
| 1089 | { PCI_DEVICE_DATA(QUATECH, ESC100M, 1) }, |
| 1090 | { PCI_DEVICE_DATA(QUATECH, QSCP100, 1) }, |
| 1091 | { PCI_DEVICE_DATA(QUATECH, DSCP100, 1) }, |
| 1092 | { PCI_DEVICE_DATA(QUATECH, QSCP200, 1) }, |
| 1093 | { PCI_DEVICE_DATA(QUATECH, DSCP200, 1) }, |
| 1094 | { PCI_DEVICE_DATA(QUATECH, ESCLP100, 0) }, |
| 1095 | { PCI_DEVICE_DATA(QUATECH, QSCLP100, 0) }, |
| 1096 | { PCI_DEVICE_DATA(QUATECH, DSCLP100, 0) }, |
| 1097 | { PCI_DEVICE_DATA(QUATECH, SSCLP100, 0) }, |
| 1098 | { PCI_DEVICE_DATA(QUATECH, QSCLP200, 0) }, |
| 1099 | { PCI_DEVICE_DATA(QUATECH, DSCLP200, 0) }, |
| 1100 | { PCI_DEVICE_DATA(QUATECH, SSCLP200, 0) }, |
| 1101 | { PCI_DEVICE_DATA(QUATECH, SPPXP_100, 0) }, |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1102 | { 0, } |
| 1103 | }; |
| 1104 | |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1105 | static int pci_quatech_rqopr(struct uart_8250_port *port) |
| 1106 | { |
| 1107 | unsigned long base = port->port.iobase; |
| 1108 | u8 LCR, val; |
| 1109 | |
| 1110 | LCR = inb(base + UART_LCR); |
| 1111 | outb(0xBF, base + UART_LCR); |
| 1112 | val = inb(base + UART_SCR); |
| 1113 | outb(LCR, base + UART_LCR); |
| 1114 | return val; |
| 1115 | } |
| 1116 | |
| 1117 | static void pci_quatech_wqopr(struct uart_8250_port *port, u8 qopr) |
| 1118 | { |
| 1119 | unsigned long base = port->port.iobase; |
Jiri Slaby | 17b2720 | 2016-06-23 13:34:22 +0200 | [diff] [blame] | 1120 | u8 LCR; |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1121 | |
| 1122 | LCR = inb(base + UART_LCR); |
| 1123 | outb(0xBF, base + UART_LCR); |
Jiri Slaby | 17b2720 | 2016-06-23 13:34:22 +0200 | [diff] [blame] | 1124 | inb(base + UART_SCR); |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1125 | outb(qopr, base + UART_SCR); |
| 1126 | outb(LCR, base + UART_LCR); |
| 1127 | } |
| 1128 | |
| 1129 | static int pci_quatech_rqmcr(struct uart_8250_port *port) |
| 1130 | { |
| 1131 | unsigned long base = port->port.iobase; |
| 1132 | u8 LCR, val, qmcr; |
| 1133 | |
| 1134 | LCR = inb(base + UART_LCR); |
| 1135 | outb(0xBF, base + UART_LCR); |
| 1136 | val = inb(base + UART_SCR); |
| 1137 | outb(val | 0x10, base + UART_SCR); |
| 1138 | qmcr = inb(base + UART_MCR); |
| 1139 | outb(val, base + UART_SCR); |
| 1140 | outb(LCR, base + UART_LCR); |
| 1141 | |
| 1142 | return qmcr; |
| 1143 | } |
| 1144 | |
| 1145 | static void pci_quatech_wqmcr(struct uart_8250_port *port, u8 qmcr) |
| 1146 | { |
| 1147 | unsigned long base = port->port.iobase; |
| 1148 | u8 LCR, val; |
| 1149 | |
| 1150 | LCR = inb(base + UART_LCR); |
| 1151 | outb(0xBF, base + UART_LCR); |
| 1152 | val = inb(base + UART_SCR); |
| 1153 | outb(val | 0x10, base + UART_SCR); |
| 1154 | outb(qmcr, base + UART_MCR); |
| 1155 | outb(val, base + UART_SCR); |
| 1156 | outb(LCR, base + UART_LCR); |
| 1157 | } |
| 1158 | |
| 1159 | static int pci_quatech_has_qmcr(struct uart_8250_port *port) |
| 1160 | { |
| 1161 | unsigned long base = port->port.iobase; |
| 1162 | u8 LCR, val; |
| 1163 | |
| 1164 | LCR = inb(base + UART_LCR); |
| 1165 | outb(0xBF, base + UART_LCR); |
| 1166 | val = inb(base + UART_SCR); |
| 1167 | if (val & 0x20) { |
| 1168 | outb(0x80, UART_LCR); |
| 1169 | if (!(inb(UART_SCR) & 0x20)) { |
| 1170 | outb(LCR, base + UART_LCR); |
| 1171 | return 1; |
| 1172 | } |
| 1173 | } |
| 1174 | return 0; |
| 1175 | } |
| 1176 | |
| 1177 | static int pci_quatech_test(struct uart_8250_port *port) |
| 1178 | { |
Anton Wuerfel | 1a33e34 | 2016-01-14 16:08:10 +0100 | [diff] [blame] | 1179 | u8 reg, qopr; |
| 1180 | |
| 1181 | qopr = pci_quatech_rqopr(port); |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1182 | pci_quatech_wqopr(port, qopr & QPCR_TEST_FOR1); |
| 1183 | reg = pci_quatech_rqopr(port) & 0xC0; |
| 1184 | if (reg != QPCR_TEST_GET1) |
| 1185 | return -EINVAL; |
| 1186 | pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR2); |
| 1187 | reg = pci_quatech_rqopr(port) & 0xC0; |
| 1188 | if (reg != QPCR_TEST_GET2) |
| 1189 | return -EINVAL; |
| 1190 | pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR3); |
| 1191 | reg = pci_quatech_rqopr(port) & 0xC0; |
| 1192 | if (reg != QPCR_TEST_GET3) |
| 1193 | return -EINVAL; |
| 1194 | pci_quatech_wqopr(port, (qopr & QPCR_TEST_FOR1)|QPCR_TEST_FOR4); |
| 1195 | reg = pci_quatech_rqopr(port) & 0xC0; |
| 1196 | if (reg != QPCR_TEST_GET4) |
| 1197 | return -EINVAL; |
| 1198 | |
| 1199 | pci_quatech_wqopr(port, qopr); |
| 1200 | return 0; |
| 1201 | } |
| 1202 | |
| 1203 | static int pci_quatech_clock(struct uart_8250_port *port) |
| 1204 | { |
| 1205 | u8 qopr, reg, set; |
| 1206 | unsigned long clock; |
| 1207 | |
| 1208 | if (pci_quatech_test(port) < 0) |
| 1209 | return 1843200; |
| 1210 | |
| 1211 | qopr = pci_quatech_rqopr(port); |
| 1212 | |
| 1213 | pci_quatech_wqopr(port, qopr & ~QOPR_CLOCK_X8); |
| 1214 | reg = pci_quatech_rqopr(port); |
| 1215 | if (reg & QOPR_CLOCK_X8) { |
| 1216 | clock = 1843200; |
| 1217 | goto out; |
| 1218 | } |
| 1219 | pci_quatech_wqopr(port, qopr | QOPR_CLOCK_X8); |
| 1220 | reg = pci_quatech_rqopr(port); |
| 1221 | if (!(reg & QOPR_CLOCK_X8)) { |
| 1222 | clock = 1843200; |
| 1223 | goto out; |
| 1224 | } |
| 1225 | reg &= QOPR_CLOCK_X8; |
| 1226 | if (reg == QOPR_CLOCK_X2) { |
| 1227 | clock = 3685400; |
| 1228 | set = QOPR_CLOCK_X2; |
| 1229 | } else if (reg == QOPR_CLOCK_X4) { |
| 1230 | clock = 7372800; |
| 1231 | set = QOPR_CLOCK_X4; |
| 1232 | } else if (reg == QOPR_CLOCK_X8) { |
| 1233 | clock = 14745600; |
| 1234 | set = QOPR_CLOCK_X8; |
| 1235 | } else { |
| 1236 | clock = 1843200; |
| 1237 | set = QOPR_CLOCK_X1; |
| 1238 | } |
| 1239 | qopr &= ~QOPR_CLOCK_RATE_MASK; |
| 1240 | qopr |= set; |
| 1241 | |
| 1242 | out: |
| 1243 | pci_quatech_wqopr(port, qopr); |
| 1244 | return clock; |
| 1245 | } |
| 1246 | |
| 1247 | static int pci_quatech_rs422(struct uart_8250_port *port) |
| 1248 | { |
| 1249 | u8 qmcr; |
| 1250 | int rs422 = 0; |
| 1251 | |
| 1252 | if (!pci_quatech_has_qmcr(port)) |
| 1253 | return 0; |
| 1254 | qmcr = pci_quatech_rqmcr(port); |
| 1255 | pci_quatech_wqmcr(port, 0xFF); |
| 1256 | if (pci_quatech_rqmcr(port)) |
| 1257 | rs422 = 1; |
| 1258 | pci_quatech_wqmcr(port, qmcr); |
| 1259 | return rs422; |
| 1260 | } |
| 1261 | |
| 1262 | static int pci_quatech_init(struct pci_dev *dev) |
| 1263 | { |
Andy Shevchenko | 4290242 | 2021-10-26 16:34:51 +0300 | [diff] [blame^] | 1264 | const struct pci_device_id *match; |
| 1265 | bool amcc = false; |
| 1266 | |
| 1267 | match = pci_match_id(quatech_cards, dev); |
| 1268 | if (match) |
| 1269 | amcc = match->driver_data; |
| 1270 | else |
| 1271 | pci_err(dev, "unknown port type '0x%04X'.\n", dev->device); |
| 1272 | |
| 1273 | if (amcc) { |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1274 | unsigned long base = pci_resource_start(dev, 0); |
| 1275 | if (base) { |
| 1276 | u32 tmp; |
Anton Wuerfel | 1a33e34 | 2016-01-14 16:08:10 +0100 | [diff] [blame] | 1277 | |
Jonathan Woithe | 9c5320f | 2013-12-09 16:33:08 +1030 | [diff] [blame] | 1278 | outl(inl(base + 0x38) | 0x00002000, base + 0x38); |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1279 | tmp = inl(base + 0x3c); |
| 1280 | outl(tmp | 0x01000000, base + 0x3c); |
Jonathan Woithe | 9c5320f | 2013-12-09 16:33:08 +1030 | [diff] [blame] | 1281 | outl(tmp &= ~0x01000000, base + 0x3c); |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1282 | } |
| 1283 | } |
| 1284 | return 0; |
| 1285 | } |
| 1286 | |
| 1287 | static int pci_quatech_setup(struct serial_private *priv, |
| 1288 | const struct pciserial_board *board, |
| 1289 | struct uart_8250_port *port, int idx) |
| 1290 | { |
| 1291 | /* Needed by pci_quatech calls below */ |
| 1292 | port->port.iobase = pci_resource_start(priv->dev, FL_GET_BASE(board->flags)); |
| 1293 | /* Set up the clocking */ |
| 1294 | port->port.uartclk = pci_quatech_clock(port); |
| 1295 | /* For now just warn about RS422 */ |
| 1296 | if (pci_quatech_rs422(port)) |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 1297 | pci_warn(priv->dev, "software control of RS422 features not currently supported.\n"); |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1298 | return pci_default_setup(priv, board, port, idx); |
| 1299 | } |
| 1300 | |
Greg Kroah-Hartman | d73dfc6 | 2013-01-15 22:44:48 -0800 | [diff] [blame] | 1301 | static void pci_quatech_exit(struct pci_dev *dev) |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 1302 | { |
| 1303 | } |
| 1304 | |
Alan Cox | eb26dfe | 2012-07-12 13:00:31 +0100 | [diff] [blame] | 1305 | static int pci_default_setup(struct serial_private *priv, |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 1306 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1307 | struct uart_8250_port *port, int idx) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1308 | { |
| 1309 | unsigned int bar, offset = board->first_offset, maxnr; |
| 1310 | |
| 1311 | bar = FL_GET_BASE(board->flags); |
| 1312 | if (board->flags & FL_BASE_BARS) |
| 1313 | bar += idx; |
| 1314 | else |
| 1315 | offset += idx * board->uart_offset; |
| 1316 | |
Greg Kroah-Hartman | 2427ddd | 2006-06-12 17:07:52 -0700 | [diff] [blame] | 1317 | maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >> |
| 1318 | (board->reg_shift + 3); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1319 | |
| 1320 | if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) |
| 1321 | return 1; |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 1322 | |
Russell King | 70db3d9 | 2005-07-27 11:34:27 +0100 | [diff] [blame] | 1323 | return setup_port(priv, port, bar, offset, board->reg_shift); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1324 | } |
kbuild test robot | 607ea69 | 2019-06-18 19:23:51 +0800 | [diff] [blame] | 1325 | static void |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 1326 | pericom_do_set_divisor(struct uart_port *port, unsigned int baud, |
| 1327 | unsigned int quot, unsigned int quot_frac) |
| 1328 | { |
| 1329 | int scr; |
| 1330 | int lcr; |
| 1331 | int actual_baud; |
| 1332 | int tolerance; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1333 | |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 1334 | for (scr = 5 ; scr <= 15 ; scr++) { |
| 1335 | actual_baud = 921600 * 16 / scr; |
| 1336 | tolerance = actual_baud / 50; |
| 1337 | |
| 1338 | if ((baud < actual_baud + tolerance) && |
| 1339 | (baud > actual_baud - tolerance)) { |
| 1340 | |
| 1341 | lcr = serial_port_in(port, UART_LCR); |
| 1342 | serial_port_out(port, UART_LCR, lcr | 0x80); |
| 1343 | |
| 1344 | serial_port_out(port, UART_DLL, 1); |
| 1345 | serial_port_out(port, UART_DLM, 0); |
| 1346 | serial_port_out(port, 2, 16 - scr); |
| 1347 | serial_port_out(port, UART_LCR, lcr); |
| 1348 | return; |
| 1349 | } else if (baud > actual_baud) { |
| 1350 | break; |
| 1351 | } |
| 1352 | } |
| 1353 | serial8250_do_set_divisor(port, baud, quot, quot_frac); |
| 1354 | } |
Angelo Butti | 5c31ef9 | 2016-11-07 16:39:03 +0100 | [diff] [blame] | 1355 | static int pci_pericom_setup(struct serial_private *priv, |
| 1356 | const struct pciserial_board *board, |
| 1357 | struct uart_8250_port *port, int idx) |
| 1358 | { |
| 1359 | unsigned int bar, offset = board->first_offset, maxnr; |
| 1360 | |
| 1361 | bar = FL_GET_BASE(board->flags); |
| 1362 | if (board->flags & FL_BASE_BARS) |
| 1363 | bar += idx; |
| 1364 | else |
| 1365 | offset += idx * board->uart_offset; |
| 1366 | |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 1367 | |
| 1368 | maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >> |
| 1369 | (board->reg_shift + 3); |
| 1370 | |
| 1371 | if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) |
| 1372 | return 1; |
| 1373 | |
| 1374 | port->port.set_divisor = pericom_do_set_divisor; |
| 1375 | |
| 1376 | return setup_port(priv, port, bar, offset, board->reg_shift); |
| 1377 | } |
| 1378 | |
| 1379 | static int pci_pericom_setup_four_at_eight(struct serial_private *priv, |
| 1380 | const struct pciserial_board *board, |
| 1381 | struct uart_8250_port *port, int idx) |
| 1382 | { |
| 1383 | unsigned int bar, offset = board->first_offset, maxnr; |
| 1384 | |
| 1385 | bar = FL_GET_BASE(board->flags); |
| 1386 | if (board->flags & FL_BASE_BARS) |
| 1387 | bar += idx; |
| 1388 | else |
| 1389 | offset += idx * board->uart_offset; |
| 1390 | |
Angelo Butti | 5c31ef9 | 2016-11-07 16:39:03 +0100 | [diff] [blame] | 1391 | if (idx==3) |
| 1392 | offset = 0x38; |
| 1393 | |
| 1394 | maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >> |
| 1395 | (board->reg_shift + 3); |
| 1396 | |
| 1397 | if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr) |
| 1398 | return 1; |
| 1399 | |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 1400 | port->port.set_divisor = pericom_do_set_divisor; |
| 1401 | |
Angelo Butti | 5c31ef9 | 2016-11-07 16:39:03 +0100 | [diff] [blame] | 1402 | return setup_port(priv, port, bar, offset, board->reg_shift); |
| 1403 | } |
| 1404 | |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 1405 | static int |
| 1406 | ce4100_serial_setup(struct serial_private *priv, |
| 1407 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1408 | struct uart_8250_port *port, int idx) |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 1409 | { |
| 1410 | int ret; |
| 1411 | |
Maxime Bizon | 08ec212 | 2012-10-19 10:45:07 +0200 | [diff] [blame] | 1412 | ret = setup_port(priv, port, idx, 0, board->reg_shift); |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1413 | port->port.iotype = UPIO_MEM32; |
| 1414 | port->port.type = PORT_XSCALE; |
| 1415 | port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE); |
| 1416 | port->port.regshift = 2; |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 1417 | |
| 1418 | return ret; |
| 1419 | } |
| 1420 | |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 1421 | static int |
| 1422 | pci_omegapci_setup(struct serial_private *priv, |
Alan Cox | 1798ca1 | 2011-05-24 12:35:48 +0100 | [diff] [blame] | 1423 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1424 | struct uart_8250_port *port, int idx) |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 1425 | { |
| 1426 | return setup_port(priv, port, 2, idx * 8, 0); |
| 1427 | } |
| 1428 | |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 1429 | static int |
| 1430 | pci_brcm_trumanage_setup(struct serial_private *priv, |
| 1431 | const struct pciserial_board *board, |
| 1432 | struct uart_8250_port *port, int idx) |
| 1433 | { |
| 1434 | int ret = pci_default_setup(priv, board, port, idx); |
| 1435 | |
| 1436 | port->port.type = PORT_BRCM_TRUMANAGE; |
| 1437 | port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE); |
| 1438 | return ret; |
| 1439 | } |
| 1440 | |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1441 | /* RTS will control by MCR if this bit is 0 */ |
| 1442 | #define FINTEK_RTS_CONTROL_BY_HW BIT(4) |
| 1443 | /* only worked with FINTEK_RTS_CONTROL_BY_HW on */ |
| 1444 | #define FINTEK_RTS_INVERT BIT(5) |
| 1445 | |
| 1446 | /* We should do proper H/W transceiver setting before change to RS485 mode */ |
| 1447 | static int pci_fintek_rs485_config(struct uart_port *port, |
| 1448 | struct serial_rs485 *rs485) |
| 1449 | { |
Geliang Tang | 30c6c35 | 2015-12-27 22:29:42 +0800 | [diff] [blame] | 1450 | struct pci_dev *pci_dev = to_pci_dev(port->dev); |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1451 | u8 setting; |
| 1452 | u8 *index = (u8 *) port->private_data; |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1453 | |
| 1454 | pci_read_config_byte(pci_dev, 0x40 + 8 * *index + 7, &setting); |
| 1455 | |
Peter Hung | d315945 | 2015-08-05 14:44:53 +0800 | [diff] [blame] | 1456 | if (!rs485) |
| 1457 | rs485 = &port->rs485; |
| 1458 | else if (rs485->flags & SER_RS485_ENABLED) |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1459 | memset(rs485->padding, 0, sizeof(rs485->padding)); |
| 1460 | else |
| 1461 | memset(rs485, 0, sizeof(*rs485)); |
| 1462 | |
| 1463 | /* F81504/508/512 not support RTS delay before or after send */ |
| 1464 | rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND; |
| 1465 | |
| 1466 | if (rs485->flags & SER_RS485_ENABLED) { |
| 1467 | /* Enable RTS H/W control mode */ |
| 1468 | setting |= FINTEK_RTS_CONTROL_BY_HW; |
| 1469 | |
| 1470 | if (rs485->flags & SER_RS485_RTS_ON_SEND) { |
| 1471 | /* RTS driving high on TX */ |
| 1472 | setting &= ~FINTEK_RTS_INVERT; |
| 1473 | } else { |
| 1474 | /* RTS driving low on TX */ |
| 1475 | setting |= FINTEK_RTS_INVERT; |
| 1476 | } |
| 1477 | |
| 1478 | rs485->delay_rts_after_send = 0; |
| 1479 | rs485->delay_rts_before_send = 0; |
| 1480 | } else { |
| 1481 | /* Disable RTS H/W control mode */ |
| 1482 | setting &= ~(FINTEK_RTS_CONTROL_BY_HW | FINTEK_RTS_INVERT); |
| 1483 | } |
| 1484 | |
| 1485 | pci_write_config_byte(pci_dev, 0x40 + 8 * *index + 7, setting); |
Peter Hung | d315945 | 2015-08-05 14:44:53 +0800 | [diff] [blame] | 1486 | |
| 1487 | if (rs485 != &port->rs485) |
| 1488 | port->rs485 = *rs485; |
| 1489 | |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1490 | return 0; |
| 1491 | } |
| 1492 | |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1493 | static int pci_fintek_setup(struct serial_private *priv, |
| 1494 | const struct pciserial_board *board, |
| 1495 | struct uart_8250_port *port, int idx) |
| 1496 | { |
| 1497 | struct pci_dev *pdev = priv->dev; |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1498 | u8 *data; |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1499 | u8 config_base; |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1500 | u16 iobase; |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1501 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1502 | config_base = 0x40 + 0x08 * idx; |
| 1503 | |
| 1504 | /* Get the io address from configuration space */ |
| 1505 | pci_read_config_word(pdev, config_base + 4, &iobase); |
| 1506 | |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 1507 | pci_dbg(pdev, "idx=%d iobase=0x%x", idx, iobase); |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1508 | |
| 1509 | port->port.iotype = UPIO_PORT; |
| 1510 | port->port.iobase = iobase; |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1511 | port->port.rs485_config = pci_fintek_rs485_config; |
| 1512 | |
| 1513 | data = devm_kzalloc(&pdev->dev, sizeof(u8), GFP_KERNEL); |
| 1514 | if (!data) |
| 1515 | return -ENOMEM; |
| 1516 | |
| 1517 | /* preserve index in PCI configuration space */ |
| 1518 | *data = idx; |
| 1519 | port->port.private_data = data; |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1520 | |
| 1521 | return 0; |
| 1522 | } |
| 1523 | |
| 1524 | static int pci_fintek_init(struct pci_dev *dev) |
| 1525 | { |
| 1526 | unsigned long iobase; |
| 1527 | u32 max_port, i; |
Ji-Ze Hong (Peter Hong) | 6def047 | 2016-12-23 09:41:20 +0800 | [diff] [blame] | 1528 | resource_size_t bar_data[3]; |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1529 | u8 config_base; |
Peter Hung | d315945 | 2015-08-05 14:44:53 +0800 | [diff] [blame] | 1530 | struct serial_private *priv = pci_get_drvdata(dev); |
| 1531 | struct uart_8250_port *port; |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1532 | |
Ji-Ze Hong (Peter Hong) | 6def047 | 2016-12-23 09:41:20 +0800 | [diff] [blame] | 1533 | if (!(pci_resource_flags(dev, 5) & IORESOURCE_IO) || |
| 1534 | !(pci_resource_flags(dev, 4) & IORESOURCE_IO) || |
| 1535 | !(pci_resource_flags(dev, 3) & IORESOURCE_IO)) |
| 1536 | return -ENODEV; |
| 1537 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1538 | switch (dev->device) { |
| 1539 | case 0x1104: /* 4 ports */ |
| 1540 | case 0x1108: /* 8 ports */ |
| 1541 | max_port = dev->device & 0xff; |
Peter Hung | cb8ee9f | 2014-11-19 13:22:27 +0800 | [diff] [blame] | 1542 | break; |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1543 | case 0x1112: /* 12 ports */ |
| 1544 | max_port = 12; |
Peter Hung | cb8ee9f | 2014-11-19 13:22:27 +0800 | [diff] [blame] | 1545 | break; |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1546 | default: |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1547 | return -EINVAL; |
| 1548 | } |
| 1549 | |
Peter Hung | cb8ee9f | 2014-11-19 13:22:27 +0800 | [diff] [blame] | 1550 | /* Get the io address dispatch from the BIOS */ |
Ji-Ze Hong (Peter Hong) | 6def047 | 2016-12-23 09:41:20 +0800 | [diff] [blame] | 1551 | bar_data[0] = pci_resource_start(dev, 5); |
| 1552 | bar_data[1] = pci_resource_start(dev, 4); |
| 1553 | bar_data[2] = pci_resource_start(dev, 3); |
Peter Hung | cb8ee9f | 2014-11-19 13:22:27 +0800 | [diff] [blame] | 1554 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1555 | for (i = 0; i < max_port; ++i) { |
| 1556 | /* UART0 configuration offset start from 0x40 */ |
| 1557 | config_base = 0x40 + 0x08 * i; |
Peter Hung | cb8ee9f | 2014-11-19 13:22:27 +0800 | [diff] [blame] | 1558 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1559 | /* Calculate Real IO Port */ |
| 1560 | iobase = (bar_data[i / 4] & 0xffffffe0) + (i % 4) * 8; |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1561 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1562 | /* Enable UART I/O port */ |
| 1563 | pci_write_config_byte(dev, config_base + 0x00, 0x01); |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1564 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1565 | /* Select 128-byte FIFO and 8x FIFO threshold */ |
| 1566 | pci_write_config_byte(dev, config_base + 0x01, 0x33); |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1567 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1568 | /* LSB UART */ |
| 1569 | pci_write_config_byte(dev, config_base + 0x04, |
| 1570 | (u8)(iobase & 0xff)); |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1571 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1572 | /* MSB UART */ |
| 1573 | pci_write_config_byte(dev, config_base + 0x05, |
| 1574 | (u8)((iobase & 0xff00) >> 8)); |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1575 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1576 | pci_write_config_byte(dev, config_base + 0x06, dev->irq); |
Peter Hung | fecf27a | 2015-07-28 11:59:24 +0800 | [diff] [blame] | 1577 | |
Peter Hung | d315945 | 2015-08-05 14:44:53 +0800 | [diff] [blame] | 1578 | if (priv) { |
| 1579 | /* re-apply RS232/485 mode when |
| 1580 | * pciserial_resume_ports() |
| 1581 | */ |
| 1582 | port = serial8250_get_port(priv->line[i]); |
| 1583 | pci_fintek_rs485_config(&port->port, NULL); |
| 1584 | } else { |
| 1585 | /* First init without port data |
| 1586 | * force init to RS232 Mode |
| 1587 | */ |
| 1588 | pci_write_config_byte(dev, config_base + 0x07, 0x01); |
| 1589 | } |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1590 | } |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1591 | |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 1592 | return max_port; |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 1593 | } |
| 1594 | |
Ji-Ze Hong (Peter Hong) | 68e26a8 | 2019-08-16 13:27:29 +0800 | [diff] [blame] | 1595 | static void f815xxa_mem_serial_out(struct uart_port *p, int offset, int value) |
| 1596 | { |
| 1597 | struct f815xxa_data *data = p->private_data; |
| 1598 | unsigned long flags; |
| 1599 | |
| 1600 | spin_lock_irqsave(&data->lock, flags); |
| 1601 | writeb(value, p->membase + offset); |
| 1602 | readb(p->membase + UART_SCR); /* Dummy read for flush pcie tx queue */ |
| 1603 | spin_unlock_irqrestore(&data->lock, flags); |
| 1604 | } |
| 1605 | |
| 1606 | static int pci_fintek_f815xxa_setup(struct serial_private *priv, |
| 1607 | const struct pciserial_board *board, |
| 1608 | struct uart_8250_port *port, int idx) |
| 1609 | { |
| 1610 | struct pci_dev *pdev = priv->dev; |
| 1611 | struct f815xxa_data *data; |
| 1612 | |
| 1613 | data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); |
| 1614 | if (!data) |
| 1615 | return -ENOMEM; |
| 1616 | |
| 1617 | data->idx = idx; |
| 1618 | spin_lock_init(&data->lock); |
| 1619 | |
| 1620 | port->port.private_data = data; |
| 1621 | port->port.iotype = UPIO_MEM; |
| 1622 | port->port.flags |= UPF_IOREMAP; |
| 1623 | port->port.mapbase = pci_resource_start(pdev, 0) + 8 * idx; |
| 1624 | port->port.serial_out = f815xxa_mem_serial_out; |
| 1625 | |
| 1626 | return 0; |
| 1627 | } |
| 1628 | |
| 1629 | static int pci_fintek_f815xxa_init(struct pci_dev *dev) |
| 1630 | { |
| 1631 | u32 max_port, i; |
| 1632 | int config_base; |
| 1633 | |
| 1634 | if (!(pci_resource_flags(dev, 0) & IORESOURCE_MEM)) |
| 1635 | return -ENODEV; |
| 1636 | |
| 1637 | switch (dev->device) { |
| 1638 | case 0x1204: /* 4 ports */ |
| 1639 | case 0x1208: /* 8 ports */ |
| 1640 | max_port = dev->device & 0xff; |
| 1641 | break; |
| 1642 | case 0x1212: /* 12 ports */ |
| 1643 | max_port = 12; |
| 1644 | break; |
| 1645 | default: |
| 1646 | return -EINVAL; |
| 1647 | } |
| 1648 | |
| 1649 | /* Set to mmio decode */ |
| 1650 | pci_write_config_byte(dev, 0x209, 0x40); |
| 1651 | |
| 1652 | for (i = 0; i < max_port; ++i) { |
| 1653 | /* UART0 configuration offset start from 0x2A0 */ |
| 1654 | config_base = 0x2A0 + 0x08 * i; |
| 1655 | |
| 1656 | /* Select 128-byte FIFO and 8x FIFO threshold */ |
| 1657 | pci_write_config_byte(dev, config_base + 0x01, 0x33); |
| 1658 | |
| 1659 | /* Enable UART I/O port */ |
| 1660 | pci_write_config_byte(dev, config_base + 0, 0x01); |
| 1661 | } |
| 1662 | |
| 1663 | return max_port; |
| 1664 | } |
| 1665 | |
Mauro Carvalho Chehab | b6adea3 | 2009-02-20 15:38:52 -0800 | [diff] [blame] | 1666 | static int skip_tx_en_setup(struct serial_private *priv, |
| 1667 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1668 | struct uart_8250_port *port, int idx) |
Mauro Carvalho Chehab | b6adea3 | 2009-02-20 15:38:52 -0800 | [diff] [blame] | 1669 | { |
Andy Shevchenko | c7ac15c | 2017-07-25 20:39:58 +0300 | [diff] [blame] | 1670 | port->port.quirks |= UPQ_NO_TXEN_TEST; |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 1671 | pci_dbg(priv->dev, |
Greg Kroah-Hartman | af8c5b8 | 2013-09-28 13:01:59 -0700 | [diff] [blame] | 1672 | "serial8250: skipping TxEn test for device [%04x:%04x] subsystem [%04x:%04x]\n", |
| 1673 | priv->dev->vendor, priv->dev->device, |
| 1674 | priv->dev->subsystem_vendor, priv->dev->subsystem_device); |
Mauro Carvalho Chehab | b6adea3 | 2009-02-20 15:38:52 -0800 | [diff] [blame] | 1675 | |
| 1676 | return pci_default_setup(priv, board, port, idx); |
| 1677 | } |
| 1678 | |
Sudhakar Mamillapalli | 0ad372b | 2012-04-10 14:10:58 -0700 | [diff] [blame] | 1679 | static void kt_handle_break(struct uart_port *p) |
| 1680 | { |
Andy Shevchenko | b1261c8 | 2014-07-14 14:26:14 +0300 | [diff] [blame] | 1681 | struct uart_8250_port *up = up_to_u8250p(p); |
Sudhakar Mamillapalli | 0ad372b | 2012-04-10 14:10:58 -0700 | [diff] [blame] | 1682 | /* |
| 1683 | * On receipt of a BI, serial device in Intel ME (Intel |
| 1684 | * management engine) needs to have its fifos cleared for sane |
| 1685 | * SOL (Serial Over Lan) output. |
| 1686 | */ |
| 1687 | serial8250_clear_and_reinit_fifos(up); |
| 1688 | } |
| 1689 | |
| 1690 | static unsigned int kt_serial_in(struct uart_port *p, int offset) |
| 1691 | { |
Andy Shevchenko | b1261c8 | 2014-07-14 14:26:14 +0300 | [diff] [blame] | 1692 | struct uart_8250_port *up = up_to_u8250p(p); |
Sudhakar Mamillapalli | 0ad372b | 2012-04-10 14:10:58 -0700 | [diff] [blame] | 1693 | unsigned int val; |
| 1694 | |
| 1695 | /* |
| 1696 | * When the Intel ME (management engine) gets reset its serial |
| 1697 | * port registers could return 0 momentarily. Functions like |
| 1698 | * serial8250_console_write, read and save the IER, perform |
| 1699 | * some operation and then restore it. In order to avoid |
| 1700 | * setting IER register inadvertently to 0, if the value read |
| 1701 | * is 0, double check with ier value in uart_8250_port and use |
| 1702 | * that instead. up->ier should be the same value as what is |
| 1703 | * currently configured. |
| 1704 | */ |
| 1705 | val = inb(p->iobase + offset); |
| 1706 | if (offset == UART_IER) { |
| 1707 | if (val == 0) |
| 1708 | val = up->ier; |
| 1709 | } |
| 1710 | return val; |
| 1711 | } |
| 1712 | |
Dan Williams | bc02d15 | 2012-04-06 11:49:50 -0700 | [diff] [blame] | 1713 | static int kt_serial_setup(struct serial_private *priv, |
| 1714 | const struct pciserial_board *board, |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1715 | struct uart_8250_port *port, int idx) |
Dan Williams | bc02d15 | 2012-04-06 11:49:50 -0700 | [diff] [blame] | 1716 | { |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 1717 | port->port.flags |= UPF_BUG_THRE; |
| 1718 | port->port.serial_in = kt_serial_in; |
| 1719 | port->port.handle_break = kt_handle_break; |
Dan Williams | bc02d15 | 2012-04-06 11:49:50 -0700 | [diff] [blame] | 1720 | return skip_tx_en_setup(priv, board, port, idx); |
| 1721 | } |
| 1722 | |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 1723 | static int pci_eg20t_init(struct pci_dev *dev) |
| 1724 | { |
| 1725 | #if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE) |
| 1726 | return -ENODEV; |
| 1727 | #else |
| 1728 | return 0; |
| 1729 | #endif |
| 1730 | } |
| 1731 | |
Matt Schulte | dc96efb | 2012-11-19 09:12:04 -0600 | [diff] [blame] | 1732 | static int |
Guainluca Anzolin | 6971c63 | 2012-09-04 15:56:12 +0100 | [diff] [blame] | 1733 | pci_wch_ch353_setup(struct serial_private *priv, |
Anton Wuerfel | 6d7c157 | 2016-01-14 16:08:11 +0100 | [diff] [blame] | 1734 | const struct pciserial_board *board, |
| 1735 | struct uart_8250_port *port, int idx) |
Guainluca Anzolin | 6971c63 | 2012-09-04 15:56:12 +0100 | [diff] [blame] | 1736 | { |
| 1737 | port->port.flags |= UPF_FIXED_TYPE; |
| 1738 | port->port.type = PORT_16550A; |
Søren Holm | 0631534 | 2011-09-02 22:55:37 +0200 | [diff] [blame] | 1739 | return pci_default_setup(priv, board, port, idx); |
| 1740 | } |
| 1741 | |
Sergej Pupykin | 2fdd8c8 | 2014-11-06 14:36:31 +0300 | [diff] [blame] | 1742 | static int |
Alexandr Petrenko | 55c368c | 2016-05-23 10:04:54 +0300 | [diff] [blame] | 1743 | pci_wch_ch355_setup(struct serial_private *priv, |
| 1744 | const struct pciserial_board *board, |
| 1745 | struct uart_8250_port *port, int idx) |
| 1746 | { |
| 1747 | port->port.flags |= UPF_FIXED_TYPE; |
| 1748 | port->port.type = PORT_16550A; |
| 1749 | return pci_default_setup(priv, board, port, idx); |
| 1750 | } |
| 1751 | |
| 1752 | static int |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 1753 | pci_wch_ch38x_setup(struct serial_private *priv, |
Anton Wuerfel | 6d7c157 | 2016-01-14 16:08:11 +0100 | [diff] [blame] | 1754 | const struct pciserial_board *board, |
| 1755 | struct uart_8250_port *port, int idx) |
Sergej Pupykin | 2fdd8c8 | 2014-11-06 14:36:31 +0300 | [diff] [blame] | 1756 | { |
| 1757 | port->port.flags |= UPF_FIXED_TYPE; |
| 1758 | port->port.type = PORT_16850; |
| 1759 | return pci_default_setup(priv, board, port, idx); |
| 1760 | } |
| 1761 | |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 1762 | |
| 1763 | #define CH384_XINT_ENABLE_REG 0xEB |
| 1764 | #define CH384_XINT_ENABLE_BIT 0x02 |
| 1765 | |
| 1766 | static int pci_wch_ch38x_init(struct pci_dev *dev) |
| 1767 | { |
| 1768 | int max_port; |
| 1769 | unsigned long iobase; |
| 1770 | |
| 1771 | |
| 1772 | switch (dev->device) { |
| 1773 | case 0x3853: /* 8 ports */ |
| 1774 | max_port = 8; |
| 1775 | break; |
| 1776 | default: |
| 1777 | return -EINVAL; |
| 1778 | } |
| 1779 | |
| 1780 | iobase = pci_resource_start(dev, 0); |
| 1781 | outb(CH384_XINT_ENABLE_BIT, iobase + CH384_XINT_ENABLE_REG); |
| 1782 | |
| 1783 | return max_port; |
| 1784 | } |
| 1785 | |
| 1786 | static void pci_wch_ch38x_exit(struct pci_dev *dev) |
| 1787 | { |
| 1788 | unsigned long iobase; |
| 1789 | |
| 1790 | iobase = pci_resource_start(dev, 0); |
| 1791 | outb(0x0, iobase + CH384_XINT_ENABLE_REG); |
| 1792 | } |
| 1793 | |
| 1794 | |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 1795 | static int |
| 1796 | pci_sunix_setup(struct serial_private *priv, |
| 1797 | const struct pciserial_board *board, |
| 1798 | struct uart_8250_port *port, int idx) |
| 1799 | { |
| 1800 | int bar; |
| 1801 | int offset; |
| 1802 | |
| 1803 | port->port.flags |= UPF_FIXED_TYPE; |
| 1804 | port->port.type = PORT_SUNIX; |
| 1805 | |
| 1806 | if (idx < 4) { |
| 1807 | bar = 0; |
| 1808 | offset = idx * board->uart_offset; |
| 1809 | } else { |
| 1810 | bar = 1; |
| 1811 | idx -= 4; |
| 1812 | idx = div_s64_rem(idx, 4, &offset); |
| 1813 | offset = idx * 64 + offset * board->uart_offset; |
| 1814 | } |
| 1815 | |
| 1816 | return setup_port(priv, port, bar, offset, 0); |
| 1817 | } |
| 1818 | |
Kai-Heng Feng | d193db7 | 2019-08-17 00:51:24 +0800 | [diff] [blame] | 1819 | static int |
| 1820 | pci_moxa_setup(struct serial_private *priv, |
| 1821 | const struct pciserial_board *board, |
| 1822 | struct uart_8250_port *port, int idx) |
| 1823 | { |
| 1824 | unsigned int bar = FL_GET_BASE(board->flags); |
| 1825 | int offset; |
| 1826 | |
| 1827 | if (board->num_ports == 4 && idx == 3) |
| 1828 | offset = 7 * board->uart_offset; |
| 1829 | else |
| 1830 | offset = idx * board->uart_offset; |
| 1831 | |
| 1832 | return setup_port(priv, port, bar, offset, 0); |
| 1833 | } |
| 1834 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1835 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B |
| 1836 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B |
| 1837 | #define PCI_DEVICE_ID_OCTPRO 0x0001 |
| 1838 | #define PCI_SUBDEVICE_ID_OCTPRO232 0x0108 |
| 1839 | #define PCI_SUBDEVICE_ID_OCTPRO422 0x0208 |
| 1840 | #define PCI_SUBDEVICE_ID_POCTAL232 0x0308 |
| 1841 | #define PCI_SUBDEVICE_ID_POCTAL422 0x0408 |
Flavio Leitner | 26e8220 | 2012-09-21 21:04:34 -0300 | [diff] [blame] | 1842 | #define PCI_SUBDEVICE_ID_SIIG_DUAL_00 0x2500 |
| 1843 | #define PCI_SUBDEVICE_ID_SIIG_DUAL_30 0x2530 |
Michael Bramer | 78d70d4 | 2009-01-27 11:51:16 +0000 | [diff] [blame] | 1844 | #define PCI_VENDOR_ID_ADVANTECH 0x13fe |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 1845 | #define PCI_DEVICE_ID_INTEL_CE4100_UART 0x2e66 |
Michael Bramer | 78d70d4 | 2009-01-27 11:51:16 +0000 | [diff] [blame] | 1846 | #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 |
Thomee Wright | 0c6d774 | 2014-05-19 20:30:51 +0000 | [diff] [blame] | 1847 | #define PCI_DEVICE_ID_ADVANTECH_PCI3618 0x3618 |
| 1848 | #define PCI_DEVICE_ID_ADVANTECH_PCIf618 0xf618 |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 1849 | #define PCI_DEVICE_ID_TITAN_200I 0x8028 |
| 1850 | #define PCI_DEVICE_ID_TITAN_400I 0x8048 |
| 1851 | #define PCI_DEVICE_ID_TITAN_800I 0x8088 |
| 1852 | #define PCI_DEVICE_ID_TITAN_800EH 0xA007 |
| 1853 | #define PCI_DEVICE_ID_TITAN_800EHB 0xA008 |
| 1854 | #define PCI_DEVICE_ID_TITAN_400EH 0xA009 |
| 1855 | #define PCI_DEVICE_ID_TITAN_100E 0xA010 |
| 1856 | #define PCI_DEVICE_ID_TITAN_200E 0xA012 |
| 1857 | #define PCI_DEVICE_ID_TITAN_400E 0xA013 |
| 1858 | #define PCI_DEVICE_ID_TITAN_800E 0xA014 |
| 1859 | #define PCI_DEVICE_ID_TITAN_200EI 0xA016 |
| 1860 | #define PCI_DEVICE_ID_TITAN_200EISI 0xA017 |
Yegor Yefremov | 48c0247 | 2013-12-09 12:11:15 +0100 | [diff] [blame] | 1861 | #define PCI_DEVICE_ID_TITAN_200V3 0xA306 |
Yegor Yefremov | 1e9deb1 | 2011-12-27 15:47:37 +0100 | [diff] [blame] | 1862 | #define PCI_DEVICE_ID_TITAN_400V3 0xA310 |
| 1863 | #define PCI_DEVICE_ID_TITAN_410V3 0xA312 |
| 1864 | #define PCI_DEVICE_ID_TITAN_800V3 0xA314 |
| 1865 | #define PCI_DEVICE_ID_TITAN_800V3B 0xA315 |
Lytochkin Boris | e847003 | 2010-07-26 10:02:26 +0400 | [diff] [blame] | 1866 | #define PCI_DEVICE_ID_OXSEMI_16PCI958 0x9538 |
Scott Kilau | aa273ae | 2011-05-11 15:41:59 -0500 | [diff] [blame] | 1867 | #define PCIE_DEVICE_ID_NEO_2_OX_IBM 0x00F6 |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 1868 | #define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001 |
Dan Williams | bc02d15 | 2012-04-06 11:49:50 -0700 | [diff] [blame] | 1869 | #define PCI_DEVICE_ID_INTEL_PATSBURG_KT 0x1d3d |
Alan Cox | 27788c5 | 2012-09-04 16:21:06 +0100 | [diff] [blame] | 1870 | #define PCI_VENDOR_ID_WCH 0x4348 |
Wang YanQing | 8b5c913 | 2013-03-05 23:16:48 +0800 | [diff] [blame] | 1871 | #define PCI_DEVICE_ID_WCH_CH352_2S 0x3253 |
Alan Cox | 27788c5 | 2012-09-04 16:21:06 +0100 | [diff] [blame] | 1872 | #define PCI_DEVICE_ID_WCH_CH353_4S 0x3453 |
| 1873 | #define PCI_DEVICE_ID_WCH_CH353_2S1PF 0x5046 |
Ezequiel Garcia | feb5814 | 2014-05-24 15:24:51 -0300 | [diff] [blame] | 1874 | #define PCI_DEVICE_ID_WCH_CH353_1S1P 0x5053 |
Alan Cox | 27788c5 | 2012-09-04 16:21:06 +0100 | [diff] [blame] | 1875 | #define PCI_DEVICE_ID_WCH_CH353_2S1P 0x7053 |
Alexandr Petrenko | 55c368c | 2016-05-23 10:04:54 +0300 | [diff] [blame] | 1876 | #define PCI_DEVICE_ID_WCH_CH355_4S 0x7173 |
Alan Cox | 6683549 | 2012-08-16 12:01:33 +0100 | [diff] [blame] | 1877 | #define PCI_VENDOR_ID_AGESTAR 0x5372 |
| 1878 | #define PCI_DEVICE_ID_AGESTAR_9375 0x6872 |
Alan Cox | eb26dfe | 2012-07-12 13:00:31 +0100 | [diff] [blame] | 1879 | #define PCI_VENDOR_ID_ASIX 0x9710 |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 1880 | #define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a |
Ian Abbott | 57c1f0e | 2013-07-16 16:14:40 +0100 | [diff] [blame] | 1881 | #define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e |
Matt Schulte | 14faa8c | 2012-11-21 10:35:15 -0600 | [diff] [blame] | 1882 | |
Sergej Pupykin | 2fdd8c8 | 2014-11-06 14:36:31 +0300 | [diff] [blame] | 1883 | #define PCIE_VENDOR_ID_WCH 0x1c00 |
| 1884 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 1885 | #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 1886 | #define PCIE_DEVICE_ID_WCH_CH384_8S 0x3853 |
Jeremy McNicoll | 7dde557 | 2016-02-02 13:00:45 -0800 | [diff] [blame] | 1887 | #define PCIE_DEVICE_ID_WCH_CH382_2S 0x3253 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1888 | |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 1889 | #define PCI_VENDOR_ID_ACCESIO 0x494f |
| 1890 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SDB 0x1051 |
| 1891 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2S 0x1053 |
| 1892 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB 0x105C |
| 1893 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4S 0x105E |
| 1894 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_2DB 0x1091 |
| 1895 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_2 0x1093 |
| 1896 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB 0x1099 |
| 1897 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_4 0x109B |
| 1898 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SMDB 0x10D1 |
| 1899 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2SM 0x10D3 |
| 1900 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB 0x10DA |
| 1901 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4SM 0x10DC |
| 1902 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_1 0x1108 |
| 1903 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_2 0x1110 |
| 1904 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_2 0x1111 |
| 1905 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4 0x1118 |
| 1906 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_4 0x1119 |
| 1907 | #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2S 0x1152 |
| 1908 | #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4S 0x115A |
| 1909 | #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_2 0x1190 |
| 1910 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_2 0x1191 |
| 1911 | #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4 0x1198 |
| 1912 | #define PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_4 0x1199 |
| 1913 | #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2SM 0x11D0 |
| 1914 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM422_4 0x105A |
| 1915 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM485_4 0x105B |
| 1916 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM422_8 0x106A |
| 1917 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM485_8 0x106B |
| 1918 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4 0x1098 |
| 1919 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM232_8 0x10A9 |
| 1920 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SM 0x10D9 |
| 1921 | #define PCI_DEVICE_ID_ACCESIO_PCIE_COM_8SM 0x10E9 |
| 1922 | #define PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM 0x11D8 |
| 1923 | |
| 1924 | |
Kai-Heng Feng | d193db7 | 2019-08-17 00:51:24 +0800 | [diff] [blame] | 1925 | #define PCI_DEVICE_ID_MOXA_CP102E 0x1024 |
| 1926 | #define PCI_DEVICE_ID_MOXA_CP102EL 0x1025 |
| 1927 | #define PCI_DEVICE_ID_MOXA_CP104EL_A 0x1045 |
| 1928 | #define PCI_DEVICE_ID_MOXA_CP114EL 0x1144 |
| 1929 | #define PCI_DEVICE_ID_MOXA_CP116E_A_A 0x1160 |
| 1930 | #define PCI_DEVICE_ID_MOXA_CP116E_A_B 0x1161 |
| 1931 | #define PCI_DEVICE_ID_MOXA_CP118EL_A 0x1182 |
| 1932 | #define PCI_DEVICE_ID_MOXA_CP118E_A_I 0x1183 |
| 1933 | #define PCI_DEVICE_ID_MOXA_CP132EL 0x1322 |
| 1934 | #define PCI_DEVICE_ID_MOXA_CP134EL_A 0x1342 |
| 1935 | #define PCI_DEVICE_ID_MOXA_CP138E_A 0x1381 |
| 1936 | #define PCI_DEVICE_ID_MOXA_CP168EL_A 0x1683 |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 1937 | |
Catalin(ux) M BOIE | b76c5a0 | 2008-07-23 21:29:46 -0700 | [diff] [blame] | 1938 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ |
| 1939 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 |
Scott Ashcroft | d13402a | 2013-03-03 21:35:06 +0000 | [diff] [blame] | 1940 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 |
Catalin(ux) M BOIE | b76c5a0 | 2008-07-23 21:29:46 -0700 | [diff] [blame] | 1941 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1942 | /* |
| 1943 | * Master list of serial port init/setup/exit quirks. |
| 1944 | * This does not describe the general nature of the port. |
| 1945 | * (ie, baud base, number and location of ports, etc) |
| 1946 | * |
| 1947 | * This list is ordered alphabetically by vendor then device. |
| 1948 | * Specific entries must come before more generic entries. |
| 1949 | */ |
Geert Uytterhoeven | c3ae3dc | 2020-12-11 14:39:07 +0100 | [diff] [blame] | 1950 | static struct pci_serial_quirk pci_serial_quirks[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1951 | /* |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 1952 | * ADDI-DATA GmbH communication cards <info@addi-data.com> |
| 1953 | */ |
| 1954 | { |
Ian Abbott | 086231f | 2013-07-16 16:14:39 +0100 | [diff] [blame] | 1955 | .vendor = PCI_VENDOR_ID_AMCC, |
Ian Abbott | 57c1f0e | 2013-07-16 16:14:40 +0100 | [diff] [blame] | 1956 | .device = PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800, |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 1957 | .subvendor = PCI_ANY_ID, |
| 1958 | .subdevice = PCI_ANY_ID, |
| 1959 | .setup = addidata_apci7800_setup, |
| 1960 | }, |
| 1961 | /* |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 1962 | * AFAVLAB cards - these may be called via parport_serial |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1963 | * It is not clear whether this applies to all products. |
| 1964 | */ |
| 1965 | { |
| 1966 | .vendor = PCI_VENDOR_ID_AFAVLAB, |
| 1967 | .device = PCI_ANY_ID, |
| 1968 | .subvendor = PCI_ANY_ID, |
| 1969 | .subdevice = PCI_ANY_ID, |
| 1970 | .setup = afavlab_setup, |
| 1971 | }, |
| 1972 | /* |
| 1973 | * HP Diva |
| 1974 | */ |
| 1975 | { |
| 1976 | .vendor = PCI_VENDOR_ID_HP, |
| 1977 | .device = PCI_DEVICE_ID_HP_DIVA, |
| 1978 | .subvendor = PCI_ANY_ID, |
| 1979 | .subdevice = PCI_ANY_ID, |
| 1980 | .init = pci_hp_diva_init, |
| 1981 | .setup = pci_hp_diva_setup, |
| 1982 | }, |
| 1983 | /* |
Randy Wright | e0e2420 | 2021-05-14 10:26:54 -0600 | [diff] [blame] | 1984 | * HPE PCI serial device |
| 1985 | */ |
| 1986 | { |
| 1987 | .vendor = PCI_VENDOR_ID_HP_3PAR, |
| 1988 | .device = PCI_DEVICE_ID_HPE_PCI_SERIAL, |
| 1989 | .subvendor = PCI_ANY_ID, |
| 1990 | .subdevice = PCI_ANY_ID, |
| 1991 | .setup = pci_hp_diva_setup, |
| 1992 | }, |
| 1993 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1994 | * Intel |
| 1995 | */ |
| 1996 | { |
| 1997 | .vendor = PCI_VENDOR_ID_INTEL, |
| 1998 | .device = PCI_DEVICE_ID_INTEL_80960_RP, |
| 1999 | .subvendor = 0xe4bf, |
| 2000 | .subdevice = PCI_ANY_ID, |
| 2001 | .init = pci_inteli960ni_init, |
| 2002 | .setup = pci_default_setup, |
| 2003 | }, |
Mauro Carvalho Chehab | b6adea3 | 2009-02-20 15:38:52 -0800 | [diff] [blame] | 2004 | { |
| 2005 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2006 | .device = PCI_DEVICE_ID_INTEL_8257X_SOL, |
| 2007 | .subvendor = PCI_ANY_ID, |
| 2008 | .subdevice = PCI_ANY_ID, |
| 2009 | .setup = skip_tx_en_setup, |
| 2010 | }, |
| 2011 | { |
| 2012 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2013 | .device = PCI_DEVICE_ID_INTEL_82573L_SOL, |
| 2014 | .subvendor = PCI_ANY_ID, |
| 2015 | .subdevice = PCI_ANY_ID, |
| 2016 | .setup = skip_tx_en_setup, |
| 2017 | }, |
| 2018 | { |
| 2019 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2020 | .device = PCI_DEVICE_ID_INTEL_82573E_SOL, |
| 2021 | .subvendor = PCI_ANY_ID, |
| 2022 | .subdevice = PCI_ANY_ID, |
| 2023 | .setup = skip_tx_en_setup, |
| 2024 | }, |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 2025 | { |
| 2026 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2027 | .device = PCI_DEVICE_ID_INTEL_CE4100_UART, |
| 2028 | .subvendor = PCI_ANY_ID, |
| 2029 | .subdevice = PCI_ANY_ID, |
| 2030 | .setup = ce4100_serial_setup, |
| 2031 | }, |
Dan Williams | bc02d15 | 2012-04-06 11:49:50 -0700 | [diff] [blame] | 2032 | { |
| 2033 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2034 | .device = PCI_DEVICE_ID_INTEL_PATSBURG_KT, |
| 2035 | .subvendor = PCI_ANY_ID, |
| 2036 | .subdevice = PCI_ANY_ID, |
| 2037 | .setup = kt_serial_setup, |
| 2038 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2039 | /* |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 2040 | * ITE |
| 2041 | */ |
| 2042 | { |
| 2043 | .vendor = PCI_VENDOR_ID_ITE, |
| 2044 | .device = PCI_DEVICE_ID_ITE_8872, |
| 2045 | .subvendor = PCI_ANY_ID, |
| 2046 | .subdevice = PCI_ANY_ID, |
| 2047 | .init = pci_ite887x_init, |
| 2048 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2049 | .exit = pci_ite887x_exit, |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 2050 | }, |
| 2051 | /* |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 2052 | * National Instruments |
| 2053 | */ |
| 2054 | { |
| 2055 | .vendor = PCI_VENDOR_ID_NI, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2056 | .device = PCI_DEVICE_ID_NI_PCI23216, |
| 2057 | .subvendor = PCI_ANY_ID, |
| 2058 | .subdevice = PCI_ANY_ID, |
| 2059 | .init = pci_ni8420_init, |
| 2060 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2061 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2062 | }, |
| 2063 | { |
| 2064 | .vendor = PCI_VENDOR_ID_NI, |
| 2065 | .device = PCI_DEVICE_ID_NI_PCI2328, |
| 2066 | .subvendor = PCI_ANY_ID, |
| 2067 | .subdevice = PCI_ANY_ID, |
| 2068 | .init = pci_ni8420_init, |
| 2069 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2070 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2071 | }, |
| 2072 | { |
| 2073 | .vendor = PCI_VENDOR_ID_NI, |
| 2074 | .device = PCI_DEVICE_ID_NI_PCI2324, |
| 2075 | .subvendor = PCI_ANY_ID, |
| 2076 | .subdevice = PCI_ANY_ID, |
| 2077 | .init = pci_ni8420_init, |
| 2078 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2079 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2080 | }, |
| 2081 | { |
| 2082 | .vendor = PCI_VENDOR_ID_NI, |
| 2083 | .device = PCI_DEVICE_ID_NI_PCI2322, |
| 2084 | .subvendor = PCI_ANY_ID, |
| 2085 | .subdevice = PCI_ANY_ID, |
| 2086 | .init = pci_ni8420_init, |
| 2087 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2088 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2089 | }, |
| 2090 | { |
| 2091 | .vendor = PCI_VENDOR_ID_NI, |
| 2092 | .device = PCI_DEVICE_ID_NI_PCI2324I, |
| 2093 | .subvendor = PCI_ANY_ID, |
| 2094 | .subdevice = PCI_ANY_ID, |
| 2095 | .init = pci_ni8420_init, |
| 2096 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2097 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2098 | }, |
| 2099 | { |
| 2100 | .vendor = PCI_VENDOR_ID_NI, |
| 2101 | .device = PCI_DEVICE_ID_NI_PCI2322I, |
| 2102 | .subvendor = PCI_ANY_ID, |
| 2103 | .subdevice = PCI_ANY_ID, |
| 2104 | .init = pci_ni8420_init, |
| 2105 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2106 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2107 | }, |
| 2108 | { |
| 2109 | .vendor = PCI_VENDOR_ID_NI, |
| 2110 | .device = PCI_DEVICE_ID_NI_PXI8420_23216, |
| 2111 | .subvendor = PCI_ANY_ID, |
| 2112 | .subdevice = PCI_ANY_ID, |
| 2113 | .init = pci_ni8420_init, |
| 2114 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2115 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2116 | }, |
| 2117 | { |
| 2118 | .vendor = PCI_VENDOR_ID_NI, |
| 2119 | .device = PCI_DEVICE_ID_NI_PXI8420_2328, |
| 2120 | .subvendor = PCI_ANY_ID, |
| 2121 | .subdevice = PCI_ANY_ID, |
| 2122 | .init = pci_ni8420_init, |
| 2123 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2124 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2125 | }, |
| 2126 | { |
| 2127 | .vendor = PCI_VENDOR_ID_NI, |
| 2128 | .device = PCI_DEVICE_ID_NI_PXI8420_2324, |
| 2129 | .subvendor = PCI_ANY_ID, |
| 2130 | .subdevice = PCI_ANY_ID, |
| 2131 | .init = pci_ni8420_init, |
| 2132 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2133 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2134 | }, |
| 2135 | { |
| 2136 | .vendor = PCI_VENDOR_ID_NI, |
| 2137 | .device = PCI_DEVICE_ID_NI_PXI8420_2322, |
| 2138 | .subvendor = PCI_ANY_ID, |
| 2139 | .subdevice = PCI_ANY_ID, |
| 2140 | .init = pci_ni8420_init, |
| 2141 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2142 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2143 | }, |
| 2144 | { |
| 2145 | .vendor = PCI_VENDOR_ID_NI, |
| 2146 | .device = PCI_DEVICE_ID_NI_PXI8422_2324, |
| 2147 | .subvendor = PCI_ANY_ID, |
| 2148 | .subdevice = PCI_ANY_ID, |
| 2149 | .init = pci_ni8420_init, |
| 2150 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2151 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2152 | }, |
| 2153 | { |
| 2154 | .vendor = PCI_VENDOR_ID_NI, |
| 2155 | .device = PCI_DEVICE_ID_NI_PXI8422_2322, |
| 2156 | .subvendor = PCI_ANY_ID, |
| 2157 | .subdevice = PCI_ANY_ID, |
| 2158 | .init = pci_ni8420_init, |
| 2159 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2160 | .exit = pci_ni8420_exit, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2161 | }, |
| 2162 | { |
| 2163 | .vendor = PCI_VENDOR_ID_NI, |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 2164 | .device = PCI_ANY_ID, |
| 2165 | .subvendor = PCI_ANY_ID, |
| 2166 | .subdevice = PCI_ANY_ID, |
| 2167 | .init = pci_ni8430_init, |
| 2168 | .setup = pci_ni8430_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2169 | .exit = pci_ni8430_exit, |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 2170 | }, |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 2171 | /* Quatech */ |
| 2172 | { |
| 2173 | .vendor = PCI_VENDOR_ID_QUATECH, |
| 2174 | .device = PCI_ANY_ID, |
| 2175 | .subvendor = PCI_ANY_ID, |
| 2176 | .subdevice = PCI_ANY_ID, |
| 2177 | .init = pci_quatech_init, |
| 2178 | .setup = pci_quatech_setup, |
Greg Kroah-Hartman | d73dfc6 | 2013-01-15 22:44:48 -0800 | [diff] [blame] | 2179 | .exit = pci_quatech_exit, |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 2180 | }, |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 2181 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2182 | * Panacom |
| 2183 | */ |
| 2184 | { |
| 2185 | .vendor = PCI_VENDOR_ID_PANACOM, |
| 2186 | .device = PCI_DEVICE_ID_PANACOM_QUADMODEM, |
| 2187 | .subvendor = PCI_ANY_ID, |
| 2188 | .subdevice = PCI_ANY_ID, |
| 2189 | .init = pci_plx9050_init, |
| 2190 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2191 | .exit = pci_plx9050_exit, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 2192 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2193 | { |
| 2194 | .vendor = PCI_VENDOR_ID_PANACOM, |
| 2195 | .device = PCI_DEVICE_ID_PANACOM_DUALMODEM, |
| 2196 | .subvendor = PCI_ANY_ID, |
| 2197 | .subdevice = PCI_ANY_ID, |
| 2198 | .init = pci_plx9050_init, |
| 2199 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2200 | .exit = pci_plx9050_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2201 | }, |
| 2202 | /* |
Angelo Butti | 5c31ef9 | 2016-11-07 16:39:03 +0100 | [diff] [blame] | 2203 | * Pericom (Only 7954 - It have a offset jump for port 4) |
| 2204 | */ |
| 2205 | { |
| 2206 | .vendor = PCI_VENDOR_ID_PERICOM, |
| 2207 | .device = PCI_DEVICE_ID_PERICOM_PI7C9X7954, |
| 2208 | .subvendor = PCI_ANY_ID, |
| 2209 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2210 | .setup = pci_pericom_setup_four_at_eight, |
Angelo Butti | 5c31ef9 | 2016-11-07 16:39:03 +0100 | [diff] [blame] | 2211 | }, |
| 2212 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2213 | * PLX |
| 2214 | */ |
| 2215 | { |
| 2216 | .vendor = PCI_VENDOR_ID_PLX, |
| 2217 | .device = PCI_DEVICE_ID_PLX_9050, |
Bjorn Helgaas | add7b58 | 2005-10-24 22:11:57 +0100 | [diff] [blame] | 2218 | .subvendor = PCI_SUBVENDOR_ID_EXSYS, |
| 2219 | .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055, |
| 2220 | .init = pci_plx9050_init, |
| 2221 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2222 | .exit = pci_plx9050_exit, |
Bjorn Helgaas | add7b58 | 2005-10-24 22:11:57 +0100 | [diff] [blame] | 2223 | }, |
| 2224 | { |
| 2225 | .vendor = PCI_VENDOR_ID_PLX, |
| 2226 | .device = PCI_DEVICE_ID_PLX_9050, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2227 | .subvendor = PCI_SUBVENDOR_ID_KEYSPAN, |
| 2228 | .subdevice = PCI_SUBDEVICE_ID_KEYSPAN_SX2, |
| 2229 | .init = pci_plx9050_init, |
| 2230 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2231 | .exit = pci_plx9050_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2232 | }, |
| 2233 | { |
| 2234 | .vendor = PCI_VENDOR_ID_PLX, |
| 2235 | .device = PCI_DEVICE_ID_PLX_ROMULUS, |
| 2236 | .subvendor = PCI_VENDOR_ID_PLX, |
| 2237 | .subdevice = PCI_DEVICE_ID_PLX_ROMULUS, |
| 2238 | .init = pci_plx9050_init, |
| 2239 | .setup = pci_default_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2240 | .exit = pci_plx9050_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2241 | }, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2242 | { |
| 2243 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2244 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB, |
| 2245 | .subvendor = PCI_ANY_ID, |
| 2246 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2247 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2248 | }, |
| 2249 | { |
| 2250 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2251 | .device = PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4S, |
| 2252 | .subvendor = PCI_ANY_ID, |
| 2253 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2254 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2255 | }, |
| 2256 | { |
| 2257 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2258 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB, |
| 2259 | .subvendor = PCI_ANY_ID, |
| 2260 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2261 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2262 | }, |
| 2263 | { |
| 2264 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2265 | .device = PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_4, |
| 2266 | .subvendor = PCI_ANY_ID, |
| 2267 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2268 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2269 | }, |
| 2270 | { |
| 2271 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2272 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB, |
| 2273 | .subvendor = PCI_ANY_ID, |
| 2274 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2275 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2276 | }, |
| 2277 | { |
| 2278 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2279 | .device = PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4SM, |
| 2280 | .subvendor = PCI_ANY_ID, |
| 2281 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2282 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2283 | }, |
| 2284 | { |
| 2285 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2286 | .device = PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4, |
| 2287 | .subvendor = PCI_ANY_ID, |
| 2288 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2289 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2290 | }, |
| 2291 | { |
| 2292 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2293 | .device = PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_4, |
| 2294 | .subvendor = PCI_ANY_ID, |
| 2295 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2296 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2297 | }, |
| 2298 | { |
| 2299 | .vendor = PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4S, |
| 2300 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4, |
| 2301 | .subvendor = PCI_ANY_ID, |
| 2302 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2303 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2304 | }, |
| 2305 | { |
| 2306 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2307 | .device = PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_4, |
| 2308 | .subvendor = PCI_ANY_ID, |
| 2309 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2310 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2311 | }, |
| 2312 | { |
| 2313 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2314 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM422_4, |
| 2315 | .subvendor = PCI_ANY_ID, |
| 2316 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2317 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2318 | }, |
| 2319 | { |
| 2320 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2321 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM485_4, |
| 2322 | .subvendor = PCI_ANY_ID, |
| 2323 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2324 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2325 | }, |
| 2326 | { |
| 2327 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2328 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4, |
| 2329 | .subvendor = PCI_ANY_ID, |
| 2330 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2331 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2332 | }, |
| 2333 | { |
| 2334 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2335 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SM, |
| 2336 | .subvendor = PCI_ANY_ID, |
| 2337 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2338 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2339 | }, |
| 2340 | { |
| 2341 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2342 | .device = PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM, |
| 2343 | .subvendor = PCI_ANY_ID, |
| 2344 | .subdevice = PCI_ANY_ID, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2345 | .setup = pci_pericom_setup_four_at_eight, |
Jay Dolan | 78d3820 | 2019-02-12 21:43:12 -0800 | [diff] [blame] | 2346 | }, |
Jay Dolan | 6bf4e42 | 2019-06-11 04:47:15 -0700 | [diff] [blame] | 2347 | { |
| 2348 | .vendor = PCI_VENDOR_ID_ACCESIO, |
| 2349 | .device = PCI_ANY_ID, |
| 2350 | .subvendor = PCI_ANY_ID, |
| 2351 | .subdevice = PCI_ANY_ID, |
| 2352 | .setup = pci_pericom_setup, |
| 2353 | }, /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2354 | * SBS Technologies, Inc., PMC-OCTALPRO 232 |
| 2355 | */ |
| 2356 | { |
| 2357 | .vendor = PCI_VENDOR_ID_SBSMODULARIO, |
| 2358 | .device = PCI_DEVICE_ID_OCTPRO, |
| 2359 | .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, |
| 2360 | .subdevice = PCI_SUBDEVICE_ID_OCTPRO232, |
| 2361 | .init = sbs_init, |
| 2362 | .setup = sbs_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2363 | .exit = sbs_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2364 | }, |
| 2365 | /* |
| 2366 | * SBS Technologies, Inc., PMC-OCTALPRO 422 |
| 2367 | */ |
| 2368 | { |
| 2369 | .vendor = PCI_VENDOR_ID_SBSMODULARIO, |
| 2370 | .device = PCI_DEVICE_ID_OCTPRO, |
| 2371 | .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, |
| 2372 | .subdevice = PCI_SUBDEVICE_ID_OCTPRO422, |
| 2373 | .init = sbs_init, |
| 2374 | .setup = sbs_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2375 | .exit = sbs_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2376 | }, |
| 2377 | /* |
| 2378 | * SBS Technologies, Inc., P-Octal 232 |
| 2379 | */ |
| 2380 | { |
| 2381 | .vendor = PCI_VENDOR_ID_SBSMODULARIO, |
| 2382 | .device = PCI_DEVICE_ID_OCTPRO, |
| 2383 | .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, |
| 2384 | .subdevice = PCI_SUBDEVICE_ID_POCTAL232, |
| 2385 | .init = sbs_init, |
| 2386 | .setup = sbs_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2387 | .exit = sbs_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2388 | }, |
| 2389 | /* |
| 2390 | * SBS Technologies, Inc., P-Octal 422 |
| 2391 | */ |
| 2392 | { |
| 2393 | .vendor = PCI_VENDOR_ID_SBSMODULARIO, |
| 2394 | .device = PCI_DEVICE_ID_OCTPRO, |
| 2395 | .subvendor = PCI_SUBVENDOR_ID_SBSMODULARIO, |
| 2396 | .subdevice = PCI_SUBDEVICE_ID_POCTAL422, |
| 2397 | .init = sbs_init, |
| 2398 | .setup = sbs_setup, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 2399 | .exit = sbs_exit, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2400 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2401 | /* |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 2402 | * SIIG cards - these may be called via parport_serial |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2403 | */ |
| 2404 | { |
| 2405 | .vendor = PCI_VENDOR_ID_SIIG, |
Russell King | 67d74b8 | 2005-07-27 11:33:03 +0100 | [diff] [blame] | 2406 | .device = PCI_ANY_ID, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2407 | .subvendor = PCI_ANY_ID, |
| 2408 | .subdevice = PCI_ANY_ID, |
Russell King | 67d74b8 | 2005-07-27 11:33:03 +0100 | [diff] [blame] | 2409 | .init = pci_siig_init, |
Andrey Panin | 3ec9c59 | 2006-02-02 20:15:09 +0000 | [diff] [blame] | 2410 | .setup = pci_siig_setup, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2411 | }, |
| 2412 | /* |
| 2413 | * Titan cards |
| 2414 | */ |
| 2415 | { |
| 2416 | .vendor = PCI_VENDOR_ID_TITAN, |
| 2417 | .device = PCI_DEVICE_ID_TITAN_400L, |
| 2418 | .subvendor = PCI_ANY_ID, |
| 2419 | .subdevice = PCI_ANY_ID, |
| 2420 | .setup = titan_400l_800l_setup, |
| 2421 | }, |
| 2422 | { |
| 2423 | .vendor = PCI_VENDOR_ID_TITAN, |
| 2424 | .device = PCI_DEVICE_ID_TITAN_800L, |
| 2425 | .subvendor = PCI_ANY_ID, |
| 2426 | .subdevice = PCI_ANY_ID, |
| 2427 | .setup = titan_400l_800l_setup, |
| 2428 | }, |
| 2429 | /* |
| 2430 | * Timedia cards |
| 2431 | */ |
| 2432 | { |
| 2433 | .vendor = PCI_VENDOR_ID_TIMEDIA, |
| 2434 | .device = PCI_DEVICE_ID_TIMEDIA_1889, |
| 2435 | .subvendor = PCI_VENDOR_ID_TIMEDIA, |
| 2436 | .subdevice = PCI_ANY_ID, |
Frédéric Brière | b9b2455 | 2011-05-29 15:08:04 -0400 | [diff] [blame] | 2437 | .probe = pci_timedia_probe, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2438 | .init = pci_timedia_init, |
| 2439 | .setup = pci_timedia_setup, |
| 2440 | }, |
| 2441 | { |
| 2442 | .vendor = PCI_VENDOR_ID_TIMEDIA, |
| 2443 | .device = PCI_ANY_ID, |
| 2444 | .subvendor = PCI_ANY_ID, |
| 2445 | .subdevice = PCI_ANY_ID, |
| 2446 | .setup = pci_timedia_setup, |
| 2447 | }, |
| 2448 | /* |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 2449 | * Sunix PCI serial boards |
Stephen Chivers | abd7bac | 2013-01-28 19:49:20 +1100 | [diff] [blame] | 2450 | */ |
| 2451 | { |
| 2452 | .vendor = PCI_VENDOR_ID_SUNIX, |
| 2453 | .device = PCI_DEVICE_ID_SUNIX_1999, |
| 2454 | .subvendor = PCI_VENDOR_ID_SUNIX, |
| 2455 | .subdevice = PCI_ANY_ID, |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 2456 | .setup = pci_sunix_setup, |
Stephen Chivers | abd7bac | 2013-01-28 19:49:20 +1100 | [diff] [blame] | 2457 | }, |
| 2458 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2459 | * Xircom cards |
| 2460 | */ |
| 2461 | { |
| 2462 | .vendor = PCI_VENDOR_ID_XIRCOM, |
| 2463 | .device = PCI_DEVICE_ID_XIRCOM_X3201_MDM, |
| 2464 | .subvendor = PCI_ANY_ID, |
| 2465 | .subdevice = PCI_ANY_ID, |
| 2466 | .init = pci_xircom_init, |
| 2467 | .setup = pci_default_setup, |
| 2468 | }, |
| 2469 | /* |
Russell King | 61a116e | 2006-07-03 15:22:35 +0100 | [diff] [blame] | 2470 | * Netmos cards - these may be called via parport_serial |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2471 | */ |
| 2472 | { |
| 2473 | .vendor = PCI_VENDOR_ID_NETMOS, |
| 2474 | .device = PCI_ANY_ID, |
| 2475 | .subvendor = PCI_ANY_ID, |
| 2476 | .subdevice = PCI_ANY_ID, |
| 2477 | .init = pci_netmos_init, |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 2478 | .setup = pci_netmos_9900_setup, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2479 | }, |
| 2480 | /* |
Mike Skoog | 1bc8cde | 2014-10-16 13:10:01 -0700 | [diff] [blame] | 2481 | * EndRun Technologies |
| 2482 | */ |
| 2483 | { |
| 2484 | .vendor = PCI_VENDOR_ID_ENDRUN, |
| 2485 | .device = PCI_ANY_ID, |
| 2486 | .subvendor = PCI_ANY_ID, |
| 2487 | .subdevice = PCI_ANY_ID, |
| 2488 | .init = pci_endrun_init, |
| 2489 | .setup = pci_default_setup, |
| 2490 | }, |
| 2491 | /* |
Scott Kilau | aa273ae | 2011-05-11 15:41:59 -0500 | [diff] [blame] | 2492 | * For Oxford Semiconductor Tornado based devices |
Russell King | 9f2a036 | 2009-01-02 13:44:20 +0000 | [diff] [blame] | 2493 | */ |
| 2494 | { |
| 2495 | .vendor = PCI_VENDOR_ID_OXSEMI, |
| 2496 | .device = PCI_ANY_ID, |
| 2497 | .subvendor = PCI_ANY_ID, |
| 2498 | .subdevice = PCI_ANY_ID, |
| 2499 | .init = pci_oxsemi_tornado_init, |
| 2500 | .setup = pci_default_setup, |
| 2501 | }, |
| 2502 | { |
| 2503 | .vendor = PCI_VENDOR_ID_MAINPINE, |
| 2504 | .device = PCI_ANY_ID, |
| 2505 | .subvendor = PCI_ANY_ID, |
| 2506 | .subdevice = PCI_ANY_ID, |
| 2507 | .init = pci_oxsemi_tornado_init, |
| 2508 | .setup = pci_default_setup, |
| 2509 | }, |
Scott Kilau | aa273ae | 2011-05-11 15:41:59 -0500 | [diff] [blame] | 2510 | { |
| 2511 | .vendor = PCI_VENDOR_ID_DIGI, |
| 2512 | .device = PCIE_DEVICE_ID_NEO_2_OX_IBM, |
| 2513 | .subvendor = PCI_SUBVENDOR_ID_IBM, |
| 2514 | .subdevice = PCI_ANY_ID, |
| 2515 | .init = pci_oxsemi_tornado_init, |
| 2516 | .setup = pci_default_setup, |
| 2517 | }, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2518 | { |
| 2519 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2520 | .device = 0x8811, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2521 | .subvendor = PCI_ANY_ID, |
| 2522 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2523 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2524 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2525 | }, |
| 2526 | { |
| 2527 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2528 | .device = 0x8812, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2529 | .subvendor = PCI_ANY_ID, |
| 2530 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2531 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2532 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2533 | }, |
| 2534 | { |
| 2535 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2536 | .device = 0x8813, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2537 | .subvendor = PCI_ANY_ID, |
| 2538 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2539 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2540 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2541 | }, |
| 2542 | { |
| 2543 | .vendor = PCI_VENDOR_ID_INTEL, |
| 2544 | .device = 0x8814, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2545 | .subvendor = PCI_ANY_ID, |
| 2546 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2547 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2548 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2549 | }, |
| 2550 | { |
| 2551 | .vendor = 0x10DB, |
| 2552 | .device = 0x8027, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2553 | .subvendor = PCI_ANY_ID, |
| 2554 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2555 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2556 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2557 | }, |
| 2558 | { |
| 2559 | .vendor = 0x10DB, |
| 2560 | .device = 0x8028, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2561 | .subvendor = PCI_ANY_ID, |
| 2562 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2563 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2564 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2565 | }, |
| 2566 | { |
| 2567 | .vendor = 0x10DB, |
| 2568 | .device = 0x8029, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2569 | .subvendor = PCI_ANY_ID, |
| 2570 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2571 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2572 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2573 | }, |
| 2574 | { |
| 2575 | .vendor = 0x10DB, |
| 2576 | .device = 0x800C, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2577 | .subvendor = PCI_ANY_ID, |
| 2578 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2579 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2580 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2581 | }, |
| 2582 | { |
| 2583 | .vendor = 0x10DB, |
| 2584 | .device = 0x800D, |
Arnaud Patard | aaa10eb | 2012-04-25 12:17:24 +0200 | [diff] [blame] | 2585 | .subvendor = PCI_ANY_ID, |
| 2586 | .subdevice = PCI_ANY_ID, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2587 | .init = pci_eg20t_init, |
Tomoya MORINAGA | 64d91cf | 2011-10-07 13:39:49 +0900 | [diff] [blame] | 2588 | .setup = pci_default_setup, |
Tomoya MORINAGA | eb7073d | 2011-06-02 11:31:29 +0900 | [diff] [blame] | 2589 | }, |
Russell King | 9f2a036 | 2009-01-02 13:44:20 +0000 | [diff] [blame] | 2590 | /* |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 2591 | * Cronyx Omega PCI (PLX-chip based) |
| 2592 | */ |
| 2593 | { |
| 2594 | .vendor = PCI_VENDOR_ID_PLX, |
| 2595 | .device = PCI_DEVICE_ID_PLX_CRONYX_OMEGA, |
| 2596 | .subvendor = PCI_ANY_ID, |
| 2597 | .subdevice = PCI_ANY_ID, |
| 2598 | .setup = pci_omegapci_setup, |
Alan Cox | eb26dfe | 2012-07-12 13:00:31 +0100 | [diff] [blame] | 2599 | }, |
Ezequiel Garcia | feb5814 | 2014-05-24 15:24:51 -0300 | [diff] [blame] | 2600 | /* WCH CH353 1S1P card (16550 clone) */ |
| 2601 | { |
| 2602 | .vendor = PCI_VENDOR_ID_WCH, |
| 2603 | .device = PCI_DEVICE_ID_WCH_CH353_1S1P, |
| 2604 | .subvendor = PCI_ANY_ID, |
| 2605 | .subdevice = PCI_ANY_ID, |
| 2606 | .setup = pci_wch_ch353_setup, |
| 2607 | }, |
Guainluca Anzolin | 6971c63 | 2012-09-04 15:56:12 +0100 | [diff] [blame] | 2608 | /* WCH CH353 2S1P card (16550 clone) */ |
| 2609 | { |
Alan Cox | 27788c5 | 2012-09-04 16:21:06 +0100 | [diff] [blame] | 2610 | .vendor = PCI_VENDOR_ID_WCH, |
| 2611 | .device = PCI_DEVICE_ID_WCH_CH353_2S1P, |
| 2612 | .subvendor = PCI_ANY_ID, |
| 2613 | .subdevice = PCI_ANY_ID, |
| 2614 | .setup = pci_wch_ch353_setup, |
| 2615 | }, |
| 2616 | /* WCH CH353 4S card (16550 clone) */ |
| 2617 | { |
| 2618 | .vendor = PCI_VENDOR_ID_WCH, |
| 2619 | .device = PCI_DEVICE_ID_WCH_CH353_4S, |
| 2620 | .subvendor = PCI_ANY_ID, |
| 2621 | .subdevice = PCI_ANY_ID, |
| 2622 | .setup = pci_wch_ch353_setup, |
| 2623 | }, |
| 2624 | /* WCH CH353 2S1PF card (16550 clone) */ |
| 2625 | { |
| 2626 | .vendor = PCI_VENDOR_ID_WCH, |
| 2627 | .device = PCI_DEVICE_ID_WCH_CH353_2S1PF, |
| 2628 | .subvendor = PCI_ANY_ID, |
| 2629 | .subdevice = PCI_ANY_ID, |
Guainluca Anzolin | 6971c63 | 2012-09-04 15:56:12 +0100 | [diff] [blame] | 2630 | .setup = pci_wch_ch353_setup, |
| 2631 | }, |
Wang YanQing | 8b5c913 | 2013-03-05 23:16:48 +0800 | [diff] [blame] | 2632 | /* WCH CH352 2S card (16550 clone) */ |
| 2633 | { |
| 2634 | .vendor = PCI_VENDOR_ID_WCH, |
| 2635 | .device = PCI_DEVICE_ID_WCH_CH352_2S, |
| 2636 | .subvendor = PCI_ANY_ID, |
| 2637 | .subdevice = PCI_ANY_ID, |
| 2638 | .setup = pci_wch_ch353_setup, |
| 2639 | }, |
Alexandr Petrenko | 55c368c | 2016-05-23 10:04:54 +0300 | [diff] [blame] | 2640 | /* WCH CH355 4S card (16550 clone) */ |
| 2641 | { |
| 2642 | .vendor = PCI_VENDOR_ID_WCH, |
| 2643 | .device = PCI_DEVICE_ID_WCH_CH355_4S, |
| 2644 | .subvendor = PCI_ANY_ID, |
| 2645 | .subdevice = PCI_ANY_ID, |
| 2646 | .setup = pci_wch_ch355_setup, |
| 2647 | }, |
Jeremy McNicoll | 7dde557 | 2016-02-02 13:00:45 -0800 | [diff] [blame] | 2648 | /* WCH CH382 2S card (16850 clone) */ |
| 2649 | { |
| 2650 | .vendor = PCIE_VENDOR_ID_WCH, |
| 2651 | .device = PCIE_DEVICE_ID_WCH_CH382_2S, |
| 2652 | .subvendor = PCI_ANY_ID, |
| 2653 | .subdevice = PCI_ANY_ID, |
| 2654 | .setup = pci_wch_ch38x_setup, |
| 2655 | }, |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 2656 | /* WCH CH382 2S1P card (16850 clone) */ |
Sergej Pupykin | 2fdd8c8 | 2014-11-06 14:36:31 +0300 | [diff] [blame] | 2657 | { |
| 2658 | .vendor = PCIE_VENDOR_ID_WCH, |
| 2659 | .device = PCIE_DEVICE_ID_WCH_CH382_2S1P, |
| 2660 | .subvendor = PCI_ANY_ID, |
| 2661 | .subdevice = PCI_ANY_ID, |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 2662 | .setup = pci_wch_ch38x_setup, |
| 2663 | }, |
| 2664 | /* WCH CH384 4S card (16850 clone) */ |
| 2665 | { |
| 2666 | .vendor = PCIE_VENDOR_ID_WCH, |
| 2667 | .device = PCIE_DEVICE_ID_WCH_CH384_4S, |
| 2668 | .subvendor = PCI_ANY_ID, |
| 2669 | .subdevice = PCI_ANY_ID, |
| 2670 | .setup = pci_wch_ch38x_setup, |
Sergej Pupykin | 2fdd8c8 | 2014-11-06 14:36:31 +0300 | [diff] [blame] | 2671 | }, |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 2672 | /* WCH CH384 8S card (16850 clone) */ |
| 2673 | { |
| 2674 | .vendor = PCIE_VENDOR_ID_WCH, |
| 2675 | .device = PCIE_DEVICE_ID_WCH_CH384_8S, |
| 2676 | .subvendor = PCI_ANY_ID, |
| 2677 | .subdevice = PCI_ANY_ID, |
| 2678 | .init = pci_wch_ch38x_init, |
| 2679 | .exit = pci_wch_ch38x_exit, |
| 2680 | .setup = pci_wch_ch38x_setup, |
| 2681 | }, |
Alan Cox | eb26dfe | 2012-07-12 13:00:31 +0100 | [diff] [blame] | 2682 | /* |
| 2683 | * ASIX devices with FIFO bug |
| 2684 | */ |
| 2685 | { |
| 2686 | .vendor = PCI_VENDOR_ID_ASIX, |
| 2687 | .device = PCI_ANY_ID, |
| 2688 | .subvendor = PCI_ANY_ID, |
| 2689 | .subdevice = PCI_ANY_ID, |
| 2690 | .setup = pci_asix_setup, |
| 2691 | }, |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 2692 | /* |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 2693 | * Broadcom TruManage (NetXtreme) |
| 2694 | */ |
| 2695 | { |
| 2696 | .vendor = PCI_VENDOR_ID_BROADCOM, |
| 2697 | .device = PCI_DEVICE_ID_BROADCOM_TRUMANAGE, |
| 2698 | .subvendor = PCI_ANY_ID, |
| 2699 | .subdevice = PCI_ANY_ID, |
| 2700 | .setup = pci_brcm_trumanage_setup, |
| 2701 | }, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 2702 | { |
| 2703 | .vendor = 0x1c29, |
| 2704 | .device = 0x1104, |
| 2705 | .subvendor = PCI_ANY_ID, |
| 2706 | .subdevice = PCI_ANY_ID, |
| 2707 | .setup = pci_fintek_setup, |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 2708 | .init = pci_fintek_init, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 2709 | }, |
| 2710 | { |
| 2711 | .vendor = 0x1c29, |
| 2712 | .device = 0x1108, |
| 2713 | .subvendor = PCI_ANY_ID, |
| 2714 | .subdevice = PCI_ANY_ID, |
| 2715 | .setup = pci_fintek_setup, |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 2716 | .init = pci_fintek_init, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 2717 | }, |
| 2718 | { |
| 2719 | .vendor = 0x1c29, |
| 2720 | .device = 0x1112, |
| 2721 | .subvendor = PCI_ANY_ID, |
| 2722 | .subdevice = PCI_ANY_ID, |
| 2723 | .setup = pci_fintek_setup, |
Peter Hung | 6a8bc23 | 2015-04-01 14:00:21 +0800 | [diff] [blame] | 2724 | .init = pci_fintek_init, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 2725 | }, |
Kai-Heng Feng | d193db7 | 2019-08-17 00:51:24 +0800 | [diff] [blame] | 2726 | /* |
| 2727 | * MOXA |
| 2728 | */ |
| 2729 | { |
| 2730 | .vendor = PCI_VENDOR_ID_MOXA, |
| 2731 | .device = PCI_ANY_ID, |
| 2732 | .subvendor = PCI_ANY_ID, |
| 2733 | .subdevice = PCI_ANY_ID, |
| 2734 | .setup = pci_moxa_setup, |
| 2735 | }, |
Ji-Ze Hong (Peter Hong) | 68e26a8 | 2019-08-16 13:27:29 +0800 | [diff] [blame] | 2736 | { |
| 2737 | .vendor = 0x1c29, |
| 2738 | .device = 0x1204, |
| 2739 | .subvendor = PCI_ANY_ID, |
| 2740 | .subdevice = PCI_ANY_ID, |
| 2741 | .setup = pci_fintek_f815xxa_setup, |
| 2742 | .init = pci_fintek_f815xxa_init, |
| 2743 | }, |
| 2744 | { |
| 2745 | .vendor = 0x1c29, |
| 2746 | .device = 0x1208, |
| 2747 | .subvendor = PCI_ANY_ID, |
| 2748 | .subdevice = PCI_ANY_ID, |
| 2749 | .setup = pci_fintek_f815xxa_setup, |
| 2750 | .init = pci_fintek_f815xxa_init, |
| 2751 | }, |
| 2752 | { |
| 2753 | .vendor = 0x1c29, |
| 2754 | .device = 0x1212, |
| 2755 | .subvendor = PCI_ANY_ID, |
| 2756 | .subdevice = PCI_ANY_ID, |
| 2757 | .setup = pci_fintek_f815xxa_setup, |
| 2758 | .init = pci_fintek_f815xxa_init, |
| 2759 | }, |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 2760 | |
| 2761 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2762 | * Default "match everything" terminator entry |
| 2763 | */ |
| 2764 | { |
| 2765 | .vendor = PCI_ANY_ID, |
| 2766 | .device = PCI_ANY_ID, |
| 2767 | .subvendor = PCI_ANY_ID, |
| 2768 | .subdevice = PCI_ANY_ID, |
| 2769 | .setup = pci_default_setup, |
| 2770 | } |
| 2771 | }; |
| 2772 | |
| 2773 | static inline int quirk_id_matches(u32 quirk_id, u32 dev_id) |
| 2774 | { |
| 2775 | return quirk_id == PCI_ANY_ID || quirk_id == dev_id; |
| 2776 | } |
| 2777 | |
| 2778 | static struct pci_serial_quirk *find_quirk(struct pci_dev *dev) |
| 2779 | { |
| 2780 | struct pci_serial_quirk *quirk; |
| 2781 | |
| 2782 | for (quirk = pci_serial_quirks; ; quirk++) |
| 2783 | if (quirk_id_matches(quirk->vendor, dev->vendor) && |
| 2784 | quirk_id_matches(quirk->device, dev->device) && |
| 2785 | quirk_id_matches(quirk->subvendor, dev->subsystem_vendor) && |
| 2786 | quirk_id_matches(quirk->subdevice, dev->subsystem_device)) |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 2787 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2788 | return quirk; |
| 2789 | } |
| 2790 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2791 | /* |
| 2792 | * This is the configuration table for all of the PCI serial boards |
| 2793 | * which we support. It is directly indexed by the pci_board_num_t enum |
| 2794 | * value, which is encoded in the pci_device_id PCI probe table's |
| 2795 | * driver_data member. |
| 2796 | * |
| 2797 | * The makeup of these names are: |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 2798 | * pbn_bn{_bt}_n_baud{_offsetinhex} |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2799 | * |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 2800 | * bn = PCI BAR number |
| 2801 | * bt = Index using PCI BARs |
| 2802 | * n = number of serial ports |
| 2803 | * baud = baud rate |
| 2804 | * offsetinhex = offset for each sequential port (in hex) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2805 | * |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 2806 | * This table is sorted by (in order): bn, bt, baud, offsetindex, n. |
Russell King | f1690f3 | 2005-05-06 10:19:09 +0100 | [diff] [blame] | 2807 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2808 | * Please note: in theory if n = 1, _bt infix should make no difference. |
| 2809 | * ie, pbn_b0_1_115200 is the same as pbn_b0_bt_1_115200 |
| 2810 | */ |
| 2811 | enum pci_board_num_t { |
| 2812 | pbn_default = 0, |
| 2813 | |
| 2814 | pbn_b0_1_115200, |
| 2815 | pbn_b0_2_115200, |
| 2816 | pbn_b0_4_115200, |
| 2817 | pbn_b0_5_115200, |
Alan Cox | bf0df63 | 2007-10-16 01:24:00 -0700 | [diff] [blame] | 2818 | pbn_b0_8_115200, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2819 | |
| 2820 | pbn_b0_1_921600, |
| 2821 | pbn_b0_2_921600, |
| 2822 | pbn_b0_4_921600, |
| 2823 | |
David Ranson | db1de15 | 2005-07-27 11:43:55 -0700 | [diff] [blame] | 2824 | pbn_b0_2_1130000, |
| 2825 | |
Andrey Panin | fbc0dc0 | 2005-07-18 11:38:09 +0100 | [diff] [blame] | 2826 | pbn_b0_4_1152000, |
| 2827 | |
Ian Abbott | 1c9c858 | 2017-02-03 20:25:00 +0000 | [diff] [blame] | 2828 | pbn_b0_4_1250000, |
| 2829 | |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 2830 | pbn_b0_2_1843200, |
| 2831 | pbn_b0_4_1843200, |
| 2832 | |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 2833 | pbn_b0_1_3906250, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 2834 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2835 | pbn_b0_bt_1_115200, |
| 2836 | pbn_b0_bt_2_115200, |
Ira W. Snyder | ac6ec5b | 2009-12-21 16:26:45 -0800 | [diff] [blame] | 2837 | pbn_b0_bt_4_115200, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2838 | pbn_b0_bt_8_115200, |
| 2839 | |
| 2840 | pbn_b0_bt_1_460800, |
| 2841 | pbn_b0_bt_2_460800, |
| 2842 | pbn_b0_bt_4_460800, |
| 2843 | |
| 2844 | pbn_b0_bt_1_921600, |
| 2845 | pbn_b0_bt_2_921600, |
| 2846 | pbn_b0_bt_4_921600, |
| 2847 | pbn_b0_bt_8_921600, |
| 2848 | |
| 2849 | pbn_b1_1_115200, |
| 2850 | pbn_b1_2_115200, |
| 2851 | pbn_b1_4_115200, |
| 2852 | pbn_b1_8_115200, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2853 | pbn_b1_16_115200, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2854 | |
| 2855 | pbn_b1_1_921600, |
| 2856 | pbn_b1_2_921600, |
| 2857 | pbn_b1_4_921600, |
| 2858 | pbn_b1_8_921600, |
| 2859 | |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 2860 | pbn_b1_2_1250000, |
| 2861 | |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 2862 | pbn_b1_bt_1_115200, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 2863 | pbn_b1_bt_2_115200, |
| 2864 | pbn_b1_bt_4_115200, |
| 2865 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2866 | pbn_b1_bt_2_921600, |
| 2867 | |
| 2868 | pbn_b1_1_1382400, |
| 2869 | pbn_b1_2_1382400, |
| 2870 | pbn_b1_4_1382400, |
| 2871 | pbn_b1_8_1382400, |
| 2872 | |
| 2873 | pbn_b2_1_115200, |
Peter Horton | 737c175 | 2006-08-26 09:07:36 +0100 | [diff] [blame] | 2874 | pbn_b2_2_115200, |
Matthias Fuchs | a9cccd3 | 2007-02-10 01:46:05 -0800 | [diff] [blame] | 2875 | pbn_b2_4_115200, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2876 | pbn_b2_8_115200, |
| 2877 | |
| 2878 | pbn_b2_1_460800, |
| 2879 | pbn_b2_4_460800, |
| 2880 | pbn_b2_8_460800, |
| 2881 | pbn_b2_16_460800, |
| 2882 | |
| 2883 | pbn_b2_1_921600, |
| 2884 | pbn_b2_4_921600, |
| 2885 | pbn_b2_8_921600, |
| 2886 | |
Lytochkin Boris | e847003 | 2010-07-26 10:02:26 +0400 | [diff] [blame] | 2887 | pbn_b2_8_1152000, |
| 2888 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2889 | pbn_b2_bt_1_115200, |
| 2890 | pbn_b2_bt_2_115200, |
| 2891 | pbn_b2_bt_4_115200, |
| 2892 | |
| 2893 | pbn_b2_bt_2_921600, |
| 2894 | pbn_b2_bt_4_921600, |
| 2895 | |
Alon Bar-Lev | d9004eb | 2006-01-18 11:47:33 +0000 | [diff] [blame] | 2896 | pbn_b3_2_115200, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2897 | pbn_b3_4_115200, |
| 2898 | pbn_b3_8_115200, |
| 2899 | |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 2900 | pbn_b4_bt_2_921600, |
| 2901 | pbn_b4_bt_4_921600, |
| 2902 | pbn_b4_bt_8_921600, |
| 2903 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2904 | /* |
| 2905 | * Board-specific versions. |
| 2906 | */ |
| 2907 | pbn_panacom, |
| 2908 | pbn_panacom2, |
| 2909 | pbn_panacom4, |
| 2910 | pbn_plx_romulus, |
Mike Skoog | 1bc8cde | 2014-10-16 13:10:01 -0700 | [diff] [blame] | 2911 | pbn_endrun_2_4000000, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2912 | pbn_oxsemi, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 2913 | pbn_oxsemi_1_3906250, |
| 2914 | pbn_oxsemi_2_3906250, |
| 2915 | pbn_oxsemi_4_3906250, |
| 2916 | pbn_oxsemi_8_3906250, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2917 | pbn_intel_i960, |
| 2918 | pbn_sgi_ioc3, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2919 | pbn_computone_4, |
| 2920 | pbn_computone_6, |
| 2921 | pbn_computone_8, |
| 2922 | pbn_sbsxrsio, |
Olof Johansson | aa79850 | 2007-08-22 14:01:55 -0700 | [diff] [blame] | 2923 | pbn_pasemi_1682M, |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 2924 | pbn_ni8430_2, |
| 2925 | pbn_ni8430_4, |
| 2926 | pbn_ni8430_8, |
| 2927 | pbn_ni8430_16, |
Krauth.Julien | 1b62cbf | 2009-10-26 16:50:04 -0700 | [diff] [blame] | 2928 | pbn_ADDIDATA_PCIe_1_3906250, |
| 2929 | pbn_ADDIDATA_PCIe_2_3906250, |
| 2930 | pbn_ADDIDATA_PCIe_4_3906250, |
| 2931 | pbn_ADDIDATA_PCIe_8_3906250, |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 2932 | pbn_ce4100_1_115200, |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 2933 | pbn_omegapci, |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 2934 | pbn_NETMOS9900_2s_115200, |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 2935 | pbn_brcm_trumanage, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 2936 | pbn_fintek_4, |
| 2937 | pbn_fintek_8, |
| 2938 | pbn_fintek_12, |
Ji-Ze Hong (Peter Hong) | 68e26a8 | 2019-08-16 13:27:29 +0800 | [diff] [blame] | 2939 | pbn_fintek_F81504A, |
| 2940 | pbn_fintek_F81508A, |
| 2941 | pbn_fintek_F81512A, |
Jeremy McNicoll | 7dde557 | 2016-02-02 13:00:45 -0800 | [diff] [blame] | 2942 | pbn_wch382_2, |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 2943 | pbn_wch384_4, |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 2944 | pbn_wch384_8, |
Adam Lee | 89c043a | 2015-08-03 13:28:13 +0800 | [diff] [blame] | 2945 | pbn_pericom_PI7C9X7951, |
| 2946 | pbn_pericom_PI7C9X7952, |
| 2947 | pbn_pericom_PI7C9X7954, |
| 2948 | pbn_pericom_PI7C9X7958, |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 2949 | pbn_sunix_pci_1s, |
| 2950 | pbn_sunix_pci_2s, |
| 2951 | pbn_sunix_pci_4s, |
| 2952 | pbn_sunix_pci_8s, |
| 2953 | pbn_sunix_pci_16s, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 2954 | pbn_titan_1_4000000, |
| 2955 | pbn_titan_2_4000000, |
| 2956 | pbn_titan_4_4000000, |
| 2957 | pbn_titan_8_4000000, |
Kai-Heng Feng | d193db7 | 2019-08-17 00:51:24 +0800 | [diff] [blame] | 2958 | pbn_moxa8250_2p, |
| 2959 | pbn_moxa8250_4p, |
| 2960 | pbn_moxa8250_8p, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2961 | }; |
| 2962 | |
| 2963 | /* |
| 2964 | * uart_offset - the space between channels |
| 2965 | * reg_shift - describes how the UART registers are mapped |
| 2966 | * to PCI memory by the card. |
| 2967 | * For example IER register on SBS, Inc. PMC-OctPro is located at |
| 2968 | * offset 0x10 from the UART base, while UART_IER is defined as 1 |
| 2969 | * in include/linux/serial_reg.h, |
| 2970 | * see first lines of serial_in() and serial_out() in 8250.c |
| 2971 | */ |
| 2972 | |
Bill Pemberton | de88b34 | 2012-11-19 13:24:32 -0500 | [diff] [blame] | 2973 | static struct pciserial_board pci_boards[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2974 | [pbn_default] = { |
| 2975 | .flags = FL_BASE0, |
| 2976 | .num_ports = 1, |
| 2977 | .base_baud = 115200, |
| 2978 | .uart_offset = 8, |
| 2979 | }, |
| 2980 | [pbn_b0_1_115200] = { |
| 2981 | .flags = FL_BASE0, |
| 2982 | .num_ports = 1, |
| 2983 | .base_baud = 115200, |
| 2984 | .uart_offset = 8, |
| 2985 | }, |
| 2986 | [pbn_b0_2_115200] = { |
| 2987 | .flags = FL_BASE0, |
| 2988 | .num_ports = 2, |
| 2989 | .base_baud = 115200, |
| 2990 | .uart_offset = 8, |
| 2991 | }, |
| 2992 | [pbn_b0_4_115200] = { |
| 2993 | .flags = FL_BASE0, |
| 2994 | .num_ports = 4, |
| 2995 | .base_baud = 115200, |
| 2996 | .uart_offset = 8, |
| 2997 | }, |
| 2998 | [pbn_b0_5_115200] = { |
| 2999 | .flags = FL_BASE0, |
| 3000 | .num_ports = 5, |
| 3001 | .base_baud = 115200, |
| 3002 | .uart_offset = 8, |
| 3003 | }, |
Alan Cox | bf0df63 | 2007-10-16 01:24:00 -0700 | [diff] [blame] | 3004 | [pbn_b0_8_115200] = { |
| 3005 | .flags = FL_BASE0, |
| 3006 | .num_ports = 8, |
| 3007 | .base_baud = 115200, |
| 3008 | .uart_offset = 8, |
| 3009 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3010 | [pbn_b0_1_921600] = { |
| 3011 | .flags = FL_BASE0, |
| 3012 | .num_ports = 1, |
| 3013 | .base_baud = 921600, |
| 3014 | .uart_offset = 8, |
| 3015 | }, |
| 3016 | [pbn_b0_2_921600] = { |
| 3017 | .flags = FL_BASE0, |
| 3018 | .num_ports = 2, |
| 3019 | .base_baud = 921600, |
| 3020 | .uart_offset = 8, |
| 3021 | }, |
| 3022 | [pbn_b0_4_921600] = { |
| 3023 | .flags = FL_BASE0, |
| 3024 | .num_ports = 4, |
| 3025 | .base_baud = 921600, |
| 3026 | .uart_offset = 8, |
| 3027 | }, |
David Ranson | db1de15 | 2005-07-27 11:43:55 -0700 | [diff] [blame] | 3028 | |
| 3029 | [pbn_b0_2_1130000] = { |
| 3030 | .flags = FL_BASE0, |
| 3031 | .num_ports = 2, |
| 3032 | .base_baud = 1130000, |
| 3033 | .uart_offset = 8, |
| 3034 | }, |
| 3035 | |
Andrey Panin | fbc0dc0 | 2005-07-18 11:38:09 +0100 | [diff] [blame] | 3036 | [pbn_b0_4_1152000] = { |
| 3037 | .flags = FL_BASE0, |
| 3038 | .num_ports = 4, |
| 3039 | .base_baud = 1152000, |
| 3040 | .uart_offset = 8, |
| 3041 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3042 | |
Ian Abbott | 1c9c858 | 2017-02-03 20:25:00 +0000 | [diff] [blame] | 3043 | [pbn_b0_4_1250000] = { |
| 3044 | .flags = FL_BASE0, |
| 3045 | .num_ports = 4, |
| 3046 | .base_baud = 1250000, |
| 3047 | .uart_offset = 8, |
| 3048 | }, |
| 3049 | |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 3050 | [pbn_b0_2_1843200] = { |
| 3051 | .flags = FL_BASE0, |
| 3052 | .num_ports = 2, |
| 3053 | .base_baud = 1843200, |
| 3054 | .uart_offset = 8, |
| 3055 | }, |
| 3056 | [pbn_b0_4_1843200] = { |
| 3057 | .flags = FL_BASE0, |
| 3058 | .num_ports = 4, |
| 3059 | .base_baud = 1843200, |
| 3060 | .uart_offset = 8, |
| 3061 | }, |
| 3062 | |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3063 | [pbn_b0_1_3906250] = { |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3064 | .flags = FL_BASE0, |
| 3065 | .num_ports = 1, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3066 | .base_baud = 3906250, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3067 | .uart_offset = 8, |
| 3068 | }, |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 3069 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3070 | [pbn_b0_bt_1_115200] = { |
| 3071 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3072 | .num_ports = 1, |
| 3073 | .base_baud = 115200, |
| 3074 | .uart_offset = 8, |
| 3075 | }, |
| 3076 | [pbn_b0_bt_2_115200] = { |
| 3077 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3078 | .num_ports = 2, |
| 3079 | .base_baud = 115200, |
| 3080 | .uart_offset = 8, |
| 3081 | }, |
Ira W. Snyder | ac6ec5b | 2009-12-21 16:26:45 -0800 | [diff] [blame] | 3082 | [pbn_b0_bt_4_115200] = { |
| 3083 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3084 | .num_ports = 4, |
| 3085 | .base_baud = 115200, |
| 3086 | .uart_offset = 8, |
| 3087 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3088 | [pbn_b0_bt_8_115200] = { |
| 3089 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3090 | .num_ports = 8, |
| 3091 | .base_baud = 115200, |
| 3092 | .uart_offset = 8, |
| 3093 | }, |
| 3094 | |
| 3095 | [pbn_b0_bt_1_460800] = { |
| 3096 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3097 | .num_ports = 1, |
| 3098 | .base_baud = 460800, |
| 3099 | .uart_offset = 8, |
| 3100 | }, |
| 3101 | [pbn_b0_bt_2_460800] = { |
| 3102 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3103 | .num_ports = 2, |
| 3104 | .base_baud = 460800, |
| 3105 | .uart_offset = 8, |
| 3106 | }, |
| 3107 | [pbn_b0_bt_4_460800] = { |
| 3108 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3109 | .num_ports = 4, |
| 3110 | .base_baud = 460800, |
| 3111 | .uart_offset = 8, |
| 3112 | }, |
| 3113 | |
| 3114 | [pbn_b0_bt_1_921600] = { |
| 3115 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3116 | .num_ports = 1, |
| 3117 | .base_baud = 921600, |
| 3118 | .uart_offset = 8, |
| 3119 | }, |
| 3120 | [pbn_b0_bt_2_921600] = { |
| 3121 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3122 | .num_ports = 2, |
| 3123 | .base_baud = 921600, |
| 3124 | .uart_offset = 8, |
| 3125 | }, |
| 3126 | [pbn_b0_bt_4_921600] = { |
| 3127 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3128 | .num_ports = 4, |
| 3129 | .base_baud = 921600, |
| 3130 | .uart_offset = 8, |
| 3131 | }, |
| 3132 | [pbn_b0_bt_8_921600] = { |
| 3133 | .flags = FL_BASE0|FL_BASE_BARS, |
| 3134 | .num_ports = 8, |
| 3135 | .base_baud = 921600, |
| 3136 | .uart_offset = 8, |
| 3137 | }, |
| 3138 | |
| 3139 | [pbn_b1_1_115200] = { |
| 3140 | .flags = FL_BASE1, |
| 3141 | .num_ports = 1, |
| 3142 | .base_baud = 115200, |
| 3143 | .uart_offset = 8, |
| 3144 | }, |
| 3145 | [pbn_b1_2_115200] = { |
| 3146 | .flags = FL_BASE1, |
| 3147 | .num_ports = 2, |
| 3148 | .base_baud = 115200, |
| 3149 | .uart_offset = 8, |
| 3150 | }, |
| 3151 | [pbn_b1_4_115200] = { |
| 3152 | .flags = FL_BASE1, |
| 3153 | .num_ports = 4, |
| 3154 | .base_baud = 115200, |
| 3155 | .uart_offset = 8, |
| 3156 | }, |
| 3157 | [pbn_b1_8_115200] = { |
| 3158 | .flags = FL_BASE1, |
| 3159 | .num_ports = 8, |
| 3160 | .base_baud = 115200, |
| 3161 | .uart_offset = 8, |
| 3162 | }, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 3163 | [pbn_b1_16_115200] = { |
| 3164 | .flags = FL_BASE1, |
| 3165 | .num_ports = 16, |
| 3166 | .base_baud = 115200, |
| 3167 | .uart_offset = 8, |
| 3168 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3169 | |
| 3170 | [pbn_b1_1_921600] = { |
| 3171 | .flags = FL_BASE1, |
| 3172 | .num_ports = 1, |
| 3173 | .base_baud = 921600, |
| 3174 | .uart_offset = 8, |
| 3175 | }, |
| 3176 | [pbn_b1_2_921600] = { |
| 3177 | .flags = FL_BASE1, |
| 3178 | .num_ports = 2, |
| 3179 | .base_baud = 921600, |
| 3180 | .uart_offset = 8, |
| 3181 | }, |
| 3182 | [pbn_b1_4_921600] = { |
| 3183 | .flags = FL_BASE1, |
| 3184 | .num_ports = 4, |
| 3185 | .base_baud = 921600, |
| 3186 | .uart_offset = 8, |
| 3187 | }, |
| 3188 | [pbn_b1_8_921600] = { |
| 3189 | .flags = FL_BASE1, |
| 3190 | .num_ports = 8, |
| 3191 | .base_baud = 921600, |
| 3192 | .uart_offset = 8, |
| 3193 | }, |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 3194 | [pbn_b1_2_1250000] = { |
| 3195 | .flags = FL_BASE1, |
| 3196 | .num_ports = 2, |
| 3197 | .base_baud = 1250000, |
| 3198 | .uart_offset = 8, |
| 3199 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3200 | |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 3201 | [pbn_b1_bt_1_115200] = { |
| 3202 | .flags = FL_BASE1|FL_BASE_BARS, |
| 3203 | .num_ports = 1, |
| 3204 | .base_baud = 115200, |
| 3205 | .uart_offset = 8, |
| 3206 | }, |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 3207 | [pbn_b1_bt_2_115200] = { |
| 3208 | .flags = FL_BASE1|FL_BASE_BARS, |
| 3209 | .num_ports = 2, |
| 3210 | .base_baud = 115200, |
| 3211 | .uart_offset = 8, |
| 3212 | }, |
| 3213 | [pbn_b1_bt_4_115200] = { |
| 3214 | .flags = FL_BASE1|FL_BASE_BARS, |
| 3215 | .num_ports = 4, |
| 3216 | .base_baud = 115200, |
| 3217 | .uart_offset = 8, |
| 3218 | }, |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 3219 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3220 | [pbn_b1_bt_2_921600] = { |
| 3221 | .flags = FL_BASE1|FL_BASE_BARS, |
| 3222 | .num_ports = 2, |
| 3223 | .base_baud = 921600, |
| 3224 | .uart_offset = 8, |
| 3225 | }, |
| 3226 | |
| 3227 | [pbn_b1_1_1382400] = { |
| 3228 | .flags = FL_BASE1, |
| 3229 | .num_ports = 1, |
| 3230 | .base_baud = 1382400, |
| 3231 | .uart_offset = 8, |
| 3232 | }, |
| 3233 | [pbn_b1_2_1382400] = { |
| 3234 | .flags = FL_BASE1, |
| 3235 | .num_ports = 2, |
| 3236 | .base_baud = 1382400, |
| 3237 | .uart_offset = 8, |
| 3238 | }, |
| 3239 | [pbn_b1_4_1382400] = { |
| 3240 | .flags = FL_BASE1, |
| 3241 | .num_ports = 4, |
| 3242 | .base_baud = 1382400, |
| 3243 | .uart_offset = 8, |
| 3244 | }, |
| 3245 | [pbn_b1_8_1382400] = { |
| 3246 | .flags = FL_BASE1, |
| 3247 | .num_ports = 8, |
| 3248 | .base_baud = 1382400, |
| 3249 | .uart_offset = 8, |
| 3250 | }, |
| 3251 | |
| 3252 | [pbn_b2_1_115200] = { |
| 3253 | .flags = FL_BASE2, |
| 3254 | .num_ports = 1, |
| 3255 | .base_baud = 115200, |
| 3256 | .uart_offset = 8, |
| 3257 | }, |
Peter Horton | 737c175 | 2006-08-26 09:07:36 +0100 | [diff] [blame] | 3258 | [pbn_b2_2_115200] = { |
| 3259 | .flags = FL_BASE2, |
| 3260 | .num_ports = 2, |
| 3261 | .base_baud = 115200, |
| 3262 | .uart_offset = 8, |
| 3263 | }, |
Matthias Fuchs | a9cccd3 | 2007-02-10 01:46:05 -0800 | [diff] [blame] | 3264 | [pbn_b2_4_115200] = { |
| 3265 | .flags = FL_BASE2, |
| 3266 | .num_ports = 4, |
| 3267 | .base_baud = 115200, |
| 3268 | .uart_offset = 8, |
| 3269 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3270 | [pbn_b2_8_115200] = { |
| 3271 | .flags = FL_BASE2, |
| 3272 | .num_ports = 8, |
| 3273 | .base_baud = 115200, |
| 3274 | .uart_offset = 8, |
| 3275 | }, |
| 3276 | |
| 3277 | [pbn_b2_1_460800] = { |
| 3278 | .flags = FL_BASE2, |
| 3279 | .num_ports = 1, |
| 3280 | .base_baud = 460800, |
| 3281 | .uart_offset = 8, |
| 3282 | }, |
| 3283 | [pbn_b2_4_460800] = { |
| 3284 | .flags = FL_BASE2, |
| 3285 | .num_ports = 4, |
| 3286 | .base_baud = 460800, |
| 3287 | .uart_offset = 8, |
| 3288 | }, |
| 3289 | [pbn_b2_8_460800] = { |
| 3290 | .flags = FL_BASE2, |
| 3291 | .num_ports = 8, |
| 3292 | .base_baud = 460800, |
| 3293 | .uart_offset = 8, |
| 3294 | }, |
| 3295 | [pbn_b2_16_460800] = { |
| 3296 | .flags = FL_BASE2, |
| 3297 | .num_ports = 16, |
| 3298 | .base_baud = 460800, |
| 3299 | .uart_offset = 8, |
| 3300 | }, |
| 3301 | |
| 3302 | [pbn_b2_1_921600] = { |
| 3303 | .flags = FL_BASE2, |
| 3304 | .num_ports = 1, |
| 3305 | .base_baud = 921600, |
| 3306 | .uart_offset = 8, |
| 3307 | }, |
| 3308 | [pbn_b2_4_921600] = { |
| 3309 | .flags = FL_BASE2, |
| 3310 | .num_ports = 4, |
| 3311 | .base_baud = 921600, |
| 3312 | .uart_offset = 8, |
| 3313 | }, |
| 3314 | [pbn_b2_8_921600] = { |
| 3315 | .flags = FL_BASE2, |
| 3316 | .num_ports = 8, |
| 3317 | .base_baud = 921600, |
| 3318 | .uart_offset = 8, |
| 3319 | }, |
| 3320 | |
Lytochkin Boris | e847003 | 2010-07-26 10:02:26 +0400 | [diff] [blame] | 3321 | [pbn_b2_8_1152000] = { |
| 3322 | .flags = FL_BASE2, |
| 3323 | .num_ports = 8, |
| 3324 | .base_baud = 1152000, |
| 3325 | .uart_offset = 8, |
| 3326 | }, |
| 3327 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3328 | [pbn_b2_bt_1_115200] = { |
| 3329 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3330 | .num_ports = 1, |
| 3331 | .base_baud = 115200, |
| 3332 | .uart_offset = 8, |
| 3333 | }, |
| 3334 | [pbn_b2_bt_2_115200] = { |
| 3335 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3336 | .num_ports = 2, |
| 3337 | .base_baud = 115200, |
| 3338 | .uart_offset = 8, |
| 3339 | }, |
| 3340 | [pbn_b2_bt_4_115200] = { |
| 3341 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3342 | .num_ports = 4, |
| 3343 | .base_baud = 115200, |
| 3344 | .uart_offset = 8, |
| 3345 | }, |
| 3346 | |
| 3347 | [pbn_b2_bt_2_921600] = { |
| 3348 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3349 | .num_ports = 2, |
| 3350 | .base_baud = 921600, |
| 3351 | .uart_offset = 8, |
| 3352 | }, |
| 3353 | [pbn_b2_bt_4_921600] = { |
| 3354 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3355 | .num_ports = 4, |
| 3356 | .base_baud = 921600, |
| 3357 | .uart_offset = 8, |
| 3358 | }, |
| 3359 | |
Alon Bar-Lev | d9004eb | 2006-01-18 11:47:33 +0000 | [diff] [blame] | 3360 | [pbn_b3_2_115200] = { |
| 3361 | .flags = FL_BASE3, |
| 3362 | .num_ports = 2, |
| 3363 | .base_baud = 115200, |
| 3364 | .uart_offset = 8, |
| 3365 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3366 | [pbn_b3_4_115200] = { |
| 3367 | .flags = FL_BASE3, |
| 3368 | .num_ports = 4, |
| 3369 | .base_baud = 115200, |
| 3370 | .uart_offset = 8, |
| 3371 | }, |
| 3372 | [pbn_b3_8_115200] = { |
| 3373 | .flags = FL_BASE3, |
| 3374 | .num_ports = 8, |
| 3375 | .base_baud = 115200, |
| 3376 | .uart_offset = 8, |
| 3377 | }, |
| 3378 | |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 3379 | [pbn_b4_bt_2_921600] = { |
| 3380 | .flags = FL_BASE4, |
| 3381 | .num_ports = 2, |
| 3382 | .base_baud = 921600, |
| 3383 | .uart_offset = 8, |
| 3384 | }, |
| 3385 | [pbn_b4_bt_4_921600] = { |
| 3386 | .flags = FL_BASE4, |
| 3387 | .num_ports = 4, |
| 3388 | .base_baud = 921600, |
| 3389 | .uart_offset = 8, |
| 3390 | }, |
| 3391 | [pbn_b4_bt_8_921600] = { |
| 3392 | .flags = FL_BASE4, |
| 3393 | .num_ports = 8, |
| 3394 | .base_baud = 921600, |
| 3395 | .uart_offset = 8, |
| 3396 | }, |
| 3397 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3398 | /* |
| 3399 | * Entries following this are board-specific. |
| 3400 | */ |
| 3401 | |
| 3402 | /* |
| 3403 | * Panacom - IOMEM |
| 3404 | */ |
| 3405 | [pbn_panacom] = { |
| 3406 | .flags = FL_BASE2, |
| 3407 | .num_ports = 2, |
| 3408 | .base_baud = 921600, |
| 3409 | .uart_offset = 0x400, |
| 3410 | .reg_shift = 7, |
| 3411 | }, |
| 3412 | [pbn_panacom2] = { |
| 3413 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3414 | .num_ports = 2, |
| 3415 | .base_baud = 921600, |
| 3416 | .uart_offset = 0x400, |
| 3417 | .reg_shift = 7, |
| 3418 | }, |
| 3419 | [pbn_panacom4] = { |
| 3420 | .flags = FL_BASE2|FL_BASE_BARS, |
| 3421 | .num_ports = 4, |
| 3422 | .base_baud = 921600, |
| 3423 | .uart_offset = 0x400, |
| 3424 | .reg_shift = 7, |
| 3425 | }, |
| 3426 | |
| 3427 | /* I think this entry is broken - the first_offset looks wrong --rmk */ |
| 3428 | [pbn_plx_romulus] = { |
| 3429 | .flags = FL_BASE2, |
| 3430 | .num_ports = 4, |
| 3431 | .base_baud = 921600, |
| 3432 | .uart_offset = 8 << 2, |
| 3433 | .reg_shift = 2, |
| 3434 | .first_offset = 0x03, |
| 3435 | }, |
| 3436 | |
| 3437 | /* |
Mike Skoog | 1bc8cde | 2014-10-16 13:10:01 -0700 | [diff] [blame] | 3438 | * EndRun Technologies |
| 3439 | * Uses the size of PCI Base region 0 to |
| 3440 | * signal now many ports are available |
| 3441 | * 2 port 952 Uart support |
| 3442 | */ |
| 3443 | [pbn_endrun_2_4000000] = { |
| 3444 | .flags = FL_BASE0, |
| 3445 | .num_ports = 2, |
| 3446 | .base_baud = 4000000, |
| 3447 | .uart_offset = 0x200, |
| 3448 | .first_offset = 0x1000, |
| 3449 | }, |
| 3450 | |
| 3451 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3452 | * This board uses the size of PCI Base region 0 to |
| 3453 | * signal now many ports are available |
| 3454 | */ |
| 3455 | [pbn_oxsemi] = { |
| 3456 | .flags = FL_BASE0|FL_REGION_SZ_CAP, |
| 3457 | .num_ports = 32, |
| 3458 | .base_baud = 115200, |
| 3459 | .uart_offset = 8, |
| 3460 | }, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3461 | [pbn_oxsemi_1_3906250] = { |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3462 | .flags = FL_BASE0, |
| 3463 | .num_ports = 1, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3464 | .base_baud = 3906250, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3465 | .uart_offset = 0x200, |
| 3466 | .first_offset = 0x1000, |
| 3467 | }, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3468 | [pbn_oxsemi_2_3906250] = { |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3469 | .flags = FL_BASE0, |
| 3470 | .num_ports = 2, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3471 | .base_baud = 3906250, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3472 | .uart_offset = 0x200, |
| 3473 | .first_offset = 0x1000, |
| 3474 | }, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3475 | [pbn_oxsemi_4_3906250] = { |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3476 | .flags = FL_BASE0, |
| 3477 | .num_ports = 4, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3478 | .base_baud = 3906250, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3479 | .uart_offset = 0x200, |
| 3480 | .first_offset = 0x1000, |
| 3481 | }, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3482 | [pbn_oxsemi_8_3906250] = { |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3483 | .flags = FL_BASE0, |
| 3484 | .num_ports = 8, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 3485 | .base_baud = 3906250, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 3486 | .uart_offset = 0x200, |
| 3487 | .first_offset = 0x1000, |
| 3488 | }, |
| 3489 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3490 | |
| 3491 | /* |
| 3492 | * EKF addition for i960 Boards form EKF with serial port. |
| 3493 | * Max 256 ports. |
| 3494 | */ |
| 3495 | [pbn_intel_i960] = { |
| 3496 | .flags = FL_BASE0, |
| 3497 | .num_ports = 32, |
| 3498 | .base_baud = 921600, |
| 3499 | .uart_offset = 8 << 2, |
| 3500 | .reg_shift = 2, |
| 3501 | .first_offset = 0x10000, |
| 3502 | }, |
| 3503 | [pbn_sgi_ioc3] = { |
| 3504 | .flags = FL_BASE0|FL_NOIRQ, |
| 3505 | .num_ports = 1, |
| 3506 | .base_baud = 458333, |
| 3507 | .uart_offset = 8, |
| 3508 | .reg_shift = 0, |
| 3509 | .first_offset = 0x20178, |
| 3510 | }, |
| 3511 | |
| 3512 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3513 | * Computone - uses IOMEM. |
| 3514 | */ |
| 3515 | [pbn_computone_4] = { |
| 3516 | .flags = FL_BASE0, |
| 3517 | .num_ports = 4, |
| 3518 | .base_baud = 921600, |
| 3519 | .uart_offset = 0x40, |
| 3520 | .reg_shift = 2, |
| 3521 | .first_offset = 0x200, |
| 3522 | }, |
| 3523 | [pbn_computone_6] = { |
| 3524 | .flags = FL_BASE0, |
| 3525 | .num_ports = 6, |
| 3526 | .base_baud = 921600, |
| 3527 | .uart_offset = 0x40, |
| 3528 | .reg_shift = 2, |
| 3529 | .first_offset = 0x200, |
| 3530 | }, |
| 3531 | [pbn_computone_8] = { |
| 3532 | .flags = FL_BASE0, |
| 3533 | .num_ports = 8, |
| 3534 | .base_baud = 921600, |
| 3535 | .uart_offset = 0x40, |
| 3536 | .reg_shift = 2, |
| 3537 | .first_offset = 0x200, |
| 3538 | }, |
| 3539 | [pbn_sbsxrsio] = { |
| 3540 | .flags = FL_BASE0, |
| 3541 | .num_ports = 8, |
| 3542 | .base_baud = 460800, |
| 3543 | .uart_offset = 256, |
| 3544 | .reg_shift = 4, |
| 3545 | }, |
| 3546 | /* |
Olof Johansson | aa79850 | 2007-08-22 14:01:55 -0700 | [diff] [blame] | 3547 | * PA Semi PWRficient PA6T-1682M on-chip UART |
| 3548 | */ |
| 3549 | [pbn_pasemi_1682M] = { |
| 3550 | .flags = FL_BASE0, |
| 3551 | .num_ports = 1, |
| 3552 | .base_baud = 8333333, |
| 3553 | }, |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 3554 | /* |
| 3555 | * National Instruments 843x |
| 3556 | */ |
| 3557 | [pbn_ni8430_16] = { |
| 3558 | .flags = FL_BASE0, |
| 3559 | .num_ports = 16, |
| 3560 | .base_baud = 3686400, |
| 3561 | .uart_offset = 0x10, |
| 3562 | .first_offset = 0x800, |
| 3563 | }, |
| 3564 | [pbn_ni8430_8] = { |
| 3565 | .flags = FL_BASE0, |
| 3566 | .num_ports = 8, |
| 3567 | .base_baud = 3686400, |
| 3568 | .uart_offset = 0x10, |
| 3569 | .first_offset = 0x800, |
| 3570 | }, |
| 3571 | [pbn_ni8430_4] = { |
| 3572 | .flags = FL_BASE0, |
| 3573 | .num_ports = 4, |
| 3574 | .base_baud = 3686400, |
| 3575 | .uart_offset = 0x10, |
| 3576 | .first_offset = 0x800, |
| 3577 | }, |
| 3578 | [pbn_ni8430_2] = { |
| 3579 | .flags = FL_BASE0, |
| 3580 | .num_ports = 2, |
| 3581 | .base_baud = 3686400, |
| 3582 | .uart_offset = 0x10, |
| 3583 | .first_offset = 0x800, |
| 3584 | }, |
Krauth.Julien | 1b62cbf | 2009-10-26 16:50:04 -0700 | [diff] [blame] | 3585 | /* |
| 3586 | * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com> |
| 3587 | */ |
| 3588 | [pbn_ADDIDATA_PCIe_1_3906250] = { |
| 3589 | .flags = FL_BASE0, |
| 3590 | .num_ports = 1, |
| 3591 | .base_baud = 3906250, |
| 3592 | .uart_offset = 0x200, |
| 3593 | .first_offset = 0x1000, |
| 3594 | }, |
| 3595 | [pbn_ADDIDATA_PCIe_2_3906250] = { |
| 3596 | .flags = FL_BASE0, |
| 3597 | .num_ports = 2, |
| 3598 | .base_baud = 3906250, |
| 3599 | .uart_offset = 0x200, |
| 3600 | .first_offset = 0x1000, |
| 3601 | }, |
| 3602 | [pbn_ADDIDATA_PCIe_4_3906250] = { |
| 3603 | .flags = FL_BASE0, |
| 3604 | .num_ports = 4, |
| 3605 | .base_baud = 3906250, |
| 3606 | .uart_offset = 0x200, |
| 3607 | .first_offset = 0x1000, |
| 3608 | }, |
| 3609 | [pbn_ADDIDATA_PCIe_8_3906250] = { |
| 3610 | .flags = FL_BASE0, |
| 3611 | .num_ports = 8, |
| 3612 | .base_baud = 3906250, |
| 3613 | .uart_offset = 0x200, |
| 3614 | .first_offset = 0x1000, |
| 3615 | }, |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 3616 | [pbn_ce4100_1_115200] = { |
Maxime Bizon | 08ec212 | 2012-10-19 10:45:07 +0200 | [diff] [blame] | 3617 | .flags = FL_BASE_BARS, |
| 3618 | .num_ports = 2, |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 3619 | .base_baud = 921600, |
| 3620 | .reg_shift = 2, |
| 3621 | }, |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 3622 | [pbn_omegapci] = { |
| 3623 | .flags = FL_BASE0, |
| 3624 | .num_ports = 8, |
| 3625 | .base_baud = 115200, |
| 3626 | .uart_offset = 0x200, |
| 3627 | }, |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 3628 | [pbn_NETMOS9900_2s_115200] = { |
| 3629 | .flags = FL_BASE0, |
| 3630 | .num_ports = 2, |
| 3631 | .base_baud = 115200, |
| 3632 | }, |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 3633 | [pbn_brcm_trumanage] = { |
| 3634 | .flags = FL_BASE0, |
| 3635 | .num_ports = 1, |
| 3636 | .reg_shift = 2, |
| 3637 | .base_baud = 115200, |
| 3638 | }, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 3639 | [pbn_fintek_4] = { |
| 3640 | .num_ports = 4, |
| 3641 | .uart_offset = 8, |
| 3642 | .base_baud = 115200, |
| 3643 | .first_offset = 0x40, |
| 3644 | }, |
| 3645 | [pbn_fintek_8] = { |
| 3646 | .num_ports = 8, |
| 3647 | .uart_offset = 8, |
| 3648 | .base_baud = 115200, |
| 3649 | .first_offset = 0x40, |
| 3650 | }, |
| 3651 | [pbn_fintek_12] = { |
| 3652 | .num_ports = 12, |
| 3653 | .uart_offset = 8, |
| 3654 | .base_baud = 115200, |
| 3655 | .first_offset = 0x40, |
| 3656 | }, |
Ji-Ze Hong (Peter Hong) | 68e26a8 | 2019-08-16 13:27:29 +0800 | [diff] [blame] | 3657 | [pbn_fintek_F81504A] = { |
| 3658 | .num_ports = 4, |
| 3659 | .uart_offset = 8, |
| 3660 | .base_baud = 115200, |
| 3661 | }, |
| 3662 | [pbn_fintek_F81508A] = { |
| 3663 | .num_ports = 8, |
| 3664 | .uart_offset = 8, |
| 3665 | .base_baud = 115200, |
| 3666 | }, |
| 3667 | [pbn_fintek_F81512A] = { |
| 3668 | .num_ports = 12, |
| 3669 | .uart_offset = 8, |
| 3670 | .base_baud = 115200, |
| 3671 | }, |
Jeremy McNicoll | 7dde557 | 2016-02-02 13:00:45 -0800 | [diff] [blame] | 3672 | [pbn_wch382_2] = { |
| 3673 | .flags = FL_BASE0, |
| 3674 | .num_ports = 2, |
| 3675 | .base_baud = 115200, |
| 3676 | .uart_offset = 8, |
| 3677 | .first_offset = 0xC0, |
| 3678 | }, |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 3679 | [pbn_wch384_4] = { |
| 3680 | .flags = FL_BASE0, |
| 3681 | .num_ports = 4, |
| 3682 | .base_baud = 115200, |
| 3683 | .uart_offset = 8, |
| 3684 | .first_offset = 0xC0, |
| 3685 | }, |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 3686 | [pbn_wch384_8] = { |
| 3687 | .flags = FL_BASE0, |
| 3688 | .num_ports = 8, |
| 3689 | .base_baud = 115200, |
| 3690 | .uart_offset = 8, |
| 3691 | .first_offset = 0x00, |
| 3692 | }, |
Adam Lee | 89c043a | 2015-08-03 13:28:13 +0800 | [diff] [blame] | 3693 | /* |
| 3694 | * Pericom PI7C9X795[1248] Uno/Dual/Quad/Octal UART |
| 3695 | */ |
| 3696 | [pbn_pericom_PI7C9X7951] = { |
| 3697 | .flags = FL_BASE0, |
| 3698 | .num_ports = 1, |
| 3699 | .base_baud = 921600, |
| 3700 | .uart_offset = 0x8, |
| 3701 | }, |
| 3702 | [pbn_pericom_PI7C9X7952] = { |
| 3703 | .flags = FL_BASE0, |
| 3704 | .num_ports = 2, |
| 3705 | .base_baud = 921600, |
| 3706 | .uart_offset = 0x8, |
| 3707 | }, |
| 3708 | [pbn_pericom_PI7C9X7954] = { |
| 3709 | .flags = FL_BASE0, |
| 3710 | .num_ports = 4, |
| 3711 | .base_baud = 921600, |
| 3712 | .uart_offset = 0x8, |
| 3713 | }, |
| 3714 | [pbn_pericom_PI7C9X7958] = { |
| 3715 | .flags = FL_BASE0, |
| 3716 | .num_ports = 8, |
| 3717 | .base_baud = 921600, |
| 3718 | .uart_offset = 0x8, |
| 3719 | }, |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 3720 | [pbn_sunix_pci_1s] = { |
| 3721 | .num_ports = 1, |
| 3722 | .base_baud = 921600, |
| 3723 | .uart_offset = 0x8, |
| 3724 | }, |
| 3725 | [pbn_sunix_pci_2s] = { |
| 3726 | .num_ports = 2, |
| 3727 | .base_baud = 921600, |
| 3728 | .uart_offset = 0x8, |
| 3729 | }, |
| 3730 | [pbn_sunix_pci_4s] = { |
| 3731 | .num_ports = 4, |
| 3732 | .base_baud = 921600, |
| 3733 | .uart_offset = 0x8, |
| 3734 | }, |
| 3735 | [pbn_sunix_pci_8s] = { |
| 3736 | .num_ports = 8, |
| 3737 | .base_baud = 921600, |
| 3738 | .uart_offset = 0x8, |
| 3739 | }, |
| 3740 | [pbn_sunix_pci_16s] = { |
| 3741 | .num_ports = 16, |
| 3742 | .base_baud = 921600, |
| 3743 | .uart_offset = 0x8, |
| 3744 | }, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 3745 | [pbn_titan_1_4000000] = { |
| 3746 | .flags = FL_BASE0, |
| 3747 | .num_ports = 1, |
| 3748 | .base_baud = 4000000, |
| 3749 | .uart_offset = 0x200, |
| 3750 | .first_offset = 0x1000, |
| 3751 | }, |
| 3752 | [pbn_titan_2_4000000] = { |
| 3753 | .flags = FL_BASE0, |
| 3754 | .num_ports = 2, |
| 3755 | .base_baud = 4000000, |
| 3756 | .uart_offset = 0x200, |
| 3757 | .first_offset = 0x1000, |
| 3758 | }, |
| 3759 | [pbn_titan_4_4000000] = { |
| 3760 | .flags = FL_BASE0, |
| 3761 | .num_ports = 4, |
| 3762 | .base_baud = 4000000, |
| 3763 | .uart_offset = 0x200, |
| 3764 | .first_offset = 0x1000, |
| 3765 | }, |
| 3766 | [pbn_titan_8_4000000] = { |
| 3767 | .flags = FL_BASE0, |
| 3768 | .num_ports = 8, |
| 3769 | .base_baud = 4000000, |
| 3770 | .uart_offset = 0x200, |
| 3771 | .first_offset = 0x1000, |
| 3772 | }, |
Kai-Heng Feng | d193db7 | 2019-08-17 00:51:24 +0800 | [diff] [blame] | 3773 | [pbn_moxa8250_2p] = { |
| 3774 | .flags = FL_BASE1, |
| 3775 | .num_ports = 2, |
| 3776 | .base_baud = 921600, |
| 3777 | .uart_offset = 0x200, |
| 3778 | }, |
| 3779 | [pbn_moxa8250_4p] = { |
| 3780 | .flags = FL_BASE1, |
| 3781 | .num_ports = 4, |
| 3782 | .base_baud = 921600, |
| 3783 | .uart_offset = 0x200, |
| 3784 | }, |
| 3785 | [pbn_moxa8250_8p] = { |
| 3786 | .flags = FL_BASE1, |
| 3787 | .num_ports = 8, |
| 3788 | .base_baud = 921600, |
| 3789 | .uart_offset = 0x200, |
| 3790 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3791 | }; |
| 3792 | |
Guainluca Anzolin | 6971c63 | 2012-09-04 15:56:12 +0100 | [diff] [blame] | 3793 | static const struct pci_device_id blacklist[] = { |
| 3794 | /* softmodems */ |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 3795 | { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */ |
Maciej Szmigiero | ebf7c06 | 2010-10-26 21:48:21 +0200 | [diff] [blame] | 3796 | { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */ |
| 3797 | { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */ |
Guainluca Anzolin | 6971c63 | 2012-09-04 15:56:12 +0100 | [diff] [blame] | 3798 | |
| 3799 | /* multi-io cards handled by parport_serial */ |
| 3800 | { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */ |
Ezequiel Garcia | feb5814 | 2014-05-24 15:24:51 -0300 | [diff] [blame] | 3801 | { PCI_DEVICE(0x4348, 0x5053), }, /* WCH CH353 1S1P */ |
Sergej Pupykin | 2fdd8c8 | 2014-11-06 14:36:31 +0300 | [diff] [blame] | 3802 | { PCI_DEVICE(0x1c00, 0x3250), }, /* WCH CH382 2S1P */ |
Heikki Krogerus | d9eda9b | 2015-10-13 13:29:02 +0300 | [diff] [blame] | 3803 | |
| 3804 | /* Intel platforms with MID UART */ |
| 3805 | { PCI_VDEVICE(INTEL, 0x081b), }, |
| 3806 | { PCI_VDEVICE(INTEL, 0x081c), }, |
| 3807 | { PCI_VDEVICE(INTEL, 0x081d), }, |
| 3808 | { PCI_VDEVICE(INTEL, 0x1191), }, |
Andy Shevchenko | daf3930 | 2017-09-22 15:11:56 +0300 | [diff] [blame] | 3809 | { PCI_VDEVICE(INTEL, 0x18d8), }, |
Heikki Krogerus | 6ede6dc | 2015-10-13 13:29:06 +0300 | [diff] [blame] | 3810 | { PCI_VDEVICE(INTEL, 0x19d8), }, |
Andy Shevchenko | a13e19c | 2016-08-17 19:20:27 +0300 | [diff] [blame] | 3811 | |
| 3812 | /* Intel platforms with DesignWare UART */ |
Andy Shevchenko | 6bb5d75 | 2016-08-17 19:20:28 +0300 | [diff] [blame] | 3813 | { PCI_VDEVICE(INTEL, 0x0936), }, |
Andy Shevchenko | a13e19c | 2016-08-17 19:20:27 +0300 | [diff] [blame] | 3814 | { PCI_VDEVICE(INTEL, 0x0f0a), }, |
| 3815 | { PCI_VDEVICE(INTEL, 0x0f0c), }, |
| 3816 | { PCI_VDEVICE(INTEL, 0x228a), }, |
| 3817 | { PCI_VDEVICE(INTEL, 0x228c), }, |
Andy Shevchenko | 7f0909d | 2021-07-13 13:17:39 +0300 | [diff] [blame] | 3818 | { PCI_VDEVICE(INTEL, 0x4b96), }, |
| 3819 | { PCI_VDEVICE(INTEL, 0x4b97), }, |
| 3820 | { PCI_VDEVICE(INTEL, 0x4b98), }, |
| 3821 | { PCI_VDEVICE(INTEL, 0x4b99), }, |
| 3822 | { PCI_VDEVICE(INTEL, 0x4b9a), }, |
| 3823 | { PCI_VDEVICE(INTEL, 0x4b9b), }, |
Andy Shevchenko | a13e19c | 2016-08-17 19:20:27 +0300 | [diff] [blame] | 3824 | { PCI_VDEVICE(INTEL, 0x9ce3), }, |
| 3825 | { PCI_VDEVICE(INTEL, 0x9ce4), }, |
Sudip Mukherjee | 5d1a238 | 2017-01-30 22:28:22 +0000 | [diff] [blame] | 3826 | |
| 3827 | /* Exar devices */ |
| 3828 | { PCI_VDEVICE(EXAR, PCI_ANY_ID), }, |
Jan Kiszka | fc6cc96 | 2017-02-08 17:09:06 +0100 | [diff] [blame] | 3829 | { PCI_VDEVICE(COMMTECH, PCI_ANY_ID), }, |
Heikki Krogerus | 54b2f30 | 2019-01-24 23:51:22 +0200 | [diff] [blame] | 3830 | |
| 3831 | /* End of the black list */ |
| 3832 | { } |
Christian Schmidt | 436bbd4 | 2007-08-22 14:01:19 -0700 | [diff] [blame] | 3833 | }; |
| 3834 | |
Andy Shevchenko | 7d8905d | 2017-07-24 20:28:32 +0300 | [diff] [blame] | 3835 | static int serial_pci_is_class_communication(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3836 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3837 | /* |
| 3838 | * If it is not a communications device or the programming |
| 3839 | * interface is greater than 6, give up. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3840 | */ |
| 3841 | if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) && |
Andy Shevchenko | e7f3e99 | 2018-02-02 20:39:13 +0200 | [diff] [blame] | 3842 | ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MULTISERIAL) && |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3843 | ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) || |
| 3844 | (dev->class & 0xff) > 6) |
| 3845 | return -ENODEV; |
| 3846 | |
Andy Shevchenko | 7d8905d | 2017-07-24 20:28:32 +0300 | [diff] [blame] | 3847 | return 0; |
| 3848 | } |
| 3849 | |
Andy Shevchenko | 7d8905d | 2017-07-24 20:28:32 +0300 | [diff] [blame] | 3850 | /* |
| 3851 | * Given a complete unknown PCI device, try to use some heuristics to |
| 3852 | * guess what the configuration might be, based on the pitiful PCI |
| 3853 | * serial specs. Returns 0 on success, -ENODEV on failure. |
| 3854 | */ |
| 3855 | static int |
| 3856 | serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) |
| 3857 | { |
| 3858 | int num_iomem, num_port, first_port = -1, i; |
Andy Shevchenko | 824d17c | 2019-01-24 23:51:21 +0200 | [diff] [blame] | 3859 | int rc; |
| 3860 | |
| 3861 | rc = serial_pci_is_class_communication(dev); |
| 3862 | if (rc) |
| 3863 | return rc; |
Andy Shevchenko | 7d8905d | 2017-07-24 20:28:32 +0300 | [diff] [blame] | 3864 | |
Andy Shevchenko | e7f3e99 | 2018-02-02 20:39:13 +0200 | [diff] [blame] | 3865 | /* |
| 3866 | * Should we try to make guesses for multiport serial devices later? |
| 3867 | */ |
| 3868 | if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_MULTISERIAL) |
| 3869 | return -ENODEV; |
| 3870 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3871 | num_iomem = num_port = 0; |
Denis Efremov | c9c13ba | 2019-09-28 02:43:08 +0300 | [diff] [blame] | 3872 | for (i = 0; i < PCI_STD_NUM_BARS; i++) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3873 | if (pci_resource_flags(dev, i) & IORESOURCE_IO) { |
| 3874 | num_port++; |
| 3875 | if (first_port == -1) |
| 3876 | first_port = i; |
| 3877 | } |
| 3878 | if (pci_resource_flags(dev, i) & IORESOURCE_MEM) |
| 3879 | num_iomem++; |
| 3880 | } |
| 3881 | |
| 3882 | /* |
| 3883 | * If there is 1 or 0 iomem regions, and exactly one port, |
| 3884 | * use it. We guess the number of ports based on the IO |
| 3885 | * region size. |
| 3886 | */ |
| 3887 | if (num_iomem <= 1 && num_port == 1) { |
| 3888 | board->flags = first_port; |
| 3889 | board->num_ports = pci_resource_len(dev, first_port) / 8; |
| 3890 | return 0; |
| 3891 | } |
| 3892 | |
| 3893 | /* |
| 3894 | * Now guess if we've got a board which indexes by BARs. |
| 3895 | * Each IO BAR should be 8 bytes, and they should follow |
| 3896 | * consecutively. |
| 3897 | */ |
| 3898 | first_port = -1; |
| 3899 | num_port = 0; |
Denis Efremov | c9c13ba | 2019-09-28 02:43:08 +0300 | [diff] [blame] | 3900 | for (i = 0; i < PCI_STD_NUM_BARS; i++) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3901 | if (pci_resource_flags(dev, i) & IORESOURCE_IO && |
| 3902 | pci_resource_len(dev, i) == 8 && |
| 3903 | (first_port == -1 || (first_port + num_port) == i)) { |
| 3904 | num_port++; |
| 3905 | if (first_port == -1) |
| 3906 | first_port = i; |
| 3907 | } |
| 3908 | } |
| 3909 | |
| 3910 | if (num_port > 1) { |
| 3911 | board->flags = first_port | FL_BASE_BARS; |
| 3912 | board->num_ports = num_port; |
| 3913 | return 0; |
| 3914 | } |
| 3915 | |
| 3916 | return -ENODEV; |
| 3917 | } |
| 3918 | |
| 3919 | static inline int |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 3920 | serial_pci_matches(const struct pciserial_board *board, |
| 3921 | const struct pciserial_board *guessed) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3922 | { |
| 3923 | return |
| 3924 | board->num_ports == guessed->num_ports && |
| 3925 | board->base_baud == guessed->base_baud && |
| 3926 | board->uart_offset == guessed->uart_offset && |
| 3927 | board->reg_shift == guessed->reg_shift && |
| 3928 | board->first_offset == guessed->first_offset; |
| 3929 | } |
| 3930 | |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 3931 | struct serial_private * |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 3932 | pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board) |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 3933 | { |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 3934 | struct uart_8250_port uart; |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 3935 | struct serial_private *priv; |
| 3936 | struct pci_serial_quirk *quirk; |
| 3937 | int rc, nr_ports, i; |
| 3938 | |
| 3939 | nr_ports = board->num_ports; |
| 3940 | |
| 3941 | /* |
| 3942 | * Find an init and setup quirks. |
| 3943 | */ |
| 3944 | quirk = find_quirk(dev); |
| 3945 | |
| 3946 | /* |
| 3947 | * Run the new-style initialization function. |
| 3948 | * The initialization function returns: |
| 3949 | * <0 - error |
| 3950 | * 0 - use board->num_ports |
| 3951 | * >0 - number of ports |
| 3952 | */ |
| 3953 | if (quirk->init) { |
| 3954 | rc = quirk->init(dev); |
| 3955 | if (rc < 0) { |
| 3956 | priv = ERR_PTR(rc); |
| 3957 | goto err_out; |
| 3958 | } |
| 3959 | if (rc) |
| 3960 | nr_ports = rc; |
| 3961 | } |
| 3962 | |
Len Baker | 42c457c | 2021-09-05 17:57:28 +0200 | [diff] [blame] | 3963 | priv = kzalloc(struct_size(priv, line, nr_ports), GFP_KERNEL); |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 3964 | if (!priv) { |
| 3965 | priv = ERR_PTR(-ENOMEM); |
| 3966 | goto err_deinit; |
| 3967 | } |
| 3968 | |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 3969 | priv->dev = dev; |
| 3970 | priv->quirk = quirk; |
| 3971 | |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 3972 | memset(&uart, 0, sizeof(uart)); |
| 3973 | uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; |
| 3974 | uart.port.uartclk = board->base_baud * 16; |
Ralf Ramsauer | 8428413 | 2019-08-12 13:21:52 +0200 | [diff] [blame] | 3975 | |
Christian Gmeiner | 9808f9b | 2021-05-27 11:54:40 +0200 | [diff] [blame] | 3976 | if (board->flags & FL_NOIRQ) { |
| 3977 | uart.port.irq = 0; |
Ralf Ramsauer | 8428413 | 2019-08-12 13:21:52 +0200 | [diff] [blame] | 3978 | } else { |
Christian Gmeiner | 9808f9b | 2021-05-27 11:54:40 +0200 | [diff] [blame] | 3979 | if (pci_match_id(pci_use_msi, dev)) { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 3980 | pci_dbg(dev, "Using MSI(-X) interrupts\n"); |
Christian Gmeiner | 9808f9b | 2021-05-27 11:54:40 +0200 | [diff] [blame] | 3981 | pci_set_master(dev); |
Mario Kleiner | 341abd6 | 2021-07-29 06:33:06 +0200 | [diff] [blame] | 3982 | uart.port.flags &= ~UPF_SHARE_IRQ; |
Christian Gmeiner | 9808f9b | 2021-05-27 11:54:40 +0200 | [diff] [blame] | 3983 | rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES); |
| 3984 | } else { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 3985 | pci_dbg(dev, "Using legacy interrupts\n"); |
Christian Gmeiner | 9808f9b | 2021-05-27 11:54:40 +0200 | [diff] [blame] | 3986 | rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY); |
| 3987 | } |
| 3988 | if (rc < 0) { |
| 3989 | kfree(priv); |
| 3990 | priv = ERR_PTR(rc); |
| 3991 | goto err_deinit; |
| 3992 | } |
| 3993 | |
| 3994 | uart.port.irq = pci_irq_vector(dev, 0); |
Ralf Ramsauer | 8428413 | 2019-08-12 13:21:52 +0200 | [diff] [blame] | 3995 | } |
| 3996 | |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 3997 | uart.port.dev = &dev->dev; |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 3998 | |
| 3999 | for (i = 0; i < nr_ports; i++) { |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 4000 | if (quirk->setup(priv, board, &uart, i)) |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4001 | break; |
| 4002 | |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 4003 | pci_dbg(dev, "Setup PCI port: port %lx, irq %d, type %d\n", |
Greg Kroah-Hartman | af8c5b8 | 2013-09-28 13:01:59 -0700 | [diff] [blame] | 4004 | uart.port.iobase, uart.port.irq, uart.port.iotype); |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4005 | |
Alan Cox | 2655a2c | 2012-07-12 12:59:50 +0100 | [diff] [blame] | 4006 | priv->line[i] = serial8250_register_8250_port(&uart); |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4007 | if (priv->line[i] < 0) { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 4008 | pci_err(dev, |
Greg Kroah-Hartman | af8c5b8 | 2013-09-28 13:01:59 -0700 | [diff] [blame] | 4009 | "Couldn't register serial port %lx, irq %d, type %d, error %d\n", |
| 4010 | uart.port.iobase, uart.port.irq, |
| 4011 | uart.port.iotype, priv->line[i]); |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4012 | break; |
| 4013 | } |
| 4014 | } |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4015 | priv->nr = i; |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 4016 | priv->board = board; |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4017 | return priv; |
| 4018 | |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4019 | err_deinit: |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4020 | if (quirk->exit) |
| 4021 | quirk->exit(dev); |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4022 | err_out: |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4023 | return priv; |
| 4024 | } |
| 4025 | EXPORT_SYMBOL_GPL(pciserial_init_ports); |
| 4026 | |
Wei Yongjun | 80cd94e | 2017-02-05 16:12:34 +0000 | [diff] [blame] | 4027 | static void pciserial_detach_ports(struct serial_private *priv) |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4028 | { |
| 4029 | struct pci_serial_quirk *quirk; |
| 4030 | int i; |
| 4031 | |
| 4032 | for (i = 0; i < priv->nr; i++) |
| 4033 | serial8250_unregister_port(priv->line[i]); |
| 4034 | |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4035 | /* |
| 4036 | * Find the exit quirks. |
| 4037 | */ |
| 4038 | quirk = find_quirk(priv->dev); |
| 4039 | if (quirk->exit) |
| 4040 | quirk->exit(priv->dev); |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 4041 | } |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4042 | |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 4043 | void pciserial_remove_ports(struct serial_private *priv) |
| 4044 | { |
| 4045 | pciserial_detach_ports(priv); |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4046 | kfree(priv); |
| 4047 | } |
| 4048 | EXPORT_SYMBOL_GPL(pciserial_remove_ports); |
| 4049 | |
| 4050 | void pciserial_suspend_ports(struct serial_private *priv) |
| 4051 | { |
| 4052 | int i; |
| 4053 | |
| 4054 | for (i = 0; i < priv->nr; i++) |
| 4055 | if (priv->line[i] >= 0) |
| 4056 | serial8250_suspend_port(priv->line[i]); |
Dan Williams | 5f1a389 | 2012-04-10 14:11:03 -0700 | [diff] [blame] | 4057 | |
| 4058 | /* |
| 4059 | * Ensure that every init quirk is properly torn down |
| 4060 | */ |
| 4061 | if (priv->quirk->exit) |
| 4062 | priv->quirk->exit(priv->dev); |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4063 | } |
| 4064 | EXPORT_SYMBOL_GPL(pciserial_suspend_ports); |
| 4065 | |
| 4066 | void pciserial_resume_ports(struct serial_private *priv) |
| 4067 | { |
| 4068 | int i; |
| 4069 | |
| 4070 | /* |
| 4071 | * Ensure that the board is correctly configured. |
| 4072 | */ |
| 4073 | if (priv->quirk->init) |
| 4074 | priv->quirk->init(priv->dev); |
| 4075 | |
| 4076 | for (i = 0; i < priv->nr; i++) |
| 4077 | if (priv->line[i] >= 0) |
| 4078 | serial8250_resume_port(priv->line[i]); |
| 4079 | } |
| 4080 | EXPORT_SYMBOL_GPL(pciserial_resume_ports); |
| 4081 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4082 | /* |
| 4083 | * Probe one serial board. Unfortunately, there is no rhyme nor reason |
| 4084 | * to the arrangement of serial ports on a PCI card. |
| 4085 | */ |
Bill Pemberton | 9671f09 | 2012-11-19 13:21:50 -0500 | [diff] [blame] | 4086 | static int |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4087 | pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent) |
| 4088 | { |
Frédéric Brière | 5bf8f50 | 2011-05-29 15:08:03 -0400 | [diff] [blame] | 4089 | struct pci_serial_quirk *quirk; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4090 | struct serial_private *priv; |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 4091 | const struct pciserial_board *board; |
Heikki Krogerus | 54b2f30 | 2019-01-24 23:51:22 +0200 | [diff] [blame] | 4092 | const struct pci_device_id *exclude; |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 4093 | struct pciserial_board tmp; |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4094 | int rc; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4095 | |
Frédéric Brière | 5bf8f50 | 2011-05-29 15:08:03 -0400 | [diff] [blame] | 4096 | quirk = find_quirk(dev); |
| 4097 | if (quirk->probe) { |
| 4098 | rc = quirk->probe(dev); |
| 4099 | if (rc) |
| 4100 | return rc; |
| 4101 | } |
| 4102 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4103 | if (ent->driver_data >= ARRAY_SIZE(pci_boards)) { |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 4104 | pci_err(dev, "invalid driver_data: %ld\n", ent->driver_data); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4105 | return -EINVAL; |
| 4106 | } |
| 4107 | |
| 4108 | board = &pci_boards[ent->driver_data]; |
| 4109 | |
Heikki Krogerus | 54b2f30 | 2019-01-24 23:51:22 +0200 | [diff] [blame] | 4110 | exclude = pci_match_id(blacklist, dev); |
| 4111 | if (exclude) |
| 4112 | return -ENODEV; |
Andy Shevchenko | 7d8905d | 2017-07-24 20:28:32 +0300 | [diff] [blame] | 4113 | |
Andy Shevchenko | 3f64b1d | 2016-02-15 18:01:51 +0200 | [diff] [blame] | 4114 | rc = pcim_enable_device(dev); |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 4115 | pci_save_state(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4116 | if (rc) |
| 4117 | return rc; |
| 4118 | |
| 4119 | if (ent->driver_data == pbn_default) { |
| 4120 | /* |
| 4121 | * Use a copy of the pci_board entry for this; |
| 4122 | * avoid changing entries in the table. |
| 4123 | */ |
Russell King | 1c7c1fe | 2005-07-27 11:31:19 +0100 | [diff] [blame] | 4124 | memcpy(&tmp, board, sizeof(struct pciserial_board)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4125 | board = &tmp; |
| 4126 | |
| 4127 | /* |
| 4128 | * We matched one of our class entries. Try to |
| 4129 | * determine the parameters of this board. |
| 4130 | */ |
Russell King | 975a1a7d | 2009-01-02 13:44:27 +0000 | [diff] [blame] | 4131 | rc = serial_pci_guess_board(dev, &tmp); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4132 | if (rc) |
Andy Shevchenko | 3f64b1d | 2016-02-15 18:01:51 +0200 | [diff] [blame] | 4133 | return rc; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4134 | } else { |
| 4135 | /* |
| 4136 | * We matched an explicit entry. If we are able to |
| 4137 | * detect this boards settings with our heuristic, |
| 4138 | * then we no longer need this entry. |
| 4139 | */ |
Russell King | 1c7c1fe | 2005-07-27 11:31:19 +0100 | [diff] [blame] | 4140 | memcpy(&tmp, &pci_boards[pbn_default], |
| 4141 | sizeof(struct pciserial_board)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4142 | rc = serial_pci_guess_board(dev, &tmp); |
| 4143 | if (rc == 0 && serial_pci_matches(board, &tmp)) |
| 4144 | moan_device("Redundant entry in serial pci_table.", |
| 4145 | dev); |
| 4146 | } |
| 4147 | |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4148 | priv = pciserial_init_ports(dev, board); |
Andy Shevchenko | 3f64b1d | 2016-02-15 18:01:51 +0200 | [diff] [blame] | 4149 | if (IS_ERR(priv)) |
| 4150 | return PTR_ERR(priv); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4151 | |
Andy Shevchenko | 3f64b1d | 2016-02-15 18:01:51 +0200 | [diff] [blame] | 4152 | pci_set_drvdata(dev, priv); |
| 4153 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4154 | } |
| 4155 | |
Bill Pemberton | ae8d8a1 | 2012-11-19 13:26:18 -0500 | [diff] [blame] | 4156 | static void pciserial_remove_one(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4157 | { |
| 4158 | struct serial_private *priv = pci_get_drvdata(dev); |
| 4159 | |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4160 | pciserial_remove_ports(priv); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4161 | } |
| 4162 | |
Andy Shevchenko | 61702c3 | 2015-02-02 14:53:26 +0200 | [diff] [blame] | 4163 | #ifdef CONFIG_PM_SLEEP |
| 4164 | static int pciserial_suspend_one(struct device *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4165 | { |
Chuhong Yuan | 76b4106 | 2019-07-24 21:17:58 +0800 | [diff] [blame] | 4166 | struct serial_private *priv = dev_get_drvdata(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4167 | |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4168 | if (priv) |
| 4169 | pciserial_suspend_ports(priv); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4170 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4171 | return 0; |
| 4172 | } |
| 4173 | |
Andy Shevchenko | 61702c3 | 2015-02-02 14:53:26 +0200 | [diff] [blame] | 4174 | static int pciserial_resume_one(struct device *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4175 | { |
Andy Shevchenko | 61702c3 | 2015-02-02 14:53:26 +0200 | [diff] [blame] | 4176 | struct pci_dev *pdev = to_pci_dev(dev); |
| 4177 | struct serial_private *priv = pci_get_drvdata(pdev); |
Dirk Hohndel | ccb9d59 | 2007-10-29 06:28:17 -0700 | [diff] [blame] | 4178 | int err; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4179 | |
| 4180 | if (priv) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4181 | /* |
| 4182 | * The device may have been disabled. Re-enable it. |
| 4183 | */ |
Andy Shevchenko | 61702c3 | 2015-02-02 14:53:26 +0200 | [diff] [blame] | 4184 | err = pci_enable_device(pdev); |
Alan Cox | 40836c4 | 2008-10-13 10:36:11 +0100 | [diff] [blame] | 4185 | /* FIXME: We cannot simply error out here */ |
Dirk Hohndel | ccb9d59 | 2007-10-29 06:28:17 -0700 | [diff] [blame] | 4186 | if (err) |
Andy Shevchenko | 1177384 | 2021-10-22 16:51:47 +0300 | [diff] [blame] | 4187 | pci_err(pdev, "Unable to re-enable ports, trying to continue.\n"); |
Russell King | 241fc43 | 2005-07-27 11:35:54 +0100 | [diff] [blame] | 4188 | pciserial_resume_ports(priv); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4189 | } |
| 4190 | return 0; |
| 4191 | } |
Alexey Dobriyan | 1d5e799 | 2006-09-25 16:51:27 -0700 | [diff] [blame] | 4192 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4193 | |
Andy Shevchenko | 61702c3 | 2015-02-02 14:53:26 +0200 | [diff] [blame] | 4194 | static SIMPLE_DEV_PM_OPS(pciserial_pm_ops, pciserial_suspend_one, |
| 4195 | pciserial_resume_one); |
| 4196 | |
Arvind Yadav | c40f716 | 2017-07-23 15:31:06 +0530 | [diff] [blame] | 4197 | static const struct pci_device_id serial_pci_tbl[] = { |
Michael Bramer | 78d70d4 | 2009-01-27 11:51:16 +0000 | [diff] [blame] | 4198 | /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */ |
| 4199 | { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3620, |
| 4200 | PCI_DEVICE_ID_ADVANTECH_PCI3620, 0x0001, 0, 0, |
| 4201 | pbn_b2_8_921600 }, |
Thomee Wright | 0c6d774 | 2014-05-19 20:30:51 +0000 | [diff] [blame] | 4202 | /* Advantech also use 0x3618 and 0xf618 */ |
| 4203 | { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3618, |
| 4204 | PCI_DEVICE_ID_ADVANTECH_PCI3618, PCI_ANY_ID, 0, 0, |
| 4205 | pbn_b0_4_921600 }, |
| 4206 | { PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCIf618, |
| 4207 | PCI_DEVICE_ID_ADVANTECH_PCI3618, PCI_ANY_ID, 0, 0, |
| 4208 | pbn_b0_4_921600 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4209 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960, |
| 4210 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4211 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0, |
| 4212 | pbn_b1_8_1382400 }, |
| 4213 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960, |
| 4214 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4215 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0, |
| 4216 | pbn_b1_4_1382400 }, |
| 4217 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960, |
| 4218 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4219 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0, |
| 4220 | pbn_b1_2_1382400 }, |
| 4221 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4222 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4223 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0, |
| 4224 | pbn_b1_8_1382400 }, |
| 4225 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4226 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4227 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232, 0, 0, |
| 4228 | pbn_b1_4_1382400 }, |
| 4229 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4230 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4231 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232, 0, 0, |
| 4232 | pbn_b1_2_1382400 }, |
| 4233 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4234 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4235 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485, 0, 0, |
| 4236 | pbn_b1_8_921600 }, |
| 4237 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4238 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4239 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4, 0, 0, |
| 4240 | pbn_b1_8_921600 }, |
| 4241 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4242 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4243 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485, 0, 0, |
| 4244 | pbn_b1_4_921600 }, |
| 4245 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4246 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4247 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2, 0, 0, |
| 4248 | pbn_b1_4_921600 }, |
| 4249 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4250 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4251 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485, 0, 0, |
| 4252 | pbn_b1_2_921600 }, |
| 4253 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4254 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4255 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6, 0, 0, |
| 4256 | pbn_b1_8_921600 }, |
| 4257 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4258 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4259 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1, 0, 0, |
| 4260 | pbn_b1_8_921600 }, |
| 4261 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4262 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4263 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1, 0, 0, |
| 4264 | pbn_b1_4_921600 }, |
Gareth Howlett | 26e9286 | 2006-01-04 17:00:42 +0000 | [diff] [blame] | 4265 | { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V351, |
| 4266 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4267 | PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ, 0, 0, |
| 4268 | pbn_b1_2_1250000 }, |
| 4269 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, |
| 4270 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4271 | PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2, 0, 0, |
| 4272 | pbn_b0_2_1843200 }, |
| 4273 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, |
| 4274 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 4275 | PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4, 0, 0, |
| 4276 | pbn_b0_4_1843200 }, |
Yoichi Yuasa | 85d1494 | 2006-02-08 21:46:24 +0000 | [diff] [blame] | 4277 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, |
| 4278 | PCI_VENDOR_ID_AFAVLAB, |
| 4279 | PCI_SUBDEVICE_ID_AFAVLAB_P061, 0, 0, |
| 4280 | pbn_b0_4_1152000 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4281 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4282 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4283 | pbn_b2_bt_1_115200 }, |
| 4284 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM2, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4285 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4286 | pbn_b2_bt_2_115200 }, |
| 4287 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM422, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4288 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4289 | pbn_b2_bt_4_115200 }, |
| 4290 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM232, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4291 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4292 | pbn_b2_bt_2_115200 }, |
| 4293 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM4, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4294 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4295 | pbn_b2_bt_4_115200 }, |
| 4296 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4297 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4298 | pbn_b2_8_115200 }, |
Flavio Leitner | e65f0f8 | 2009-01-02 13:50:43 +0000 | [diff] [blame] | 4299 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_7803, |
| 4300 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4301 | pbn_b2_8_460800 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4302 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8, |
| 4303 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4304 | pbn_b2_8_115200 }, |
| 4305 | |
| 4306 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_GTEK_SERIAL2, |
| 4307 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4308 | pbn_b2_bt_2_115200 }, |
| 4309 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM200, |
| 4310 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4311 | pbn_b2_bt_2_921600 }, |
| 4312 | /* |
| 4313 | * VScom SPCOM800, from sl@s.pl |
| 4314 | */ |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4315 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_SPCOM800, |
| 4316 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4317 | pbn_b2_8_921600 }, |
| 4318 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_1077, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4319 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4320 | pbn_b2_4_921600 }, |
Catalin(ux) M BOIE | b76c5a0 | 2008-07-23 21:29:46 -0700 | [diff] [blame] | 4321 | /* Unknown card - subdevice 0x1584 */ |
| 4322 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4323 | PCI_VENDOR_ID_PLX, |
| 4324 | PCI_SUBDEVICE_ID_UNKNOWN_0x1584, 0, 0, |
Scott Ashcroft | d13402a | 2013-03-03 21:35:06 +0000 | [diff] [blame] | 4325 | pbn_b2_4_115200 }, |
| 4326 | /* Unknown card - subdevice 0x1588 */ |
| 4327 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4328 | PCI_VENDOR_ID_PLX, |
| 4329 | PCI_SUBDEVICE_ID_UNKNOWN_0x1588, 0, 0, |
| 4330 | pbn_b2_8_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4331 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4332 | PCI_SUBVENDOR_ID_KEYSPAN, |
| 4333 | PCI_SUBDEVICE_ID_KEYSPAN_SX2, 0, 0, |
| 4334 | pbn_panacom }, |
| 4335 | { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM, |
| 4336 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4337 | pbn_panacom4 }, |
| 4338 | { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_DUALMODEM, |
| 4339 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4340 | pbn_panacom2 }, |
Matthias Fuchs | a9cccd3 | 2007-02-10 01:46:05 -0800 | [diff] [blame] | 4341 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, |
| 4342 | PCI_VENDOR_ID_ESDGMBH, |
| 4343 | PCI_DEVICE_ID_ESDGMBH_CPCIASIO4, 0, 0, |
| 4344 | pbn_b2_4_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4345 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4346 | PCI_SUBVENDOR_ID_CHASE_PCIFAST, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4347 | PCI_SUBDEVICE_ID_CHASE_PCIFAST4, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4348 | pbn_b2_4_460800 }, |
| 4349 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4350 | PCI_SUBVENDOR_ID_CHASE_PCIFAST, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4351 | PCI_SUBDEVICE_ID_CHASE_PCIFAST8, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4352 | pbn_b2_8_460800 }, |
| 4353 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4354 | PCI_SUBVENDOR_ID_CHASE_PCIFAST, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4355 | PCI_SUBDEVICE_ID_CHASE_PCIFAST16, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4356 | pbn_b2_16_460800 }, |
| 4357 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4358 | PCI_SUBVENDOR_ID_CHASE_PCIFAST, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4359 | PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4360 | pbn_b2_16_460800 }, |
| 4361 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4362 | PCI_SUBVENDOR_ID_CHASE_PCIRAS, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4363 | PCI_SUBDEVICE_ID_CHASE_PCIRAS4, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4364 | pbn_b2_4_460800 }, |
| 4365 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4366 | PCI_SUBVENDOR_ID_CHASE_PCIRAS, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4367 | PCI_SUBDEVICE_ID_CHASE_PCIRAS8, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4368 | pbn_b2_8_460800 }, |
Bjorn Helgaas | add7b58 | 2005-10-24 22:11:57 +0100 | [diff] [blame] | 4369 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, |
| 4370 | PCI_SUBVENDOR_ID_EXSYS, |
| 4371 | PCI_SUBDEVICE_ID_EXSYS_4055, 0, 0, |
Shawn Bohrer | ee4cd1b | 2012-05-28 15:20:47 -0500 | [diff] [blame] | 4372 | pbn_b2_4_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4373 | /* |
| 4374 | * Megawolf Romulus PCI Serial Card, from Mike Hudson |
| 4375 | * (Exoray@isys.ca) |
| 4376 | */ |
| 4377 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_ROMULUS, |
| 4378 | 0x10b5, 0x106a, 0, 0, |
| 4379 | pbn_plx_romulus }, |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 4380 | /* |
Mike Skoog | 1bc8cde | 2014-10-16 13:10:01 -0700 | [diff] [blame] | 4381 | * EndRun Technologies. PCI express device range. |
| 4382 | * EndRun PTP/1588 has 2 Native UARTs. |
| 4383 | */ |
| 4384 | { PCI_VENDOR_ID_ENDRUN, PCI_DEVICE_ID_ENDRUN_1588, |
| 4385 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4386 | pbn_endrun_2_4000000 }, |
| 4387 | /* |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 4388 | * Quatech cards. These actually have configurable clocks but for |
| 4389 | * now we just use the default. |
| 4390 | * |
| 4391 | * 100 series are RS232, 200 series RS422, |
| 4392 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4393 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100, |
| 4394 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4395 | pbn_b1_4_115200 }, |
| 4396 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100, |
| 4397 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4398 | pbn_b1_2_115200 }, |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 4399 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC100E, |
| 4400 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4401 | pbn_b2_2_115200 }, |
| 4402 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC200, |
| 4403 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4404 | pbn_b1_2_115200 }, |
| 4405 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSC200E, |
| 4406 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4407 | pbn_b2_2_115200 }, |
| 4408 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC200, |
| 4409 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4410 | pbn_b1_4_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4411 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100D, |
| 4412 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4413 | pbn_b1_8_115200 }, |
| 4414 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESC100M, |
| 4415 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4416 | pbn_b1_8_115200 }, |
Alan Cox | 55c7c0f | 2012-11-29 09:03:00 +1030 | [diff] [blame] | 4417 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCP100, |
| 4418 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4419 | pbn_b1_4_115200 }, |
| 4420 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCP100, |
| 4421 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4422 | pbn_b1_2_115200 }, |
| 4423 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCP200, |
| 4424 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4425 | pbn_b1_4_115200 }, |
| 4426 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCP200, |
| 4427 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4428 | pbn_b1_2_115200 }, |
| 4429 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCLP100, |
| 4430 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4431 | pbn_b2_4_115200 }, |
| 4432 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCLP100, |
| 4433 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4434 | pbn_b2_2_115200 }, |
| 4435 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SSCLP100, |
| 4436 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4437 | pbn_b2_1_115200 }, |
| 4438 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSCLP200, |
| 4439 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4440 | pbn_b2_4_115200 }, |
| 4441 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_DSCLP200, |
| 4442 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4443 | pbn_b2_2_115200 }, |
| 4444 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SSCLP200, |
| 4445 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4446 | pbn_b2_1_115200 }, |
| 4447 | { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_ESCLP100, |
| 4448 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4449 | pbn_b0_8_115200 }, |
| 4450 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4451 | { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_OXSEMI_16PCI954, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4452 | PCI_VENDOR_ID_SPECIALIX, PCI_SUBDEVICE_ID_SPECIALIX_SPEED4, |
| 4453 | 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4454 | pbn_b0_4_921600 }, |
| 4455 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4456 | PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL, |
| 4457 | 0, 0, |
Andrey Panin | fbc0dc0 | 2005-07-18 11:38:09 +0100 | [diff] [blame] | 4458 | pbn_b0_4_1152000 }, |
Mikulas Patocka | c9bd9d0 | 2010-10-26 14:20:48 -0400 | [diff] [blame] | 4459 | { PCI_VENDOR_ID_OXSEMI, 0x9505, |
| 4460 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4461 | pbn_b0_bt_2_921600 }, |
David Ranson | db1de15 | 2005-07-27 11:43:55 -0700 | [diff] [blame] | 4462 | |
| 4463 | /* |
| 4464 | * The below card is a little controversial since it is the |
| 4465 | * subject of a PCI vendor/device ID clash. (See |
| 4466 | * www.ussg.iu.edu/hypermail/linux/kernel/0303.1/0516.html). |
| 4467 | * For now just used the hex ID 0x950a. |
| 4468 | */ |
| 4469 | { PCI_VENDOR_ID_OXSEMI, 0x950a, |
Flavio Leitner | 26e8220 | 2012-09-21 21:04:34 -0300 | [diff] [blame] | 4470 | PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_00, |
| 4471 | 0, 0, pbn_b0_2_115200 }, |
| 4472 | { PCI_VENDOR_ID_OXSEMI, 0x950a, |
| 4473 | PCI_SUBVENDOR_ID_SIIG, PCI_SUBDEVICE_ID_SIIG_DUAL_30, |
| 4474 | 0, 0, pbn_b0_2_115200 }, |
Niels de Vos | 39aced6 | 2009-01-02 13:46:58 +0000 | [diff] [blame] | 4475 | { PCI_VENDOR_ID_OXSEMI, 0x950a, |
David Ranson | db1de15 | 2005-07-27 11:43:55 -0700 | [diff] [blame] | 4476 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4477 | pbn_b0_2_1130000 }, |
Andre Przywara | 70fd8fd | 2009-06-11 12:41:57 +0100 | [diff] [blame] | 4478 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_C950, |
| 4479 | PCI_VENDOR_ID_OXSEMI, PCI_SUBDEVICE_ID_OXSEMI_C950, 0, 0, |
| 4480 | pbn_b0_1_921600 }, |
Andrey Panin | fbc0dc0 | 2005-07-18 11:38:09 +0100 | [diff] [blame] | 4481 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI954, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4482 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4483 | pbn_b0_4_115200 }, |
| 4484 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952, |
| 4485 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4486 | pbn_b0_bt_2_921600 }, |
Lytochkin Boris | e847003 | 2010-07-26 10:02:26 +0400 | [diff] [blame] | 4487 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI958, |
Anton Wuerfel | 1a33e34 | 2016-01-14 16:08:10 +0100 | [diff] [blame] | 4488 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Lytochkin Boris | e847003 | 2010-07-26 10:02:26 +0400 | [diff] [blame] | 4489 | pbn_b2_8_1152000 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4490 | |
| 4491 | /* |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4492 | * Oxford Semiconductor Inc. Tornado PCI express device range. |
| 4493 | */ |
| 4494 | { PCI_VENDOR_ID_OXSEMI, 0xc101, /* OXPCIe952 1 Legacy UART */ |
| 4495 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4496 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4497 | { PCI_VENDOR_ID_OXSEMI, 0xc105, /* OXPCIe952 1 Legacy UART */ |
| 4498 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4499 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4500 | { PCI_VENDOR_ID_OXSEMI, 0xc11b, /* OXPCIe952 1 Native UART */ |
| 4501 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4502 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4503 | { PCI_VENDOR_ID_OXSEMI, 0xc11f, /* OXPCIe952 1 Native UART */ |
| 4504 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4505 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4506 | { PCI_VENDOR_ID_OXSEMI, 0xc120, /* OXPCIe952 1 Legacy UART */ |
| 4507 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4508 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4509 | { PCI_VENDOR_ID_OXSEMI, 0xc124, /* OXPCIe952 1 Legacy UART */ |
| 4510 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4511 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4512 | { PCI_VENDOR_ID_OXSEMI, 0xc138, /* OXPCIe952 1 Native UART */ |
| 4513 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4514 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4515 | { PCI_VENDOR_ID_OXSEMI, 0xc13d, /* OXPCIe952 1 Native UART */ |
| 4516 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4517 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4518 | { PCI_VENDOR_ID_OXSEMI, 0xc140, /* OXPCIe952 1 Legacy UART */ |
| 4519 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4520 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4521 | { PCI_VENDOR_ID_OXSEMI, 0xc141, /* OXPCIe952 1 Legacy UART */ |
| 4522 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4523 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4524 | { PCI_VENDOR_ID_OXSEMI, 0xc144, /* OXPCIe952 1 Legacy UART */ |
| 4525 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4526 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4527 | { PCI_VENDOR_ID_OXSEMI, 0xc145, /* OXPCIe952 1 Legacy UART */ |
| 4528 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4529 | pbn_b0_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4530 | { PCI_VENDOR_ID_OXSEMI, 0xc158, /* OXPCIe952 2 Native UART */ |
| 4531 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4532 | pbn_oxsemi_2_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4533 | { PCI_VENDOR_ID_OXSEMI, 0xc15d, /* OXPCIe952 2 Native UART */ |
| 4534 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4535 | pbn_oxsemi_2_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4536 | { PCI_VENDOR_ID_OXSEMI, 0xc208, /* OXPCIe954 4 Native UART */ |
| 4537 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4538 | pbn_oxsemi_4_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4539 | { PCI_VENDOR_ID_OXSEMI, 0xc20d, /* OXPCIe954 4 Native UART */ |
| 4540 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4541 | pbn_oxsemi_4_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4542 | { PCI_VENDOR_ID_OXSEMI, 0xc308, /* OXPCIe958 8 Native UART */ |
| 4543 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4544 | pbn_oxsemi_8_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4545 | { PCI_VENDOR_ID_OXSEMI, 0xc30d, /* OXPCIe958 8 Native UART */ |
| 4546 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4547 | pbn_oxsemi_8_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4548 | { PCI_VENDOR_ID_OXSEMI, 0xc40b, /* OXPCIe200 1 Native UART */ |
| 4549 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4550 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4551 | { PCI_VENDOR_ID_OXSEMI, 0xc40f, /* OXPCIe200 1 Native UART */ |
| 4552 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4553 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4554 | { PCI_VENDOR_ID_OXSEMI, 0xc41b, /* OXPCIe200 1 Native UART */ |
| 4555 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4556 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4557 | { PCI_VENDOR_ID_OXSEMI, 0xc41f, /* OXPCIe200 1 Native UART */ |
| 4558 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4559 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4560 | { PCI_VENDOR_ID_OXSEMI, 0xc42b, /* OXPCIe200 1 Native UART */ |
| 4561 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4562 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4563 | { PCI_VENDOR_ID_OXSEMI, 0xc42f, /* OXPCIe200 1 Native UART */ |
| 4564 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4565 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4566 | { PCI_VENDOR_ID_OXSEMI, 0xc43b, /* OXPCIe200 1 Native UART */ |
| 4567 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4568 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4569 | { PCI_VENDOR_ID_OXSEMI, 0xc43f, /* OXPCIe200 1 Native UART */ |
| 4570 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4571 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4572 | { PCI_VENDOR_ID_OXSEMI, 0xc44b, /* OXPCIe200 1 Native UART */ |
| 4573 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4574 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4575 | { PCI_VENDOR_ID_OXSEMI, 0xc44f, /* OXPCIe200 1 Native UART */ |
| 4576 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4577 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4578 | { PCI_VENDOR_ID_OXSEMI, 0xc45b, /* OXPCIe200 1 Native UART */ |
| 4579 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4580 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4581 | { PCI_VENDOR_ID_OXSEMI, 0xc45f, /* OXPCIe200 1 Native UART */ |
| 4582 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4583 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4584 | { PCI_VENDOR_ID_OXSEMI, 0xc46b, /* OXPCIe200 1 Native UART */ |
| 4585 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4586 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4587 | { PCI_VENDOR_ID_OXSEMI, 0xc46f, /* OXPCIe200 1 Native UART */ |
| 4588 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4589 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4590 | { PCI_VENDOR_ID_OXSEMI, 0xc47b, /* OXPCIe200 1 Native UART */ |
| 4591 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4592 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4593 | { PCI_VENDOR_ID_OXSEMI, 0xc47f, /* OXPCIe200 1 Native UART */ |
| 4594 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4595 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4596 | { PCI_VENDOR_ID_OXSEMI, 0xc48b, /* OXPCIe200 1 Native UART */ |
| 4597 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4598 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4599 | { PCI_VENDOR_ID_OXSEMI, 0xc48f, /* OXPCIe200 1 Native UART */ |
| 4600 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4601 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4602 | { PCI_VENDOR_ID_OXSEMI, 0xc49b, /* OXPCIe200 1 Native UART */ |
| 4603 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4604 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4605 | { PCI_VENDOR_ID_OXSEMI, 0xc49f, /* OXPCIe200 1 Native UART */ |
| 4606 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4607 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4608 | { PCI_VENDOR_ID_OXSEMI, 0xc4ab, /* OXPCIe200 1 Native UART */ |
| 4609 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4610 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4611 | { PCI_VENDOR_ID_OXSEMI, 0xc4af, /* OXPCIe200 1 Native UART */ |
| 4612 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4613 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4614 | { PCI_VENDOR_ID_OXSEMI, 0xc4bb, /* OXPCIe200 1 Native UART */ |
| 4615 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4616 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4617 | { PCI_VENDOR_ID_OXSEMI, 0xc4bf, /* OXPCIe200 1 Native UART */ |
| 4618 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4619 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4620 | { PCI_VENDOR_ID_OXSEMI, 0xc4cb, /* OXPCIe200 1 Native UART */ |
| 4621 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4622 | pbn_oxsemi_1_3906250 }, |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4623 | { PCI_VENDOR_ID_OXSEMI, 0xc4cf, /* OXPCIe200 1 Native UART */ |
| 4624 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4625 | pbn_oxsemi_1_3906250 }, |
Lee Howard | b80de36 | 2008-10-21 13:50:14 +0100 | [diff] [blame] | 4626 | /* |
| 4627 | * Mainpine Inc. IQ Express "Rev3" utilizing OxSemi Tornado |
| 4628 | */ |
| 4629 | { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 1 Port V.34 Super-G3 Fax */ |
| 4630 | PCI_VENDOR_ID_MAINPINE, 0x4001, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4631 | pbn_oxsemi_1_3906250 }, |
Lee Howard | b80de36 | 2008-10-21 13:50:14 +0100 | [diff] [blame] | 4632 | { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 2 Port V.34 Super-G3 Fax */ |
| 4633 | PCI_VENDOR_ID_MAINPINE, 0x4002, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4634 | pbn_oxsemi_2_3906250 }, |
Lee Howard | b80de36 | 2008-10-21 13:50:14 +0100 | [diff] [blame] | 4635 | { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 4 Port V.34 Super-G3 Fax */ |
| 4636 | PCI_VENDOR_ID_MAINPINE, 0x4004, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4637 | pbn_oxsemi_4_3906250 }, |
Lee Howard | b80de36 | 2008-10-21 13:50:14 +0100 | [diff] [blame] | 4638 | { PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 8 Port V.34 Super-G3 Fax */ |
| 4639 | PCI_VENDOR_ID_MAINPINE, 0x4008, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4640 | pbn_oxsemi_8_3906250 }, |
Scott Kilau | aa273ae | 2011-05-11 15:41:59 -0500 | [diff] [blame] | 4641 | |
| 4642 | /* |
| 4643 | * Digi/IBM PCIe 2-port Async EIA-232 Adapter utilizing OxSemi Tornado |
| 4644 | */ |
| 4645 | { PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_2_OX_IBM, |
| 4646 | PCI_SUBVENDOR_ID_IBM, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | 6cbe45d | 2021-06-10 20:39:03 +0200 | [diff] [blame] | 4647 | pbn_oxsemi_2_3906250 }, |
Scott Kilau | aa273ae | 2011-05-11 15:41:59 -0500 | [diff] [blame] | 4648 | |
Lee Howard | 7106b4e | 2008-10-21 13:48:58 +0100 | [diff] [blame] | 4649 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4650 | * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards, |
| 4651 | * from skokodyn@yahoo.com |
| 4652 | */ |
| 4653 | { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, |
| 4654 | PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO232, 0, 0, |
| 4655 | pbn_sbsxrsio }, |
| 4656 | { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, |
| 4657 | PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_OCTPRO422, 0, 0, |
| 4658 | pbn_sbsxrsio }, |
| 4659 | { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, |
| 4660 | PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL232, 0, 0, |
| 4661 | pbn_sbsxrsio }, |
| 4662 | { PCI_VENDOR_ID_SBSMODULARIO, PCI_DEVICE_ID_OCTPRO, |
| 4663 | PCI_SUBVENDOR_ID_SBSMODULARIO, PCI_SUBDEVICE_ID_POCTAL422, 0, 0, |
| 4664 | pbn_sbsxrsio }, |
| 4665 | |
| 4666 | /* |
| 4667 | * Digitan DS560-558, from jimd@esoft.com |
| 4668 | */ |
| 4669 | { PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4670 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4671 | pbn_b1_1_115200 }, |
| 4672 | |
| 4673 | /* |
| 4674 | * Titan Electronic cards |
| 4675 | * The 400L and 800L have a custom setup quirk. |
| 4676 | */ |
| 4677 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4678 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4679 | pbn_b0_1_921600 }, |
| 4680 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4681 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4682 | pbn_b0_2_921600 }, |
| 4683 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4684 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4685 | pbn_b0_4_921600 }, |
| 4686 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800B, |
Alan Cox | 5756ee9 | 2008-02-08 04:18:51 -0800 | [diff] [blame] | 4687 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4688 | pbn_b0_4_921600 }, |
| 4689 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100L, |
| 4690 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4691 | pbn_b1_1_921600 }, |
| 4692 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200L, |
| 4693 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4694 | pbn_b1_bt_2_921600 }, |
| 4695 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400L, |
| 4696 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4697 | pbn_b0_bt_4_921600 }, |
| 4698 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L, |
| 4699 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4700 | pbn_b0_bt_8_921600 }, |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 4701 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200I, |
| 4702 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4703 | pbn_b4_bt_2_921600 }, |
| 4704 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400I, |
| 4705 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4706 | pbn_b4_bt_4_921600 }, |
| 4707 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800I, |
| 4708 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4709 | pbn_b4_bt_8_921600 }, |
| 4710 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400EH, |
| 4711 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4712 | pbn_b0_4_921600 }, |
| 4713 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EH, |
| 4714 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4715 | pbn_b0_4_921600 }, |
| 4716 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EHB, |
| 4717 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4718 | pbn_b0_4_921600 }, |
| 4719 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100E, |
| 4720 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 4721 | pbn_titan_1_4000000 }, |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 4722 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200E, |
| 4723 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 4724 | pbn_titan_2_4000000 }, |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 4725 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400E, |
| 4726 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 4727 | pbn_titan_4_4000000 }, |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 4728 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800E, |
| 4729 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 4730 | pbn_titan_8_4000000 }, |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 4731 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EI, |
| 4732 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 4733 | pbn_titan_2_4000000 }, |
Yegor Yefremov | 66169ad | 2010-06-04 09:58:18 +0200 | [diff] [blame] | 4734 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI, |
| 4735 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Maciej W. Rozycki | f771a34 | 2021-06-10 20:38:59 +0200 | [diff] [blame] | 4736 | pbn_titan_2_4000000 }, |
Yegor Yefremov | 48c0247 | 2013-12-09 12:11:15 +0100 | [diff] [blame] | 4737 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200V3, |
| 4738 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4739 | pbn_b0_bt_2_921600 }, |
Yegor Yefremov | 1e9deb1 | 2011-12-27 15:47:37 +0100 | [diff] [blame] | 4740 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400V3, |
| 4741 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4742 | pbn_b0_4_921600 }, |
| 4743 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_410V3, |
| 4744 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4745 | pbn_b0_4_921600 }, |
| 4746 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3, |
| 4747 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4748 | pbn_b0_4_921600 }, |
| 4749 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800V3B, |
| 4750 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4751 | pbn_b0_4_921600 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4752 | |
| 4753 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550, |
| 4754 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4755 | pbn_b2_1_460800 }, |
| 4756 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_650, |
| 4757 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4758 | pbn_b2_1_460800 }, |
| 4759 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_850, |
| 4760 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4761 | pbn_b2_1_460800 }, |
| 4762 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_550, |
| 4763 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4764 | pbn_b2_bt_2_921600 }, |
| 4765 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_650, |
| 4766 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4767 | pbn_b2_bt_2_921600 }, |
| 4768 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_10x_850, |
| 4769 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4770 | pbn_b2_bt_2_921600 }, |
| 4771 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_550, |
| 4772 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4773 | pbn_b2_bt_4_921600 }, |
| 4774 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_650, |
| 4775 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4776 | pbn_b2_bt_4_921600 }, |
| 4777 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_10x_850, |
| 4778 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4779 | pbn_b2_bt_4_921600 }, |
| 4780 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_550, |
| 4781 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4782 | pbn_b0_1_921600 }, |
| 4783 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_650, |
| 4784 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4785 | pbn_b0_1_921600 }, |
| 4786 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_20x_850, |
| 4787 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4788 | pbn_b0_1_921600 }, |
| 4789 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_550, |
| 4790 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4791 | pbn_b0_bt_2_921600 }, |
| 4792 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_650, |
| 4793 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4794 | pbn_b0_bt_2_921600 }, |
| 4795 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S_20x_850, |
| 4796 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4797 | pbn_b0_bt_2_921600 }, |
| 4798 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_550, |
| 4799 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4800 | pbn_b0_bt_4_921600 }, |
| 4801 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_650, |
| 4802 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4803 | pbn_b0_bt_4_921600 }, |
| 4804 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850, |
| 4805 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4806 | pbn_b0_bt_4_921600 }, |
Andrey Panin | 3ec9c59 | 2006-02-02 20:15:09 +0000 | [diff] [blame] | 4807 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550, |
| 4808 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4809 | pbn_b0_bt_8_921600 }, |
| 4810 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650, |
| 4811 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4812 | pbn_b0_bt_8_921600 }, |
| 4813 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850, |
| 4814 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4815 | pbn_b0_bt_8_921600 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4816 | |
| 4817 | /* |
| 4818 | * Computone devices submitted by Doug McNash dmcnash@computone.com |
| 4819 | */ |
| 4820 | { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG, |
| 4821 | PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG4, |
| 4822 | 0, 0, pbn_computone_4 }, |
| 4823 | { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG, |
| 4824 | PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG8, |
| 4825 | 0, 0, pbn_computone_8 }, |
| 4826 | { PCI_VENDOR_ID_COMPUTONE, PCI_DEVICE_ID_COMPUTONE_PG, |
| 4827 | PCI_SUBVENDOR_ID_COMPUTONE, PCI_SUBDEVICE_ID_COMPUTONE_PG6, |
| 4828 | 0, 0, pbn_computone_6 }, |
| 4829 | |
| 4830 | { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI95N, |
| 4831 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4832 | pbn_oxsemi }, |
| 4833 | { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889, |
| 4834 | PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0, |
| 4835 | pbn_b0_bt_1_921600 }, |
| 4836 | |
| 4837 | /* |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 4838 | * Sunix PCI serial boards |
Stephen Chivers | abd7bac | 2013-01-28 19:49:20 +1100 | [diff] [blame] | 4839 | */ |
| 4840 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 4841 | PCI_VENDOR_ID_SUNIX, 0x0001, 0, 0, |
| 4842 | pbn_sunix_pci_1s }, |
Stephen Chivers | abd7bac | 2013-01-28 19:49:20 +1100 | [diff] [blame] | 4843 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
Kai-Heng Feng | 8515dbc | 2019-08-10 03:01:29 +0800 | [diff] [blame] | 4844 | PCI_VENDOR_ID_SUNIX, 0x0002, 0, 0, |
| 4845 | pbn_sunix_pci_2s }, |
| 4846 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
| 4847 | PCI_VENDOR_ID_SUNIX, 0x0004, 0, 0, |
| 4848 | pbn_sunix_pci_4s }, |
| 4849 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
| 4850 | PCI_VENDOR_ID_SUNIX, 0x0084, 0, 0, |
| 4851 | pbn_sunix_pci_4s }, |
| 4852 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
| 4853 | PCI_VENDOR_ID_SUNIX, 0x0008, 0, 0, |
| 4854 | pbn_sunix_pci_8s }, |
| 4855 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
| 4856 | PCI_VENDOR_ID_SUNIX, 0x0088, 0, 0, |
| 4857 | pbn_sunix_pci_8s }, |
| 4858 | { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, |
| 4859 | PCI_VENDOR_ID_SUNIX, 0x0010, 0, 0, |
| 4860 | pbn_sunix_pci_16s }, |
Stephen Chivers | abd7bac | 2013-01-28 19:49:20 +1100 | [diff] [blame] | 4861 | |
| 4862 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4863 | * AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org> |
| 4864 | */ |
| 4865 | { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028, |
| 4866 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4867 | pbn_b0_bt_8_115200 }, |
| 4868 | { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030, |
| 4869 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4870 | pbn_b0_bt_8_115200 }, |
| 4871 | |
| 4872 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL, |
| 4873 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4874 | pbn_b0_bt_2_115200 }, |
| 4875 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_A, |
| 4876 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4877 | pbn_b0_bt_2_115200 }, |
| 4878 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATRO_B, |
| 4879 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4880 | pbn_b0_bt_2_115200 }, |
Lennert Buytenhek | b87e5e2 | 2009-11-11 14:26:42 -0800 | [diff] [blame] | 4881 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_A, |
| 4882 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4883 | pbn_b0_bt_2_115200 }, |
| 4884 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUATTRO_B, |
| 4885 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4886 | pbn_b0_bt_2_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4887 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_A, |
| 4888 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4889 | pbn_b0_bt_4_460800 }, |
| 4890 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_OCTO_B, |
| 4891 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4892 | pbn_b0_bt_4_460800 }, |
| 4893 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_PLUS, |
| 4894 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4895 | pbn_b0_bt_2_460800 }, |
| 4896 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_A, |
| 4897 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4898 | pbn_b0_bt_2_460800 }, |
| 4899 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_QUAD_B, |
| 4900 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4901 | pbn_b0_bt_2_460800 }, |
| 4902 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_SSERIAL, |
| 4903 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4904 | pbn_b0_bt_1_115200 }, |
| 4905 | { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PORT_650, |
| 4906 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4907 | pbn_b0_bt_1_460800 }, |
| 4908 | |
| 4909 | /* |
Russell King | 1fb8cac | 2006-12-13 14:45:46 +0000 | [diff] [blame] | 4910 | * Korenix Jetcard F0/F1 cards (JC1204, JC1208, JC1404, JC1408). |
| 4911 | * Cards are identified by their subsystem vendor IDs, which |
| 4912 | * (in hex) match the model number. |
| 4913 | * |
| 4914 | * Note that JC140x are RS422/485 cards which require ox950 |
| 4915 | * ACR = 0x10, and as such are not currently fully supported. |
| 4916 | */ |
| 4917 | { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0, |
| 4918 | 0x1204, 0x0004, 0, 0, |
| 4919 | pbn_b0_4_921600 }, |
| 4920 | { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0, |
| 4921 | 0x1208, 0x0004, 0, 0, |
| 4922 | pbn_b0_4_921600 }, |
| 4923 | /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0, |
| 4924 | 0x1402, 0x0002, 0, 0, |
| 4925 | pbn_b0_2_921600 }, */ |
| 4926 | /* { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF0, |
| 4927 | 0x1404, 0x0004, 0, 0, |
| 4928 | pbn_b0_4_921600 }, */ |
| 4929 | { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF1, |
| 4930 | 0x1208, 0x0004, 0, 0, |
| 4931 | pbn_b0_4_921600 }, |
| 4932 | |
Kiros Yeh | 2a52fcb | 2009-12-21 16:26:48 -0800 | [diff] [blame] | 4933 | { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2, |
| 4934 | 0x1204, 0x0004, 0, 0, |
| 4935 | pbn_b0_4_921600 }, |
| 4936 | { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF2, |
| 4937 | 0x1208, 0x0004, 0, 0, |
| 4938 | pbn_b0_4_921600 }, |
| 4939 | { PCI_VENDOR_ID_KORENIX, PCI_DEVICE_ID_KORENIX_JETCARDF3, |
| 4940 | 0x1208, 0x0004, 0, 0, |
| 4941 | pbn_b0_4_921600 }, |
Russell King | 1fb8cac | 2006-12-13 14:45:46 +0000 | [diff] [blame] | 4942 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4943 | * Dell Remote Access Card 4 - Tim_T_Murphy@Dell.com |
| 4944 | */ |
| 4945 | { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RAC4, |
| 4946 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4947 | pbn_b1_1_1382400 }, |
| 4948 | |
| 4949 | /* |
| 4950 | * Dell Remote Access Card III - Tim_T_Murphy@Dell.com |
| 4951 | */ |
| 4952 | { PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_RACIII, |
| 4953 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4954 | pbn_b1_1_1382400 }, |
| 4955 | |
| 4956 | /* |
| 4957 | * RAStel 2 port modem, gerg@moreton.com.au |
| 4958 | */ |
| 4959 | { PCI_VENDOR_ID_MORETON, PCI_DEVICE_ID_RASTEL_2PORT, |
| 4960 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4961 | pbn_b2_bt_2_115200 }, |
| 4962 | |
| 4963 | /* |
| 4964 | * EKF addition for i960 Boards form EKF with serial port |
| 4965 | */ |
| 4966 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_80960_RP, |
| 4967 | 0xE4BF, PCI_ANY_ID, 0, 0, |
| 4968 | pbn_intel_i960 }, |
| 4969 | |
| 4970 | /* |
| 4971 | * Xircom Cardbus/Ethernet combos |
| 4972 | */ |
| 4973 | { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_X3201_MDM, |
| 4974 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4975 | pbn_b0_1_115200 }, |
| 4976 | /* |
| 4977 | * Xircom RBM56G cardbus modem - Dirk Arnold (temp entry) |
| 4978 | */ |
| 4979 | { PCI_VENDOR_ID_XIRCOM, PCI_DEVICE_ID_XIRCOM_RBM56G, |
| 4980 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 4981 | pbn_b0_1_115200 }, |
| 4982 | |
| 4983 | /* |
| 4984 | * Untested PCI modems, sent in from various folks... |
| 4985 | */ |
| 4986 | |
| 4987 | /* |
| 4988 | * Elsa Model 56K PCI Modem, from Andreas Rath <arh@01019freenet.de> |
| 4989 | */ |
| 4990 | { PCI_VENDOR_ID_ROCKWELL, 0x1004, |
| 4991 | 0x1048, 0x1500, 0, 0, |
| 4992 | pbn_b1_1_115200 }, |
| 4993 | |
| 4994 | { PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3, |
| 4995 | 0xFF00, 0, 0, 0, |
| 4996 | pbn_sgi_ioc3 }, |
| 4997 | |
| 4998 | /* |
| 4999 | * HP Diva card |
| 5000 | */ |
| 5001 | { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA, |
| 5002 | PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_RMP3, 0, 0, |
| 5003 | pbn_b1_1_115200 }, |
| 5004 | { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA, |
| 5005 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5006 | pbn_b0_5_115200 }, |
| 5007 | { PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX, |
| 5008 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5009 | pbn_b2_1_115200 }, |
Randy Wright | e0e2420 | 2021-05-14 10:26:54 -0600 | [diff] [blame] | 5010 | /* HPE PCI serial device */ |
| 5011 | { PCI_VENDOR_ID_HP_3PAR, PCI_DEVICE_ID_HPE_PCI_SERIAL, |
| 5012 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5013 | pbn_b1_1_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5014 | |
Alon Bar-Lev | d9004eb | 2006-01-18 11:47:33 +0000 | [diff] [blame] | 5015 | { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM2, |
| 5016 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5017 | pbn_b3_2_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5018 | { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM4, |
| 5019 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5020 | pbn_b3_4_115200 }, |
| 5021 | { PCI_VENDOR_ID_DCI, PCI_DEVICE_ID_DCI_PCCOM8, |
| 5022 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5023 | pbn_b3_8_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5024 | /* |
Adam Lee | 89c043a | 2015-08-03 13:28:13 +0800 | [diff] [blame] | 5025 | * Pericom PI7C9X795[1248] Uno/Dual/Quad/Octal UART |
| 5026 | */ |
| 5027 | { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7951, |
| 5028 | PCI_ANY_ID, PCI_ANY_ID, |
| 5029 | 0, |
| 5030 | 0, pbn_pericom_PI7C9X7951 }, |
| 5031 | { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7952, |
| 5032 | PCI_ANY_ID, PCI_ANY_ID, |
| 5033 | 0, |
| 5034 | 0, pbn_pericom_PI7C9X7952 }, |
| 5035 | { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7954, |
| 5036 | PCI_ANY_ID, PCI_ANY_ID, |
| 5037 | 0, |
| 5038 | 0, pbn_pericom_PI7C9X7954 }, |
| 5039 | { PCI_VENDOR_ID_PERICOM, PCI_DEVICE_ID_PERICOM_PI7C9X7958, |
| 5040 | PCI_ANY_ID, PCI_ANY_ID, |
| 5041 | 0, |
| 5042 | 0, pbn_pericom_PI7C9X7958 }, |
| 5043 | /* |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5044 | * ACCES I/O Products quad |
| 5045 | */ |
| 5046 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SDB, |
| 5047 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5048 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5049 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2S, |
| 5050 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5051 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5052 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SDB, |
| 5053 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5054 | pbn_pericom_PI7C9X7954 }, |
| 5055 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4S, |
| 5056 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5057 | pbn_pericom_PI7C9X7954 }, |
| 5058 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_2DB, |
| 5059 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5060 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5061 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_2, |
| 5062 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5063 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5064 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4DB, |
| 5065 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5066 | pbn_pericom_PI7C9X7954 }, |
| 5067 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM232_4, |
| 5068 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5069 | pbn_pericom_PI7C9X7954 }, |
| 5070 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_2SMDB, |
| 5071 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5072 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5073 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_2SM, |
| 5074 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5075 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5076 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SMDB, |
| 5077 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5078 | pbn_pericom_PI7C9X7954 }, |
| 5079 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_COM_4SM, |
| 5080 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5081 | pbn_pericom_PI7C9X7954 }, |
| 5082 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_1, |
| 5083 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5084 | pbn_pericom_PI7C9X7951 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5085 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_2, |
| 5086 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5087 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5088 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_2, |
| 5089 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5090 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5091 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM422_4, |
| 5092 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5093 | pbn_pericom_PI7C9X7954 }, |
| 5094 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM485_4, |
| 5095 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5096 | pbn_pericom_PI7C9X7954 }, |
| 5097 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2S, |
| 5098 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5099 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5100 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4S, |
| 5101 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5102 | pbn_pericom_PI7C9X7954 }, |
| 5103 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_2, |
| 5104 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5105 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5106 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_2, |
| 5107 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5108 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5109 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM232_4, |
| 5110 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5111 | pbn_pericom_PI7C9X7954 }, |
| 5112 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_MPCIE_ICM232_4, |
| 5113 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5114 | pbn_pericom_PI7C9X7954 }, |
| 5115 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_2SM, |
| 5116 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5117 | pbn_pericom_PI7C9X7952 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5118 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM422_4, |
| 5119 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5120 | pbn_pericom_PI7C9X7954 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5121 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM485_4, |
| 5122 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5123 | pbn_pericom_PI7C9X7954 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5124 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM422_8, |
| 5125 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5126 | pbn_pericom_PI7C9X7958 }, |
| 5127 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM485_8, |
| 5128 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5129 | pbn_pericom_PI7C9X7958 }, |
| 5130 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_4, |
| 5131 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5132 | pbn_pericom_PI7C9X7954 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5133 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM232_8, |
| 5134 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5135 | pbn_pericom_PI7C9X7958 }, |
| 5136 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_4SM, |
| 5137 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5138 | pbn_pericom_PI7C9X7954 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5139 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_COM_8SM, |
| 5140 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5141 | pbn_pericom_PI7C9X7958 }, |
| 5142 | { PCI_VENDOR_ID_ACCESIO, PCI_DEVICE_ID_ACCESIO_PCIE_ICM_4SM, |
| 5143 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
Jay Dolan | b896b03 | 2019-02-12 21:43:11 -0800 | [diff] [blame] | 5144 | pbn_pericom_PI7C9X7954 }, |
Jimi Damon | c8d1924 | 2016-07-20 17:00:40 -0700 | [diff] [blame] | 5145 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5146 | * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) |
| 5147 | */ |
| 5148 | { PCI_VENDOR_ID_TOPIC, PCI_DEVICE_ID_TOPIC_TP560, |
| 5149 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5150 | pbn_b0_1_115200 }, |
Niels de Vos | 84f8c6f | 2007-08-22 14:01:14 -0700 | [diff] [blame] | 5151 | /* |
| 5152 | * ITE |
| 5153 | */ |
| 5154 | { PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8872, |
| 5155 | PCI_ANY_ID, PCI_ANY_ID, |
| 5156 | 0, 0, |
| 5157 | pbn_b1_bt_1_115200 }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5158 | |
| 5159 | /* |
Peter Horton | 737c175 | 2006-08-26 09:07:36 +0100 | [diff] [blame] | 5160 | * IntaShield IS-200 |
| 5161 | */ |
| 5162 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, |
| 5163 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ |
| 5164 | pbn_b2_2_115200 }, |
Ignacio García Pérez | 4b6f6ce | 2008-05-23 13:04:28 -0700 | [diff] [blame] | 5165 | /* |
| 5166 | * IntaShield IS-400 |
| 5167 | */ |
| 5168 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400, |
| 5169 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */ |
| 5170 | pbn_b2_4_115200 }, |
Peter Horton | 737c175 | 2006-08-26 09:07:36 +0100 | [diff] [blame] | 5171 | /* |
Nikola Ciprich | 9f2068f | 2018-02-13 15:04:46 +0100 | [diff] [blame] | 5172 | * BrainBoxes UC-260 |
| 5173 | */ |
| 5174 | { PCI_VENDOR_ID_INTASHIELD, 0x0D21, |
| 5175 | PCI_ANY_ID, PCI_ANY_ID, |
| 5176 | PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00, |
| 5177 | pbn_b2_4_115200 }, |
| 5178 | { PCI_VENDOR_ID_INTASHIELD, 0x0E34, |
| 5179 | PCI_ANY_ID, PCI_ANY_ID, |
| 5180 | PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00, |
| 5181 | pbn_b2_4_115200 }, |
| 5182 | /* |
Thomas Hoehn | 4821200 | 2007-02-10 01:46:05 -0800 | [diff] [blame] | 5183 | * Perle PCI-RAS cards |
| 5184 | */ |
| 5185 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, |
| 5186 | PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4, |
| 5187 | 0, 0, pbn_b2_4_921600 }, |
| 5188 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, |
| 5189 | PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8, |
| 5190 | 0, 0, pbn_b2_8_921600 }, |
Alan Cox | bf0df63 | 2007-10-16 01:24:00 -0700 | [diff] [blame] | 5191 | |
| 5192 | /* |
| 5193 | * Mainpine series cards: Fairly standard layout but fools |
| 5194 | * parts of the autodetect in some cases and uses otherwise |
| 5195 | * unmatched communications subclasses in the PCI Express case |
| 5196 | */ |
| 5197 | |
| 5198 | { /* RockForceDUO */ |
| 5199 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5200 | PCI_VENDOR_ID_MAINPINE, 0x0200, |
| 5201 | 0, 0, pbn_b0_2_115200 }, |
| 5202 | { /* RockForceQUATRO */ |
| 5203 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5204 | PCI_VENDOR_ID_MAINPINE, 0x0300, |
| 5205 | 0, 0, pbn_b0_4_115200 }, |
| 5206 | { /* RockForceDUO+ */ |
| 5207 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5208 | PCI_VENDOR_ID_MAINPINE, 0x0400, |
| 5209 | 0, 0, pbn_b0_2_115200 }, |
| 5210 | { /* RockForceQUATRO+ */ |
| 5211 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5212 | PCI_VENDOR_ID_MAINPINE, 0x0500, |
| 5213 | 0, 0, pbn_b0_4_115200 }, |
| 5214 | { /* RockForce+ */ |
| 5215 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5216 | PCI_VENDOR_ID_MAINPINE, 0x0600, |
| 5217 | 0, 0, pbn_b0_2_115200 }, |
| 5218 | { /* RockForce+ */ |
| 5219 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5220 | PCI_VENDOR_ID_MAINPINE, 0x0700, |
| 5221 | 0, 0, pbn_b0_4_115200 }, |
| 5222 | { /* RockForceOCTO+ */ |
| 5223 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5224 | PCI_VENDOR_ID_MAINPINE, 0x0800, |
| 5225 | 0, 0, pbn_b0_8_115200 }, |
| 5226 | { /* RockForceDUO+ */ |
| 5227 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5228 | PCI_VENDOR_ID_MAINPINE, 0x0C00, |
| 5229 | 0, 0, pbn_b0_2_115200 }, |
| 5230 | { /* RockForceQUARTRO+ */ |
| 5231 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5232 | PCI_VENDOR_ID_MAINPINE, 0x0D00, |
| 5233 | 0, 0, pbn_b0_4_115200 }, |
| 5234 | { /* RockForceOCTO+ */ |
| 5235 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5236 | PCI_VENDOR_ID_MAINPINE, 0x1D00, |
| 5237 | 0, 0, pbn_b0_8_115200 }, |
| 5238 | { /* RockForceD1 */ |
| 5239 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5240 | PCI_VENDOR_ID_MAINPINE, 0x2000, |
| 5241 | 0, 0, pbn_b0_1_115200 }, |
| 5242 | { /* RockForceF1 */ |
| 5243 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5244 | PCI_VENDOR_ID_MAINPINE, 0x2100, |
| 5245 | 0, 0, pbn_b0_1_115200 }, |
| 5246 | { /* RockForceD2 */ |
| 5247 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5248 | PCI_VENDOR_ID_MAINPINE, 0x2200, |
| 5249 | 0, 0, pbn_b0_2_115200 }, |
| 5250 | { /* RockForceF2 */ |
| 5251 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5252 | PCI_VENDOR_ID_MAINPINE, 0x2300, |
| 5253 | 0, 0, pbn_b0_2_115200 }, |
| 5254 | { /* RockForceD4 */ |
| 5255 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5256 | PCI_VENDOR_ID_MAINPINE, 0x2400, |
| 5257 | 0, 0, pbn_b0_4_115200 }, |
| 5258 | { /* RockForceF4 */ |
| 5259 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5260 | PCI_VENDOR_ID_MAINPINE, 0x2500, |
| 5261 | 0, 0, pbn_b0_4_115200 }, |
| 5262 | { /* RockForceD8 */ |
| 5263 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5264 | PCI_VENDOR_ID_MAINPINE, 0x2600, |
| 5265 | 0, 0, pbn_b0_8_115200 }, |
| 5266 | { /* RockForceF8 */ |
| 5267 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5268 | PCI_VENDOR_ID_MAINPINE, 0x2700, |
| 5269 | 0, 0, pbn_b0_8_115200 }, |
| 5270 | { /* IQ Express D1 */ |
| 5271 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5272 | PCI_VENDOR_ID_MAINPINE, 0x3000, |
| 5273 | 0, 0, pbn_b0_1_115200 }, |
| 5274 | { /* IQ Express F1 */ |
| 5275 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5276 | PCI_VENDOR_ID_MAINPINE, 0x3100, |
| 5277 | 0, 0, pbn_b0_1_115200 }, |
| 5278 | { /* IQ Express D2 */ |
| 5279 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5280 | PCI_VENDOR_ID_MAINPINE, 0x3200, |
| 5281 | 0, 0, pbn_b0_2_115200 }, |
| 5282 | { /* IQ Express F2 */ |
| 5283 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5284 | PCI_VENDOR_ID_MAINPINE, 0x3300, |
| 5285 | 0, 0, pbn_b0_2_115200 }, |
| 5286 | { /* IQ Express D4 */ |
| 5287 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5288 | PCI_VENDOR_ID_MAINPINE, 0x3400, |
| 5289 | 0, 0, pbn_b0_4_115200 }, |
| 5290 | { /* IQ Express F4 */ |
| 5291 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5292 | PCI_VENDOR_ID_MAINPINE, 0x3500, |
| 5293 | 0, 0, pbn_b0_4_115200 }, |
| 5294 | { /* IQ Express D8 */ |
| 5295 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5296 | PCI_VENDOR_ID_MAINPINE, 0x3C00, |
| 5297 | 0, 0, pbn_b0_8_115200 }, |
| 5298 | { /* IQ Express F8 */ |
| 5299 | PCI_VENDOR_ID_MAINPINE, PCI_DEVICE_ID_MAINPINE_PBRIDGE, |
| 5300 | PCI_VENDOR_ID_MAINPINE, 0x3D00, |
| 5301 | 0, 0, pbn_b0_8_115200 }, |
| 5302 | |
| 5303 | |
Thomas Hoehn | 4821200 | 2007-02-10 01:46:05 -0800 | [diff] [blame] | 5304 | /* |
Olof Johansson | aa79850 | 2007-08-22 14:01:55 -0700 | [diff] [blame] | 5305 | * PA Semi PA6T-1682M on-chip UART |
| 5306 | */ |
| 5307 | { PCI_VENDOR_ID_PASEMI, 0xa004, |
| 5308 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5309 | pbn_pasemi_1682M }, |
| 5310 | |
| 5311 | /* |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 5312 | * National Instruments |
| 5313 | */ |
Will Page | 04bf7e7 | 2009-04-06 17:32:15 +0100 | [diff] [blame] | 5314 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI23216, |
| 5315 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5316 | pbn_b1_16_115200 }, |
| 5317 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2328, |
| 5318 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5319 | pbn_b1_8_115200 }, |
| 5320 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324, |
| 5321 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5322 | pbn_b1_bt_4_115200 }, |
| 5323 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322, |
| 5324 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5325 | pbn_b1_bt_2_115200 }, |
| 5326 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2324I, |
| 5327 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5328 | pbn_b1_bt_4_115200 }, |
| 5329 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI2322I, |
| 5330 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5331 | pbn_b1_bt_2_115200 }, |
| 5332 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_23216, |
| 5333 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5334 | pbn_b1_16_115200 }, |
| 5335 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2328, |
| 5336 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5337 | pbn_b1_8_115200 }, |
| 5338 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2324, |
| 5339 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5340 | pbn_b1_bt_4_115200 }, |
| 5341 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8420_2322, |
| 5342 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5343 | pbn_b1_bt_2_115200 }, |
| 5344 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2324, |
| 5345 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5346 | pbn_b1_bt_4_115200 }, |
| 5347 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8422_2322, |
| 5348 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5349 | pbn_b1_bt_2_115200 }, |
Shawn Bohrer | 46a0fac | 2009-04-06 17:32:07 +0100 | [diff] [blame] | 5350 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2322, |
| 5351 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5352 | pbn_ni8430_2 }, |
| 5353 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2322, |
| 5354 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5355 | pbn_ni8430_2 }, |
| 5356 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2324, |
| 5357 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5358 | pbn_ni8430_4 }, |
| 5359 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2324, |
| 5360 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5361 | pbn_ni8430_4 }, |
| 5362 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_2328, |
| 5363 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5364 | pbn_ni8430_8 }, |
| 5365 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_2328, |
| 5366 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5367 | pbn_ni8430_8 }, |
| 5368 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8430_23216, |
| 5369 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5370 | pbn_ni8430_16 }, |
| 5371 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8430_23216, |
| 5372 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5373 | pbn_ni8430_16 }, |
| 5374 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2322, |
| 5375 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5376 | pbn_ni8430_2 }, |
| 5377 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2322, |
| 5378 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5379 | pbn_ni8430_2 }, |
| 5380 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PXI8432_2324, |
| 5381 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5382 | pbn_ni8430_4 }, |
| 5383 | { PCI_VENDOR_ID_NI, PCI_DEVICE_ID_NI_PCI8432_2324, |
| 5384 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5385 | pbn_ni8430_4 }, |
| 5386 | |
| 5387 | /* |
Kai-Heng Feng | d193db7 | 2019-08-17 00:51:24 +0800 | [diff] [blame] | 5388 | * MOXA |
| 5389 | */ |
| 5390 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP102E, |
| 5391 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5392 | pbn_moxa8250_2p }, |
| 5393 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP102EL, |
| 5394 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5395 | pbn_moxa8250_2p }, |
| 5396 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP104EL_A, |
| 5397 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5398 | pbn_moxa8250_4p }, |
| 5399 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP114EL, |
| 5400 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5401 | pbn_moxa8250_4p }, |
| 5402 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP116E_A_A, |
| 5403 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5404 | pbn_moxa8250_8p }, |
| 5405 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP116E_A_B, |
| 5406 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5407 | pbn_moxa8250_8p }, |
| 5408 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP118EL_A, |
| 5409 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5410 | pbn_moxa8250_8p }, |
| 5411 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP118E_A_I, |
| 5412 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5413 | pbn_moxa8250_8p }, |
| 5414 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP132EL, |
| 5415 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5416 | pbn_moxa8250_2p }, |
| 5417 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP134EL_A, |
| 5418 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5419 | pbn_moxa8250_4p }, |
| 5420 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP138E_A, |
| 5421 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5422 | pbn_moxa8250_8p }, |
| 5423 | { PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_MOXA_CP168EL_A, |
| 5424 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5425 | pbn_moxa8250_8p }, |
| 5426 | |
| 5427 | /* |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 5428 | * ADDI-DATA GmbH communication cards <info@addi-data.com> |
| 5429 | */ |
| 5430 | { PCI_VENDOR_ID_ADDIDATA, |
| 5431 | PCI_DEVICE_ID_ADDIDATA_APCI7500, |
| 5432 | PCI_ANY_ID, |
| 5433 | PCI_ANY_ID, |
| 5434 | 0, |
| 5435 | 0, |
| 5436 | pbn_b0_4_115200 }, |
| 5437 | |
| 5438 | { PCI_VENDOR_ID_ADDIDATA, |
| 5439 | PCI_DEVICE_ID_ADDIDATA_APCI7420, |
| 5440 | PCI_ANY_ID, |
| 5441 | PCI_ANY_ID, |
| 5442 | 0, |
| 5443 | 0, |
| 5444 | pbn_b0_2_115200 }, |
| 5445 | |
| 5446 | { PCI_VENDOR_ID_ADDIDATA, |
| 5447 | PCI_DEVICE_ID_ADDIDATA_APCI7300, |
| 5448 | PCI_ANY_ID, |
| 5449 | PCI_ANY_ID, |
| 5450 | 0, |
| 5451 | 0, |
| 5452 | pbn_b0_1_115200 }, |
| 5453 | |
Ian Abbott | 086231f | 2013-07-16 16:14:39 +0100 | [diff] [blame] | 5454 | { PCI_VENDOR_ID_AMCC, |
Ian Abbott | 57c1f0e | 2013-07-16 16:14:40 +0100 | [diff] [blame] | 5455 | PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800, |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 5456 | PCI_ANY_ID, |
| 5457 | PCI_ANY_ID, |
| 5458 | 0, |
| 5459 | 0, |
| 5460 | pbn_b1_8_115200 }, |
| 5461 | |
| 5462 | { PCI_VENDOR_ID_ADDIDATA, |
| 5463 | PCI_DEVICE_ID_ADDIDATA_APCI7500_2, |
| 5464 | PCI_ANY_ID, |
| 5465 | PCI_ANY_ID, |
| 5466 | 0, |
| 5467 | 0, |
| 5468 | pbn_b0_4_115200 }, |
| 5469 | |
| 5470 | { PCI_VENDOR_ID_ADDIDATA, |
| 5471 | PCI_DEVICE_ID_ADDIDATA_APCI7420_2, |
| 5472 | PCI_ANY_ID, |
| 5473 | PCI_ANY_ID, |
| 5474 | 0, |
| 5475 | 0, |
| 5476 | pbn_b0_2_115200 }, |
| 5477 | |
| 5478 | { PCI_VENDOR_ID_ADDIDATA, |
| 5479 | PCI_DEVICE_ID_ADDIDATA_APCI7300_2, |
| 5480 | PCI_ANY_ID, |
| 5481 | PCI_ANY_ID, |
| 5482 | 0, |
| 5483 | 0, |
| 5484 | pbn_b0_1_115200 }, |
| 5485 | |
| 5486 | { PCI_VENDOR_ID_ADDIDATA, |
| 5487 | PCI_DEVICE_ID_ADDIDATA_APCI7500_3, |
| 5488 | PCI_ANY_ID, |
| 5489 | PCI_ANY_ID, |
| 5490 | 0, |
| 5491 | 0, |
| 5492 | pbn_b0_4_115200 }, |
| 5493 | |
| 5494 | { PCI_VENDOR_ID_ADDIDATA, |
| 5495 | PCI_DEVICE_ID_ADDIDATA_APCI7420_3, |
| 5496 | PCI_ANY_ID, |
| 5497 | PCI_ANY_ID, |
| 5498 | 0, |
| 5499 | 0, |
| 5500 | pbn_b0_2_115200 }, |
| 5501 | |
| 5502 | { PCI_VENDOR_ID_ADDIDATA, |
| 5503 | PCI_DEVICE_ID_ADDIDATA_APCI7300_3, |
| 5504 | PCI_ANY_ID, |
| 5505 | PCI_ANY_ID, |
| 5506 | 0, |
| 5507 | 0, |
| 5508 | pbn_b0_1_115200 }, |
| 5509 | |
| 5510 | { PCI_VENDOR_ID_ADDIDATA, |
| 5511 | PCI_DEVICE_ID_ADDIDATA_APCI7800_3, |
| 5512 | PCI_ANY_ID, |
| 5513 | PCI_ANY_ID, |
| 5514 | 0, |
| 5515 | 0, |
| 5516 | pbn_b0_8_115200 }, |
| 5517 | |
Krauth.Julien | 1b62cbf | 2009-10-26 16:50:04 -0700 | [diff] [blame] | 5518 | { PCI_VENDOR_ID_ADDIDATA, |
| 5519 | PCI_DEVICE_ID_ADDIDATA_APCIe7500, |
| 5520 | PCI_ANY_ID, |
| 5521 | PCI_ANY_ID, |
| 5522 | 0, |
| 5523 | 0, |
| 5524 | pbn_ADDIDATA_PCIe_4_3906250 }, |
| 5525 | |
| 5526 | { PCI_VENDOR_ID_ADDIDATA, |
| 5527 | PCI_DEVICE_ID_ADDIDATA_APCIe7420, |
| 5528 | PCI_ANY_ID, |
| 5529 | PCI_ANY_ID, |
| 5530 | 0, |
| 5531 | 0, |
| 5532 | pbn_ADDIDATA_PCIe_2_3906250 }, |
| 5533 | |
| 5534 | { PCI_VENDOR_ID_ADDIDATA, |
| 5535 | PCI_DEVICE_ID_ADDIDATA_APCIe7300, |
| 5536 | PCI_ANY_ID, |
| 5537 | PCI_ANY_ID, |
| 5538 | 0, |
| 5539 | 0, |
| 5540 | pbn_ADDIDATA_PCIe_1_3906250 }, |
| 5541 | |
| 5542 | { PCI_VENDOR_ID_ADDIDATA, |
| 5543 | PCI_DEVICE_ID_ADDIDATA_APCIe7800, |
| 5544 | PCI_ANY_ID, |
| 5545 | PCI_ANY_ID, |
| 5546 | 0, |
| 5547 | 0, |
| 5548 | pbn_ADDIDATA_PCIe_8_3906250 }, |
| 5549 | |
Jiri Slaby | 25cf9bc | 2009-01-15 13:30:34 +0000 | [diff] [blame] | 5550 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, |
| 5551 | PCI_VENDOR_ID_IBM, 0x0299, |
| 5552 | 0, 0, pbn_b0_bt_2_115200 }, |
| 5553 | |
Stefan Seyfried | 972ce08 | 2013-07-01 09:14:21 +0200 | [diff] [blame] | 5554 | /* |
| 5555 | * other NetMos 9835 devices are most likely handled by the |
| 5556 | * parport_serial driver, check drivers/parport/parport_serial.c |
| 5557 | * before adding them here. |
| 5558 | */ |
| 5559 | |
Michael Buesch | c4285b4 | 2009-06-30 11:41:21 -0700 | [diff] [blame] | 5560 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9901, |
| 5561 | 0xA000, 0x1000, |
| 5562 | 0, 0, pbn_b0_1_115200 }, |
| 5563 | |
Nicos Gollan | 7808edc | 2011-05-05 21:00:37 +0200 | [diff] [blame] | 5564 | /* the 9901 is a rebranded 9912 */ |
| 5565 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9912, |
| 5566 | 0xA000, 0x1000, |
| 5567 | 0, 0, pbn_b0_1_115200 }, |
| 5568 | |
| 5569 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9922, |
| 5570 | 0xA000, 0x1000, |
| 5571 | 0, 0, pbn_b0_1_115200 }, |
| 5572 | |
| 5573 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9904, |
| 5574 | 0xA000, 0x1000, |
| 5575 | 0, 0, pbn_b0_1_115200 }, |
| 5576 | |
| 5577 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900, |
| 5578 | 0xA000, 0x1000, |
| 5579 | 0, 0, pbn_b0_1_115200 }, |
| 5580 | |
| 5581 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9900, |
| 5582 | 0xA000, 0x3002, |
| 5583 | 0, 0, pbn_NETMOS9900_2s_115200 }, |
| 5584 | |
Krauth.Julien | 02c9b5c | 2008-02-04 22:27:49 -0800 | [diff] [blame] | 5585 | /* |
Eric Smith | 4417817 | 2011-07-11 22:53:13 -0600 | [diff] [blame] | 5586 | * Best Connectivity and Rosewill PCI Multi I/O cards |
Ira W. Snyder | ac6ec5b | 2009-12-21 16:26:45 -0800 | [diff] [blame] | 5587 | */ |
| 5588 | |
| 5589 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
| 5590 | 0xA000, 0x1000, |
| 5591 | 0, 0, pbn_b0_1_115200 }, |
| 5592 | |
| 5593 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
Eric Smith | 4417817 | 2011-07-11 22:53:13 -0600 | [diff] [blame] | 5594 | 0xA000, 0x3002, |
| 5595 | 0, 0, pbn_b0_bt_2_115200 }, |
| 5596 | |
| 5597 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
Ira W. Snyder | ac6ec5b | 2009-12-21 16:26:45 -0800 | [diff] [blame] | 5598 | 0xA000, 0x3004, |
| 5599 | 0, 0, pbn_b0_bt_4_115200 }, |
Dirk Brandewie | 095e24b | 2010-11-17 07:35:20 -0800 | [diff] [blame] | 5600 | /* Intel CE4100 */ |
| 5601 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CE4100_UART, |
| 5602 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5603 | pbn_ce4100_1_115200 }, |
Mika Westerberg | 6c55d9b | 2016-01-29 16:49:47 +0200 | [diff] [blame] | 5604 | |
Antony Pavlov | d9a0fbf | 2011-05-18 22:38:30 +0400 | [diff] [blame] | 5605 | /* |
| 5606 | * Cronyx Omega PCI |
| 5607 | */ |
| 5608 | { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_CRONYX_OMEGA, |
| 5609 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5610 | pbn_omegapci }, |
Ira W. Snyder | ac6ec5b | 2009-12-21 16:26:45 -0800 | [diff] [blame] | 5611 | |
| 5612 | /* |
Stephen Hurd | ebebd49 | 2013-01-17 14:14:53 -0800 | [diff] [blame] | 5613 | * Broadcom TruManage |
| 5614 | */ |
| 5615 | { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BROADCOM_TRUMANAGE, |
| 5616 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| 5617 | pbn_brcm_trumanage }, |
| 5618 | |
| 5619 | /* |
Alan Cox | 6683549 | 2012-08-16 12:01:33 +0100 | [diff] [blame] | 5620 | * AgeStar as-prs2-009 |
| 5621 | */ |
| 5622 | { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375, |
| 5623 | PCI_ANY_ID, PCI_ANY_ID, |
| 5624 | 0, 0, pbn_b0_bt_2_115200 }, |
Alan Cox | 27788c5 | 2012-09-04 16:21:06 +0100 | [diff] [blame] | 5625 | |
| 5626 | /* |
| 5627 | * WCH CH353 series devices: The 2S1P is handled by parport_serial |
| 5628 | * so not listed here. |
| 5629 | */ |
| 5630 | { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_4S, |
| 5631 | PCI_ANY_ID, PCI_ANY_ID, |
| 5632 | 0, 0, pbn_b0_bt_4_115200 }, |
| 5633 | |
| 5634 | { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH353_2S1PF, |
| 5635 | PCI_ANY_ID, PCI_ANY_ID, |
| 5636 | 0, 0, pbn_b0_bt_2_115200 }, |
| 5637 | |
Alexandr Petrenko | 55c368c | 2016-05-23 10:04:54 +0300 | [diff] [blame] | 5638 | { PCI_VENDOR_ID_WCH, PCI_DEVICE_ID_WCH_CH355_4S, |
| 5639 | PCI_ANY_ID, PCI_ANY_ID, |
| 5640 | 0, 0, pbn_b0_bt_4_115200 }, |
| 5641 | |
Jeremy McNicoll | 7dde557 | 2016-02-02 13:00:45 -0800 | [diff] [blame] | 5642 | { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH382_2S, |
| 5643 | PCI_ANY_ID, PCI_ANY_ID, |
| 5644 | 0, 0, pbn_wch382_2 }, |
| 5645 | |
Sergej Pupykin | 72a3c0e | 2014-12-30 16:16:50 +0300 | [diff] [blame] | 5646 | { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH384_4S, |
| 5647 | PCI_ANY_ID, PCI_ANY_ID, |
| 5648 | 0, 0, pbn_wch384_4 }, |
| 5649 | |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 5650 | { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH384_8S, |
| 5651 | PCI_ANY_ID, PCI_ANY_ID, |
| 5652 | 0, 0, pbn_wch384_8 }, |
Tobias Diedrich | 3c5a87b | 2020-09-14 19:36:28 +0200 | [diff] [blame] | 5653 | /* |
| 5654 | * Realtek RealManage |
| 5655 | */ |
| 5656 | { PCI_VENDOR_ID_REALTEK, 0x816a, |
| 5657 | PCI_ANY_ID, PCI_ANY_ID, |
| 5658 | 0, 0, pbn_b0_1_115200 }, |
| 5659 | |
| 5660 | { PCI_VENDOR_ID_REALTEK, 0x816b, |
| 5661 | PCI_ANY_ID, PCI_ANY_ID, |
| 5662 | 0, 0, pbn_b0_1_115200 }, |
Du Huanpeng | 04b6ff5 | 2020-08-22 09:47:28 +0800 | [diff] [blame] | 5663 | |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 5664 | /* Fintek PCI serial cards */ |
| 5665 | { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 }, |
| 5666 | { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 }, |
| 5667 | { PCI_DEVICE(0x1c29, 0x1112), .driver_data = pbn_fintek_12 }, |
Ji-Ze Hong (Peter Hong) | 68e26a8 | 2019-08-16 13:27:29 +0800 | [diff] [blame] | 5668 | { PCI_DEVICE(0x1c29, 0x1204), .driver_data = pbn_fintek_F81504A }, |
| 5669 | { PCI_DEVICE(0x1c29, 0x1208), .driver_data = pbn_fintek_F81508A }, |
| 5670 | { PCI_DEVICE(0x1c29, 0x1212), .driver_data = pbn_fintek_F81512A }, |
Greg Kroah-Hartman | 2c62a3c | 2013-10-17 10:44:26 -0700 | [diff] [blame] | 5671 | |
Ian Abbott | 1c9c858 | 2017-02-03 20:25:00 +0000 | [diff] [blame] | 5672 | /* MKS Tenta SCOM-080x serial cards */ |
| 5673 | { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 }, |
| 5674 | { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 }, |
| 5675 | |
Matt Wilson | 3bfd130 | 2017-11-13 11:31:31 -0800 | [diff] [blame] | 5676 | /* Amazon PCI serial device */ |
| 5677 | { PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 }, |
| 5678 | |
Matt Schulte | 14faa8c | 2012-11-21 10:35:15 -0600 | [diff] [blame] | 5679 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5680 | * These entries match devices with class COMMUNICATION_SERIAL, |
| 5681 | * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL |
| 5682 | */ |
| 5683 | { PCI_ANY_ID, PCI_ANY_ID, |
| 5684 | PCI_ANY_ID, PCI_ANY_ID, |
| 5685 | PCI_CLASS_COMMUNICATION_SERIAL << 8, |
| 5686 | 0xffff00, pbn_default }, |
| 5687 | { PCI_ANY_ID, PCI_ANY_ID, |
| 5688 | PCI_ANY_ID, PCI_ANY_ID, |
| 5689 | PCI_CLASS_COMMUNICATION_MODEM << 8, |
| 5690 | 0xffff00, pbn_default }, |
| 5691 | { PCI_ANY_ID, PCI_ANY_ID, |
| 5692 | PCI_ANY_ID, PCI_ANY_ID, |
| 5693 | PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, |
| 5694 | 0xffff00, pbn_default }, |
| 5695 | { 0, } |
| 5696 | }; |
| 5697 | |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 5698 | static pci_ers_result_t serial8250_io_error_detected(struct pci_dev *dev, |
| 5699 | pci_channel_state_t state) |
| 5700 | { |
| 5701 | struct serial_private *priv = pci_get_drvdata(dev); |
| 5702 | |
| 5703 | if (state == pci_channel_io_perm_failure) |
| 5704 | return PCI_ERS_RESULT_DISCONNECT; |
| 5705 | |
| 5706 | if (priv) |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 5707 | pciserial_detach_ports(priv); |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 5708 | |
| 5709 | pci_disable_device(dev); |
| 5710 | |
| 5711 | return PCI_ERS_RESULT_NEED_RESET; |
| 5712 | } |
| 5713 | |
| 5714 | static pci_ers_result_t serial8250_io_slot_reset(struct pci_dev *dev) |
| 5715 | { |
| 5716 | int rc; |
| 5717 | |
| 5718 | rc = pci_enable_device(dev); |
| 5719 | |
| 5720 | if (rc) |
| 5721 | return PCI_ERS_RESULT_DISCONNECT; |
| 5722 | |
| 5723 | pci_restore_state(dev); |
| 5724 | pci_save_state(dev); |
| 5725 | |
| 5726 | return PCI_ERS_RESULT_RECOVERED; |
| 5727 | } |
| 5728 | |
| 5729 | static void serial8250_io_resume(struct pci_dev *dev) |
| 5730 | { |
| 5731 | struct serial_private *priv = pci_get_drvdata(dev); |
Gabriel Krisman Bertazi | c130b66 | 2016-12-28 16:42:00 -0200 | [diff] [blame] | 5732 | struct serial_private *new; |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 5733 | |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 5734 | if (!priv) |
| 5735 | return; |
| 5736 | |
Gabriel Krisman Bertazi | c130b66 | 2016-12-28 16:42:00 -0200 | [diff] [blame] | 5737 | new = pciserial_init_ports(dev, priv->board); |
| 5738 | if (!IS_ERR(new)) { |
| 5739 | pci_set_drvdata(dev, new); |
| 5740 | kfree(priv); |
Gabriel Krisman Bertazi | f209fa0 | 2016-11-28 19:34:42 -0200 | [diff] [blame] | 5741 | } |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 5742 | } |
| 5743 | |
Stephen Hemminger | 1d35203 | 2012-09-07 09:33:17 -0700 | [diff] [blame] | 5744 | static const struct pci_error_handlers serial8250_err_handler = { |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 5745 | .error_detected = serial8250_io_error_detected, |
| 5746 | .slot_reset = serial8250_io_slot_reset, |
| 5747 | .resume = serial8250_io_resume, |
| 5748 | }; |
| 5749 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5750 | static struct pci_driver serial_pci_driver = { |
| 5751 | .name = "serial", |
| 5752 | .probe = pciserial_init_one, |
Bill Pemberton | 2d47b71 | 2012-11-19 13:21:34 -0500 | [diff] [blame] | 5753 | .remove = pciserial_remove_one, |
Andy Shevchenko | 61702c3 | 2015-02-02 14:53:26 +0200 | [diff] [blame] | 5754 | .driver = { |
| 5755 | .pm = &pciserial_pm_ops, |
| 5756 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5757 | .id_table = serial_pci_tbl, |
Michael Reed | 2807190 | 2011-05-31 12:06:28 -0500 | [diff] [blame] | 5758 | .err_handler = &serial8250_err_handler, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5759 | }; |
| 5760 | |
Wei Yongjun | 15a12e8 | 2012-10-26 23:04:22 +0800 | [diff] [blame] | 5761 | module_pci_driver(serial_pci_driver); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5762 | |
| 5763 | MODULE_LICENSE("GPL"); |
| 5764 | MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module"); |
| 5765 | MODULE_DEVICE_TABLE(pci, serial_pci_tbl); |