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