diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-01-29 09:32:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-03 19:45:04 -0500 |
commit | 6ec2f46c4b4abf48c88c0ae7c476f347b97e1105 (patch) | |
tree | 48b62528fb8bdb3b3f57c094096e771917cc1ecc /drivers/usb/serial/ftdi_sio.c | |
parent | c25f6b1591b158f7ae3b9132367d0fa6d632e70e (diff) |
USB: ftdi_sio: add ST Micro Connect Lite uart support
on ST Micro Connect Lite we have 4 port
Part A and B for the JTAG
Port C Uart
Port D for PIO
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 4787c0cd063f..b1b03fb55b6b 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -100,6 +100,7 @@ struct ftdi_sio_quirk { | |||
100 | static int ftdi_jtag_probe(struct usb_serial *serial); | 100 | static int ftdi_jtag_probe(struct usb_serial *serial); |
101 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); | 101 | static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); |
102 | static int ftdi_NDI_device_setup(struct usb_serial *serial); | 102 | static int ftdi_NDI_device_setup(struct usb_serial *serial); |
103 | static int ftdi_stmclite_probe(struct usb_serial *serial); | ||
103 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); | 104 | static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); |
104 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); | 105 | static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); |
105 | 106 | ||
@@ -123,6 +124,10 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = { | |||
123 | .port_probe = ftdi_HE_TIRA1_setup, | 124 | .port_probe = ftdi_HE_TIRA1_setup, |
124 | }; | 125 | }; |
125 | 126 | ||
127 | static struct ftdi_sio_quirk ftdi_stmclite_quirk = { | ||
128 | .probe = ftdi_stmclite_probe, | ||
129 | }; | ||
130 | |||
126 | /* | 131 | /* |
127 | * The 8U232AM has the same API as the sio except for: | 132 | * The 8U232AM has the same API as the sio except for: |
128 | * - it can support MUCH higher baudrates; up to: | 133 | * - it can support MUCH higher baudrates; up to: |
@@ -810,6 +815,8 @@ static struct usb_device_id id_table_combined [] = { | |||
810 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, | 815 | { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) }, |
811 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), | 816 | { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID), |
812 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 817 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
818 | { USB_DEVICE(ST_VID, ST_STMCLT1030_PID), | ||
819 | .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk }, | ||
813 | { }, /* Optional parameter entry */ | 820 | { }, /* Optional parameter entry */ |
814 | { } /* Terminating entry */ | 821 | { } /* Terminating entry */ |
815 | }; | 822 | }; |
@@ -1709,6 +1716,25 @@ static int ftdi_jtag_probe(struct usb_serial *serial) | |||
1709 | } | 1716 | } |
1710 | 1717 | ||
1711 | /* | 1718 | /* |
1719 | * First and second port on STMCLiteadaptors is reserved for JTAG interface | ||
1720 | * and the forth port for pio | ||
1721 | */ | ||
1722 | static int ftdi_stmclite_probe(struct usb_serial *serial) | ||
1723 | { | ||
1724 | struct usb_device *udev = serial->dev; | ||
1725 | struct usb_interface *interface = serial->interface; | ||
1726 | |||
1727 | dbg("%s", __func__); | ||
1728 | |||
1729 | if (interface == udev->actconfig->interface[2]) | ||
1730 | return 0; | ||
1731 | |||
1732 | dev_info(&udev->dev, "Ignoring serial port reserved for JTAG\n"); | ||
1733 | |||
1734 | return -ENODEV; | ||
1735 | } | ||
1736 | |||
1737 | /* | ||
1712 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. | 1738 | * The Matrix Orbital VK204-25-USB has an invalid IN endpoint. |
1713 | * We have to correct it if we want to read from it. | 1739 | * We have to correct it if we want to read from it. |
1714 | */ | 1740 | */ |