aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-08-25 05:46:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-25 12:44:50 -0400
commitc96fbdd0ab97235f930ebf24b38fa42a2e3458cf (patch)
treeb36358b9a7ce03928049fbbeed002e555483fe7a /drivers/usb
parent6118514e8749105334f46ccec6faf9a439be6cf9 (diff)
USB: ftdi_sio: add Calao reference board support
Calao use on there dev kits a FT2232 where the port 0 is used for the JTAG and port 1 for the UART They use the same VID and PID as FTDI Chip but they program the manufacturer name in the eeprom So use this information to detect it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Gregory Hermant <gregory.hermant@calao-systems.com> Cc: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ftdi_sio.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 78a2cf9551c..5fc13e71791 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -101,6 +101,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial);
101static int ftdi_mtxorb_hack_setup(struct usb_serial *serial); 101static int ftdi_mtxorb_hack_setup(struct usb_serial *serial);
102static int ftdi_NDI_device_setup(struct usb_serial *serial); 102static int ftdi_NDI_device_setup(struct usb_serial *serial);
103static int ftdi_stmclite_probe(struct usb_serial *serial); 103static int ftdi_stmclite_probe(struct usb_serial *serial);
104static int ftdi_8u2232c_probe(struct usb_serial *serial);
104static void ftdi_USB_UIRT_setup(struct ftdi_private *priv); 105static void ftdi_USB_UIRT_setup(struct ftdi_private *priv);
105static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv); 106static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
106 107
@@ -128,6 +129,10 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = {
128 .probe = ftdi_stmclite_probe, 129 .probe = ftdi_stmclite_probe,
129}; 130};
130 131
132static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
133 .probe = ftdi_8u2232c_probe,
134};
135
131/* 136/*
132 * The 8U232AM has the same API as the sio except for: 137 * The 8U232AM has the same API as the sio except for:
133 * - it can support MUCH higher baudrates; up to: 138 * - it can support MUCH higher baudrates; up to:
@@ -178,7 +183,8 @@ static struct usb_device_id id_table_combined [] = {
178 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, 183 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
179 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, 184 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
180 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) }, 185 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) },
181 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 186 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) ,
187 .driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk },
182 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) }, 188 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
183 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) }, 189 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
184 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, 190 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
@@ -1737,6 +1743,18 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
1737 return 0; 1743 return 0;
1738} 1744}
1739 1745
1746static int ftdi_8u2232c_probe(struct usb_serial *serial)
1747{
1748 struct usb_device *udev = serial->dev;
1749
1750 dbg("%s", __func__);
1751
1752 if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
1753 return ftdi_jtag_probe(serial);
1754
1755 return 0;
1756}
1757
1740/* 1758/*
1741 * First and second port on STMCLiteadaptors is reserved for JTAG interface 1759 * First and second port on STMCLiteadaptors is reserved for JTAG interface
1742 * and the forth port for pio 1760 * and the forth port for pio