diff options
author | Sergej Pupykin <ml@sergej.pp.ru> | 2014-12-30 08:16:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 16:46:02 -0500 |
commit | 72a3c0e4e6624a77ee6eee0903f209185fe20647 (patch) | |
tree | e319d8e2a7673df0d1483869b145ecb5a6210f37 | |
parent | 68ed7e1c3d236e9e1e60ed6cae22f2c1c4ba2952 (diff) |
tty: Add support for the WCH384 4S multi-IO card
WCH384 4S board is a PCI-E card with 4 DB9 COM ports detected as
Serial controller: Device 1c00:3470 (rev 10) (prog-if 05 [16850])
Signed-off-by: Sergej Pupykin <ml@sergej.pp.ru>
Acked-by: Zany Yan <sirlight@cox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 31feeb2d0a66..d1f8dc6aabcb 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -1815,7 +1815,7 @@ pci_wch_ch353_setup(struct serial_private *priv, | |||
1815 | } | 1815 | } |
1816 | 1816 | ||
1817 | static int | 1817 | static int |
1818 | pci_wch_ch382_setup(struct serial_private *priv, | 1818 | pci_wch_ch38x_setup(struct serial_private *priv, |
1819 | const struct pciserial_board *board, | 1819 | const struct pciserial_board *board, |
1820 | struct uart_8250_port *port, int idx) | 1820 | struct uart_8250_port *port, int idx) |
1821 | { | 1821 | { |
@@ -1880,6 +1880,7 @@ pci_wch_ch382_setup(struct serial_private *priv, | |||
1880 | 1880 | ||
1881 | #define PCIE_VENDOR_ID_WCH 0x1c00 | 1881 | #define PCIE_VENDOR_ID_WCH 0x1c00 |
1882 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 | 1882 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 |
1883 | #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 | ||
1883 | 1884 | ||
1884 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ | 1885 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ |
1885 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 | 1886 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 |
@@ -2571,13 +2572,21 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
2571 | .subdevice = PCI_ANY_ID, | 2572 | .subdevice = PCI_ANY_ID, |
2572 | .setup = pci_wch_ch353_setup, | 2573 | .setup = pci_wch_ch353_setup, |
2573 | }, | 2574 | }, |
2574 | /* WCH CH382 2S1P card (16750 clone) */ | 2575 | /* WCH CH382 2S1P card (16850 clone) */ |
2575 | { | 2576 | { |
2576 | .vendor = PCIE_VENDOR_ID_WCH, | 2577 | .vendor = PCIE_VENDOR_ID_WCH, |
2577 | .device = PCIE_DEVICE_ID_WCH_CH382_2S1P, | 2578 | .device = PCIE_DEVICE_ID_WCH_CH382_2S1P, |
2578 | .subvendor = PCI_ANY_ID, | 2579 | .subvendor = PCI_ANY_ID, |
2579 | .subdevice = PCI_ANY_ID, | 2580 | .subdevice = PCI_ANY_ID, |
2580 | .setup = pci_wch_ch382_setup, | 2581 | .setup = pci_wch_ch38x_setup, |
2582 | }, | ||
2583 | /* WCH CH384 4S card (16850 clone) */ | ||
2584 | { | ||
2585 | .vendor = PCIE_VENDOR_ID_WCH, | ||
2586 | .device = PCIE_DEVICE_ID_WCH_CH384_4S, | ||
2587 | .subvendor = PCI_ANY_ID, | ||
2588 | .subdevice = PCI_ANY_ID, | ||
2589 | .setup = pci_wch_ch38x_setup, | ||
2581 | }, | 2590 | }, |
2582 | /* | 2591 | /* |
2583 | * ASIX devices with FIFO bug | 2592 | * ASIX devices with FIFO bug |
@@ -2876,6 +2885,7 @@ enum pci_board_num_t { | |||
2876 | pbn_fintek_4, | 2885 | pbn_fintek_4, |
2877 | pbn_fintek_8, | 2886 | pbn_fintek_8, |
2878 | pbn_fintek_12, | 2887 | pbn_fintek_12, |
2888 | pbn_wch384_4, | ||
2879 | }; | 2889 | }; |
2880 | 2890 | ||
2881 | /* | 2891 | /* |
@@ -3675,6 +3685,14 @@ static struct pciserial_board pci_boards[] = { | |||
3675 | .base_baud = 115200, | 3685 | .base_baud = 115200, |
3676 | .first_offset = 0x40, | 3686 | .first_offset = 0x40, |
3677 | }, | 3687 | }, |
3688 | |||
3689 | [pbn_wch384_4] = { | ||
3690 | .flags = FL_BASE0, | ||
3691 | .num_ports = 4, | ||
3692 | .base_baud = 115200, | ||
3693 | .uart_offset = 8, | ||
3694 | .first_offset = 0xC0, | ||
3695 | }, | ||
3678 | }; | 3696 | }; |
3679 | 3697 | ||
3680 | static const struct pci_device_id blacklist[] = { | 3698 | static const struct pci_device_id blacklist[] = { |
@@ -3687,6 +3705,7 @@ static const struct pci_device_id blacklist[] = { | |||
3687 | { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */ | 3705 | { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */ |
3688 | { PCI_DEVICE(0x4348, 0x5053), }, /* WCH CH353 1S1P */ | 3706 | { PCI_DEVICE(0x4348, 0x5053), }, /* WCH CH353 1S1P */ |
3689 | { PCI_DEVICE(0x1c00, 0x3250), }, /* WCH CH382 2S1P */ | 3707 | { PCI_DEVICE(0x1c00, 0x3250), }, /* WCH CH382 2S1P */ |
3708 | { PCI_DEVICE(0x1c00, 0x3470), }, /* WCH CH384 4S */ | ||
3690 | }; | 3709 | }; |
3691 | 3710 | ||
3692 | /* | 3711 | /* |
@@ -5400,6 +5419,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
5400 | PCI_ANY_ID, PCI_ANY_ID, | 5419 | PCI_ANY_ID, PCI_ANY_ID, |
5401 | 0, 0, pbn_b0_bt_2_115200 }, | 5420 | 0, 0, pbn_b0_bt_2_115200 }, |
5402 | 5421 | ||
5422 | { PCIE_VENDOR_ID_WCH, PCIE_DEVICE_ID_WCH_CH384_4S, | ||
5423 | PCI_ANY_ID, PCI_ANY_ID, | ||
5424 | 0, 0, pbn_wch384_4 }, | ||
5425 | |||
5403 | /* | 5426 | /* |
5404 | * Commtech, Inc. Fastcom adapters | 5427 | * Commtech, Inc. Fastcom adapters |
5405 | */ | 5428 | */ |