diff options
author | Guainluca Anzolin <gianluca@sottospazio.it> | 2012-09-04 10:56:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-05 16:18:13 -0400 |
commit | 6971c635af27b1d18d409e337e70bae25d2fa8ec (patch) | |
tree | 40a7ebd4e57335d1afeb0b1615c6d3c4f9750853 /drivers/tty/serial | |
parent | 9303ac158fcd5f69c032e06391a9a12d3ccb343e (diff) |
parport_serial: Add support for the WCH353 2S/1P multi-IO card
To allow parport_serial to handle the card the same PCI ids are blacklisted
in 8250_pci.c using the existing software blacklist mechanism.
The blacklist array is also renamed because it now covers this new use
case.
Since the two serial ports are auto-detected as XScale instead of 16550A
clones, we also add a quirk to 8250_pci.c to skip autodetection and set the
correct port type.
Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it>
[Fold in fixes for the uart_8250 change]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index ad4bb8dec36f..803d313e061b 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -1164,6 +1164,16 @@ pci_xr17c154_setup(struct serial_private *priv, | |||
1164 | return pci_default_setup(priv, board, port, idx); | 1164 | return pci_default_setup(priv, board, port, idx); |
1165 | } | 1165 | } |
1166 | 1166 | ||
1167 | static int | ||
1168 | pci_wch_ch353_setup(struct serial_private *priv, | ||
1169 | const struct pciserial_board *board, | ||
1170 | struct uart_8250_port *port, int idx) | ||
1171 | { | ||
1172 | port->port.flags |= UPF_FIXED_TYPE; | ||
1173 | port->port.type = PORT_16550A; | ||
1174 | return pci_default_setup(priv, board, port, idx); | ||
1175 | } | ||
1176 | |||
1167 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B | 1177 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B |
1168 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B | 1178 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B |
1169 | #define PCI_DEVICE_ID_OCTPRO 0x0001 | 1179 | #define PCI_DEVICE_ID_OCTPRO 0x0001 |
@@ -1737,6 +1747,14 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
1737 | .subdevice = PCI_ANY_ID, | 1747 | .subdevice = PCI_ANY_ID, |
1738 | .setup = pci_omegapci_setup, | 1748 | .setup = pci_omegapci_setup, |
1739 | }, | 1749 | }, |
1750 | /* WCH CH353 2S1P card (16550 clone) */ | ||
1751 | { | ||
1752 | .vendor = 0x4348, | ||
1753 | .device = 0x7053, | ||
1754 | .subvendor = 0x4348, | ||
1755 | .subdevice = 0x3253, | ||
1756 | .setup = pci_wch_ch353_setup, | ||
1757 | }, | ||
1740 | /* | 1758 | /* |
1741 | * ASIX devices with FIFO bug | 1759 | * ASIX devices with FIFO bug |
1742 | */ | 1760 | */ |
@@ -2636,10 +2654,14 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
2636 | }, | 2654 | }, |
2637 | }; | 2655 | }; |
2638 | 2656 | ||
2639 | static const struct pci_device_id softmodem_blacklist[] = { | 2657 | static const struct pci_device_id blacklist[] = { |
2658 | /* softmodems */ | ||
2640 | { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */ | 2659 | { PCI_VDEVICE(AL, 0x5457), }, /* ALi Corporation M5457 AC'97 Modem */ |
2641 | { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */ | 2660 | { PCI_VDEVICE(MOTOROLA, 0x3052), }, /* Motorola Si3052-based modem */ |
2642 | { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */ | 2661 | { PCI_DEVICE(0x1543, 0x3052), }, /* Si3052-based modem, default IDs */ |
2662 | |||
2663 | /* multi-io cards handled by parport_serial */ | ||
2664 | { PCI_DEVICE(0x4348, 0x7053), }, /* WCH CH353 2S1P */ | ||
2643 | }; | 2665 | }; |
2644 | 2666 | ||
2645 | /* | 2667 | /* |
@@ -2650,7 +2672,7 @@ static const struct pci_device_id softmodem_blacklist[] = { | |||
2650 | static int __devinit | 2672 | static int __devinit |
2651 | serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) | 2673 | serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) |
2652 | { | 2674 | { |
2653 | const struct pci_device_id *blacklist; | 2675 | const struct pci_device_id *bldev; |
2654 | int num_iomem, num_port, first_port = -1, i; | 2676 | int num_iomem, num_port, first_port = -1, i; |
2655 | 2677 | ||
2656 | /* | 2678 | /* |
@@ -2667,13 +2689,13 @@ serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) | |||
2667 | 2689 | ||
2668 | /* | 2690 | /* |
2669 | * Do not access blacklisted devices that are known not to | 2691 | * Do not access blacklisted devices that are known not to |
2670 | * feature serial ports. | 2692 | * feature serial ports or are handled by other modules. |
2671 | */ | 2693 | */ |
2672 | for (blacklist = softmodem_blacklist; | 2694 | for (bldev = blacklist; |
2673 | blacklist < softmodem_blacklist + ARRAY_SIZE(softmodem_blacklist); | 2695 | bldev < blacklist + ARRAY_SIZE(blacklist); |
2674 | blacklist++) { | 2696 | bldev++) { |
2675 | if (dev->vendor == blacklist->vendor && | 2697 | if (dev->vendor == bldev->vendor && |
2676 | dev->device == blacklist->device) | 2698 | dev->device == bldev->device) |
2677 | return -ENODEV; | 2699 | return -ENODEV; |
2678 | } | 2700 | } |
2679 | 2701 | ||