History

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

Jean-Christophe PLAGNIOL-VILLARD committed 15 years ago

Commit c96fbdd1 parent 61185141 file · +19 −1Browse files

Unified · Split

drivers/usb/serial/ftdi_sio.c+19−1
@@ -101,6 +101,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial); · 100 unmodified lines
101101 static int ftdi_mtxorb_hack_setup(struct usb_serial *serial);
102102 static int ftdi_NDI_device_setup(struct usb_serial *serial);
103103 static int ftdi_stmclite_probe(struct usb_serial *serial);
104+static int ftdi_8u2232c_probe(struct usb_serial *serial);
104105 static void ftdi_USB_UIRT_setup(struct ftdi_private *priv);
105106 static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
106107
@@ -128,6 +129,10 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = { · 21 unmodified lines
128129 .probe = ftdi_stmclite_probe,
129130 };
130131
132+static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
133+ .probe = ftdi_8u2232c_probe,
134+};
135+
131136 /*
132137 * The 8U232AM has the same API as the sio except for:
133138 * - it can support MUCH higher baudrates; up to:
@@ -178,7 +183,8 @@ static struct usb_device_id id_table_combined [] = { · 44 unmodified lines
178183 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
179184 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
180185 { 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 },
182188 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
183189 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
184190 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
@@ -1737,6 +1743,18 @@ static int ftdi_jtag_probe(struct usb_serial *serial) · 1552 unmodified lines
17371743 return 0;
17381744 }
17391745
1746+static 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+
17401758 /*
17411759 * First and second port on STMCLiteadaptors is reserved for JTAG interface
17421760 * and the forth port for pio