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