aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-08-25 05:46:58 -0400
committerHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>2011-10-17 13:32:24 -0400
commit2209460acb32180f2c81741a47a66092eb634891 (patch)
tree098dbc719b8a7fdf69b3a6e09e86d549e054c3d6 /drivers/usb
parent26181cda902972e70c86d32419ce55f5d8adae0f (diff)
USB: ftdi_sio: add Calao reference board support
BugLink: http://bugs.launchpad.net/bugs/868628 commit c96fbdd0ab97235f930ebf24b38fa42a2e3458cf upstream. 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> 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 9afb3614373..f968a3debf1 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:
@@ -177,7 +182,8 @@ static struct usb_device_id id_table_combined [] = {
177 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) }, 182 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
178 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) }, 183 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
179 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) }, 184 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) },
180 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) }, 185 { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) ,
186 .driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk },
181 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) }, 187 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
182 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) }, 188 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
183 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) }, 189 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
@@ -1733,6 +1739,18 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
1733 return 0; 1739 return 0;
1734} 1740}
1735 1741
1742static int ftdi_8u2232c_probe(struct usb_serial *serial)
1743{
1744 struct usb_device *udev = serial->dev;
1745
1746 dbg("%s", __func__);
1747
1748 if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
1749 return ftdi_jtag_probe(serial);
1750
1751 return 0;
1752}
1753
1736/* 1754/*
1737 * First and second port on STMCLiteadaptors is reserved for JTAG interface 1755 * First and second port on STMCLiteadaptors is reserved for JTAG interface
1738 * and the forth port for pio 1756 * and the forth port for pio