diff options
author | Soeren Grunewald <soeren.grunewald@desy.de> | 2015-04-28 10:29:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-28 14:22:31 -0400 |
commit | 96a5d18bc1338786fecac73599f1681f59a59a8e (patch) | |
tree | 2de0fdf95d09910b777e7b233148226494a9e9df /drivers/tty | |
parent | 31c6ba97d1671b0a853197fe54a05e0b07ce2631 (diff) |
serial: 8250_pci: Add support for 16 port Exar boards
The Exar XR17V358 chip usually provides only 8 ports. But two chips can be
combined to act as a single 16 port chip. Therefor one chip is configured
as master the second as slave by connecting the mode pin to VCC (master)
or GND (slave).
Then the master chip is reporting a different device-id depending on
whether a slave is detected or not. The UARTs 8-15 are addressed from
0x2000-0x3fff. So the offset of 0x400 from UART to UART can be used to
address all 16 ports as before.
See: https://www.exar.com/common/content/document.ashx?id=1587 page 11
Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 08da4d3e2162..46bcebba54b2 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -1998,6 +1998,8 @@ pci_wch_ch38x_setup(struct serial_private *priv, | |||
1998 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 | 1998 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 |
1999 | #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 | 1999 | #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 |
2000 | 2000 | ||
2001 | #define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358 | ||
2002 | |||
2001 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ | 2003 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ |
2002 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 | 2004 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 |
2003 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 | 2005 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 |
@@ -2520,6 +2522,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
2520 | .subdevice = PCI_ANY_ID, | 2522 | .subdevice = PCI_ANY_ID, |
2521 | .setup = pci_xr17v35x_setup, | 2523 | .setup = pci_xr17v35x_setup, |
2522 | }, | 2524 | }, |
2525 | { | ||
2526 | .vendor = PCI_VENDOR_ID_EXAR, | ||
2527 | .device = PCI_DEVICE_ID_EXAR_XR17V8358, | ||
2528 | .subvendor = PCI_ANY_ID, | ||
2529 | .subdevice = PCI_ANY_ID, | ||
2530 | .setup = pci_xr17v35x_setup, | ||
2531 | }, | ||
2523 | /* | 2532 | /* |
2524 | * Xircom cards | 2533 | * Xircom cards |
2525 | */ | 2534 | */ |
@@ -2999,6 +3008,7 @@ enum pci_board_num_t { | |||
2999 | pbn_exar_XR17V352, | 3008 | pbn_exar_XR17V352, |
3000 | pbn_exar_XR17V354, | 3009 | pbn_exar_XR17V354, |
3001 | pbn_exar_XR17V358, | 3010 | pbn_exar_XR17V358, |
3011 | pbn_exar_XR17V8358, | ||
3002 | pbn_exar_ibm_saturn, | 3012 | pbn_exar_ibm_saturn, |
3003 | pbn_pasemi_1682M, | 3013 | pbn_pasemi_1682M, |
3004 | pbn_ni8430_2, | 3014 | pbn_ni8430_2, |
@@ -3685,6 +3695,14 @@ static struct pciserial_board pci_boards[] = { | |||
3685 | .reg_shift = 0, | 3695 | .reg_shift = 0, |
3686 | .first_offset = 0, | 3696 | .first_offset = 0, |
3687 | }, | 3697 | }, |
3698 | [pbn_exar_XR17V8358] = { | ||
3699 | .flags = FL_BASE0, | ||
3700 | .num_ports = 16, | ||
3701 | .base_baud = 7812500, | ||
3702 | .uart_offset = 0x400, | ||
3703 | .reg_shift = 0, | ||
3704 | .first_offset = 0, | ||
3705 | }, | ||
3688 | [pbn_exar_ibm_saturn] = { | 3706 | [pbn_exar_ibm_saturn] = { |
3689 | .flags = FL_BASE0, | 3707 | .flags = FL_BASE0, |
3690 | .num_ports = 1, | 3708 | .num_ports = 1, |
@@ -5080,7 +5098,7 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
5080 | 0, | 5098 | 0, |
5081 | 0, pbn_exar_XR17C158 }, | 5099 | 0, pbn_exar_XR17C158 }, |
5082 | /* | 5100 | /* |
5083 | * Exar Corp. XR17V35[248] Dual/Quad/Octal PCIe UARTs | 5101 | * Exar Corp. XR17V[48]35[248] Dual/Quad/Octal/Hexa PCIe UARTs |
5084 | */ | 5102 | */ |
5085 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352, | 5103 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352, |
5086 | PCI_ANY_ID, PCI_ANY_ID, | 5104 | PCI_ANY_ID, PCI_ANY_ID, |
@@ -5094,7 +5112,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
5094 | PCI_ANY_ID, PCI_ANY_ID, | 5112 | PCI_ANY_ID, PCI_ANY_ID, |
5095 | 0, | 5113 | 0, |
5096 | 0, pbn_exar_XR17V358 }, | 5114 | 0, pbn_exar_XR17V358 }, |
5097 | 5115 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V8358, | |
5116 | PCI_ANY_ID, PCI_ANY_ID, | ||
5117 | 0, | ||
5118 | 0, pbn_exar_XR17V8358 }, | ||
5098 | /* | 5119 | /* |
5099 | * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) | 5120 | * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) |
5100 | */ | 5121 | */ |