Commit 8843ae25 authored by Soeren Grunewald's avatar Soeren Grunewald Committed by Greg Kroah-Hartman

serial: 8250_pci: Add support for 16 port Exar boards

commit 96a5d18b upstream.

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: default avatarSoeren Grunewald <soeren.grunewald@desy.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 71c36410
...@@ -1772,6 +1772,8 @@ pci_wch_ch353_setup(struct serial_private *priv, ...@@ -1772,6 +1772,8 @@ pci_wch_ch353_setup(struct serial_private *priv,
#define PCI_DEVICE_ID_SUNIX_1999 0x1999 #define PCI_DEVICE_ID_SUNIX_1999 0x1999
#define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
...@@ -2266,6 +2268,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { ...@@ -2266,6 +2268,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
.subdevice = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.setup = pci_xr17v35x_setup, .setup = pci_xr17v35x_setup,
}, },
{
.vendor = PCI_VENDOR_ID_EXAR,
.device = PCI_DEVICE_ID_EXAR_XR17V8358,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.setup = pci_xr17v35x_setup,
},
/* /*
* Xircom cards * Xircom cards
*/ */
...@@ -2706,6 +2715,7 @@ enum pci_board_num_t { ...@@ -2706,6 +2715,7 @@ enum pci_board_num_t {
pbn_exar_XR17V352, pbn_exar_XR17V352,
pbn_exar_XR17V354, pbn_exar_XR17V354,
pbn_exar_XR17V358, pbn_exar_XR17V358,
pbn_exar_XR17V8358,
pbn_exar_ibm_saturn, pbn_exar_ibm_saturn,
pbn_pasemi_1682M, pbn_pasemi_1682M,
pbn_ni8430_2, pbn_ni8430_2,
...@@ -3375,6 +3385,14 @@ static struct pciserial_board pci_boards[] = { ...@@ -3375,6 +3385,14 @@ static struct pciserial_board pci_boards[] = {
.reg_shift = 0, .reg_shift = 0,
.first_offset = 0, .first_offset = 0,
}, },
[pbn_exar_XR17V8358] = {
.flags = FL_BASE0,
.num_ports = 16,
.base_baud = 7812500,
.uart_offset = 0x400,
.reg_shift = 0,
.first_offset = 0,
},
[pbn_exar_ibm_saturn] = { [pbn_exar_ibm_saturn] = {
.flags = FL_BASE0, .flags = FL_BASE0,
.num_ports = 1, .num_ports = 1,
...@@ -4731,7 +4749,7 @@ static struct pci_device_id serial_pci_tbl[] = { ...@@ -4731,7 +4749,7 @@ static struct pci_device_id serial_pci_tbl[] = {
0, 0,
0, pbn_exar_XR17C158 }, 0, pbn_exar_XR17C158 },
/* /*
* Exar Corp. XR17V35[248] Dual/Quad/Octal PCIe UARTs * Exar Corp. XR17V[48]35[248] Dual/Quad/Octal/Hexa PCIe UARTs
*/ */
{ PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352, { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352,
PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
...@@ -4745,7 +4763,10 @@ static struct pci_device_id serial_pci_tbl[] = { ...@@ -4745,7 +4763,10 @@ static struct pci_device_id serial_pci_tbl[] = {
PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
0, 0,
0, pbn_exar_XR17V358 }, 0, pbn_exar_XR17V358 },
{ PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V8358,
PCI_ANY_ID, PCI_ANY_ID,
0,
0, pbn_exar_XR17V8358 },
/* /*
* Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke)
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment