This is an automated email from Gerrit.

Stéphane Bonnet ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/558

-- gerrit

commit 329f71806affe3d584424c409456f863659399fb
Author: Stephane Bonnet <[email protected]>
Date:   Wed Apr 4 21:05:25 2012 +0200

    topic: Support for Digilent HS1 USB adapter
    
    * Added support to the FT2232 driver for the FT2232H-based
      Digilent HS1 adapter. It does not support reset signals,
      so there is no digilent_hs1_reset function.
    * Changed the ft2232_execute_reset function so it does not
      segfault when an adapter has no reset support.
    
    Change-Id: Iab6cc15f299badaf115615b5d4d785ecb2273c27
    Signed-off-by: Stephane Bonnet <[email protected]>

diff --git a/doc/openocd.texi b/doc/openocd.texi
index 71605ec..55fbf4f 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -374,6 +374,8 @@ Stellaris eval boards, they can be used to debug other 
target boards.
 @* Link @url{http://www.hitex.com/index.php?id=cortino}
 @item @b{dlp-usb1232h}
 @* Link @url{http://www.dlpdesign.com/usb/usb1232h.shtml}
+@item @b{digilent-hs1}
+@* Link @url{http://www.digilentinc.com/Products/Detail.cfm?Prod=JTAG-HS1}
 @end itemize
 
 @section USB-JTAG / Altera USB-Blaster compatibles
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index 3a156bf..7d84cdc 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -193,6 +193,7 @@ static int redbee_init(void);
 static int lisa_l_init(void);
 static int flossjtag_init(void);
 static int xds100v2_init(void);
+static int digilent_hs1_init(void);
 
 /* reset procedures for supported layouts */
 static void ftx23_reset(int trst, int srst);
@@ -337,6 +338,10 @@ static const struct ft2232_layout  ft2232_layouts[] = {
                .init = xds100v2_init,
                .reset = xds100v2_reset,
        },
+       { .name = "digilent-hs1",
+               .init = digilent_hs1_init,
+               .channel = INTERFACE_A,
+       },
        { .name = NULL, /* END OF TABLE */ },
 };
 
@@ -1885,7 +1890,8 @@ static int ft2232_execute_reset(struct jtag_command *cmd)
            (cmd->cmd.reset->srst && (jtag_get_reset_config() & 
RESET_SRST_PULLS_TRST)))
                tap_set_state(TAP_RESET);
 
-       layout->reset(cmd->cmd.reset->trst, cmd->cmd.reset->srst);
+       if (layout->reset)
+               layout->reset(cmd->cmd.reset->trst, cmd->cmd.reset->srst);
        require_send = 1;
 
        DEBUG_JTAG_IO("trst: %i, srst: %i",
@@ -4179,6 +4185,28 @@ static void ktlink_blink(void)
        buffer_write(high_direction);
 }
 
+/********************************************************************
+ * Support for Digilent HS-1
+ * JTAG adapter from Digilent
+ * http://www.digilent.com
+ * Author: Stephane Bonnet [email protected]
+ *******************************************************************/
+
+static int digilent_hs1_init(void)
+{
+       /* the adapter only supports the base JTAG signals, no nTRST
+          nor nSRST */
+       low_output      = 0x88;
+       low_direction   = 0x8b;
+
+       /* initialize low byte for jtag */
+       if (ft2232_set_data_bits_low_byte(low_output, low_direction) != 
ERROR_OK) {
+               LOG_ERROR("couldn't initialize FT2232 with 'digilent_hs1' 
layout");
+               return ERROR_JTAG_INIT_FAILED;
+       }
+       return ERROR_OK;
+}
+
 static const struct command_registration ft2232_command_handlers[] = {
        {
                .name = "ft2232_device_desc",
diff --git a/tcl/interface/digilent-hs1.cfg b/tcl/interface/digilent-hs1.cfg
new file mode 100644
index 0000000..e35f0cf
--- /dev/null
+++ b/tcl/interface/digilent-hs1.cfg
@@ -0,0 +1,15 @@
+#
+# Digilent HS1
+#
+# The Digilent HS1 is a high-speed FT2232H-based adapter, compliant with the
+# Xilinx JTAG 14-pin pinout.
+# It does not support ARM reset signals (SRST and TRST) but can still be used 
for
+# hardware debugging, with some limitations.
+#
+# 
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,395,922&Prod=JTAG-HS1
+#
+
+interface ft2232
+ft2232_device_desc "Digilent Adept USB Device"
+ft2232_layout digilent-hs1
+ft2232_vid_pid 0x0403 0x6010

-- 

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to