Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=20734345b35a5ff661293fcca1e376522bcf01de
Commit:     20734345b35a5ff661293fcca1e376522bcf01de
Parent:     d5f5bcd425b771c0b7ff5a650b2ce061ac8bbb87
Author:     Harald Welte <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 1 15:08:35 2008 +0100
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:35:00 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/ftdi_sio.c |   21 +++++++++++++--------
 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 1382af9..7200eae 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -309,12 +309,12 @@ struct ftdi_sio_quirk {
        void (*port_probe)(struct ftdi_private *); /* Special settings for 
probed ports. */
 };
 
-static int   ftdi_olimex_probe         (struct usb_serial *serial);
+static int   ftdi_jtag_probe           (struct usb_serial *serial);
 static void  ftdi_USB_UIRT_setup       (struct ftdi_private *priv);
 static void  ftdi_HE_TIRA1_setup       (struct ftdi_private *priv);
 
-static struct ftdi_sio_quirk ftdi_olimex_quirk = {
-       .probe  = ftdi_olimex_probe,
+static struct ftdi_sio_quirk ftdi_jtag_quirk = {
+       .probe  = ftdi_jtag_probe,
 };
 
 static struct ftdi_sio_quirk ftdi_USB_UIRT_quirk = {
@@ -570,7 +570,11 @@ static struct usb_device_id id_table_combined [] = {
        { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) },
        { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
-               .driver_info = (kernel_ulong_t)&ftdi_olimex_quirk },
+               .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+       { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
+               .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+       { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID),
+               .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { },                                    /* Optional parameter entry */
        { }                                     /* Terminating entry */
 };
@@ -1283,10 +1287,11 @@ static void ftdi_HE_TIRA1_setup (struct ftdi_private 
*priv)
 } /* ftdi_HE_TIRA1_setup */
 
 /*
- * First port on Olimex arm-usb-ocd is reserved for JTAG interface
- * and can be accessed from userspace using openocd.
+ * First port on JTAG adaptors such as Olimex arm-usb-ocd or the FIC/OpenMoko
+ * Neo1973 Debug Board is reserved for JTAG interface and can be accessed from
+ * userspace using openocd.
  */
-static int ftdi_olimex_probe(struct usb_serial *serial)
+static int ftdi_jtag_probe(struct usb_serial *serial)
 {
        struct usb_device *udev = serial->dev;
        struct usb_interface *interface = serial->interface;
@@ -1294,7 +1299,7 @@ static int ftdi_olimex_probe(struct usb_serial *serial)
        dbg("%s",__FUNCTION__);
 
        if (interface == udev->actconfig->interface[0]) {
-               info("Ignoring reserved serial port on Olimex arm-usb-ocd\n");
+               info("Ignoring serial port reserved for JTAG");
                return -ENODEV;
        }
 
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index f6053da..6eee2ab 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -98,6 +98,10 @@
 #define FTDI_MTXORB_5_PID      0xFA05  /* Matrix Orbital Product Id */
 #define FTDI_MTXORB_6_PID      0xFA06  /* Matrix Orbital Product Id */
 
+/* OOCDlink by Joern Kaipf <[EMAIL PROTECTED]>
+ * (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */
+#define FTDI_OOCDLINK_PID      0xbaf8  /* Amontec JTAGkey */
+
 /* Interbiometrics USB I/O Board */
 /* Developed for Interbiometrics by Rudolf Gugler */
 #define INTERBIOMETRICS_VID              0x1209
@@ -560,6 +564,13 @@
 
 
 /*
+ * FIC / OpenMoko, Inc. http://wiki.openmoko.org/wiki/Neo1973_Debug_Board_v3
+ * Submitted by Harald Welte <[EMAIL PROTECTED]>
+ */
+#define        FIC_VID                 0x1457
+#define        FIC_NEO1973_DEBUG_PID   0x5118
+
+/*
  *   BmRequestType:  1100 0000b
  *   bRequest:       FTDI_E2_READ
  *   wValue:         0
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to