diff options
author | Harald Welte <laforge@gnumonks.org> | 2008-01-01 09:08:35 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:35:00 -0500 |
commit | 20734345b35a5ff661293fcca1e376522bcf01de (patch) | |
tree | 683a6a2311a1a2b6086d35d63478faa151a6b8a1 /drivers/usb/serial | |
parent | d5f5bcd425b771c0b7ff5a650b2ce061ac8bbb87 (diff) |
USB: ftdi_sio: Support for more JTAG adaptors
[PATCH] ftdi_sio: add support for more FTDI based JTAG adaptors
There are more devices similar to the Olimex JTAG adaptor, in that the first
port of the FT2232C is used for JTAG, and only the second port is available as
UART.
I have thus renamed ftdi_olimex_{probe,quirk} to ftdi_jtag_{probe,quirk} and
added vendor/product ID's for the OpenMoko Neo1973 Debug Board as well as the
OOCDlink device.
I've also updated the KERN_INFO message sent to userspace to remove the word
'olimex' and an extra '\n' that was causing an empty line in dmesg.
Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 21 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.h | 11 |
2 files changed, 24 insertions, 8 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 1382af97db72..7200eaeb513b 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -309,12 +309,12 @@ struct ftdi_sio_quirk { | |||
309 | void (*port_probe)(struct ftdi_private *); /* Special settings for probed ports. */ | 309 | void (*port_probe)(struct ftdi_private *); /* Special settings for probed ports. */ |
310 | }; | 310 | }; |
311 | 311 | ||
312 | static int ftdi_olimex_probe (struct usb_serial *serial); | 312 | static int ftdi_jtag_probe (struct usb_serial *serial); |
313 | static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); | 313 | static void ftdi_USB_UIRT_setup (struct ftdi_private *priv); |
314 | static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); | 314 | static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv); |
315 | 315 | ||
316 | static struct ftdi_sio_quirk ftdi_olimex_quirk = { | 316 | static struct ftdi_sio_quirk ftdi_jtag_quirk = { |
317 | .probe = ftdi_olimex_probe, | 317 | .probe = ftdi_jtag_probe, |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { | 320 | static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = { |
@@ -570,7 +570,11 @@ static struct usb_device_id id_table_combined [] = { | |||
570 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, | 570 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, |
571 | { USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) }, | 571 | { USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) }, |
572 | { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), | 572 | { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), |
573 | .driver_info = (kernel_ulong_t)&ftdi_olimex_quirk }, | 573 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
574 | { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID), | ||
575 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
576 | { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), | ||
577 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | ||
574 | { }, /* Optional parameter entry */ | 578 | { }, /* Optional parameter entry */ |
575 | { } /* Terminating entry */ | 579 | { } /* Terminating entry */ |
576 | }; | 580 | }; |
@@ -1283,10 +1287,11 @@ static void ftdi_HE_TIRA1_setup (struct ftdi_private *priv) | |||
1283 | } /* ftdi_HE_TIRA1_setup */ | 1287 | } /* ftdi_HE_TIRA1_setup */ |
1284 | 1288 | ||
1285 | /* | 1289 | /* |
1286 | * First port on Olimex arm-usb-ocd is reserved for JTAG interface | 1290 | * First port on JTAG adaptors such as Olimex arm-usb-ocd or the FIC/OpenMoko |
1287 | * and can be accessed from userspace using openocd. | 1291 | * Neo1973 Debug Board is reserved for JTAG interface and can be accessed from |
1292 | * userspace using openocd. | ||
1288 | */ | 1293 | */ |
1289 | static int ftdi_olimex_probe(struct usb_serial *serial) | 1294 | static int ftdi_jtag_probe(struct usb_serial *serial) |
1290 | { | 1295 | { |
1291 | struct usb_device *udev = serial->dev; | 1296 | struct usb_device *udev = serial->dev; |
1292 | struct usb_interface *interface = serial->interface; | 1297 | struct usb_interface *interface = serial->interface; |
@@ -1294,7 +1299,7 @@ static int ftdi_olimex_probe(struct usb_serial *serial) | |||
1294 | dbg("%s",__FUNCTION__); | 1299 | dbg("%s",__FUNCTION__); |
1295 | 1300 | ||
1296 | if (interface == udev->actconfig->interface[0]) { | 1301 | if (interface == udev->actconfig->interface[0]) { |
1297 | info("Ignoring reserved serial port on Olimex arm-usb-ocd\n"); | 1302 | info("Ignoring serial port reserved for JTAG"); |
1298 | return -ENODEV; | 1303 | return -ENODEV; |
1299 | } | 1304 | } |
1300 | 1305 | ||
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index f6053daf02fb..6eee2ab914ec 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -98,6 +98,10 @@ | |||
98 | #define FTDI_MTXORB_5_PID 0xFA05 /* Matrix Orbital Product Id */ | 98 | #define FTDI_MTXORB_5_PID 0xFA05 /* Matrix Orbital Product Id */ |
99 | #define FTDI_MTXORB_6_PID 0xFA06 /* Matrix Orbital Product Id */ | 99 | #define FTDI_MTXORB_6_PID 0xFA06 /* Matrix Orbital Product Id */ |
100 | 100 | ||
101 | /* OOCDlink by Joern Kaipf <joernk@web.de> | ||
102 | * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */ | ||
103 | #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ | ||
104 | |||
101 | /* Interbiometrics USB I/O Board */ | 105 | /* Interbiometrics USB I/O Board */ |
102 | /* Developed for Interbiometrics by Rudolf Gugler */ | 106 | /* Developed for Interbiometrics by Rudolf Gugler */ |
103 | #define INTERBIOMETRICS_VID 0x1209 | 107 | #define INTERBIOMETRICS_VID 0x1209 |
@@ -560,6 +564,13 @@ | |||
560 | 564 | ||
561 | 565 | ||
562 | /* | 566 | /* |
567 | * FIC / OpenMoko, Inc. http://wiki.openmoko.org/wiki/Neo1973_Debug_Board_v3 | ||
568 | * Submitted by Harald Welte <laforge@openmoko.org> | ||
569 | */ | ||
570 | #define FIC_VID 0x1457 | ||
571 | #define FIC_NEO1973_DEBUG_PID 0x5118 | ||
572 | |||
573 | /* | ||
563 | * BmRequestType: 1100 0000b | 574 | * BmRequestType: 1100 0000b |
564 | * bRequest: FTDI_E2_READ | 575 | * bRequest: FTDI_E2_READ |
565 | * wValue: 0 | 576 | * wValue: 0 |