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