This is an automated email from Gerrit.

Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/839

-- gerrit

commit 4d0403933085ea9f03561730592715b308979152
Author: Spencer Oliver <[email protected]>
Date:   Mon Sep 24 12:29:47 2012 +0100

    ftdi: fix adapter_init rclk fallback
    
    adapter_init expects jtag_get_speed (via ftdi_khz) to return a valid
    fallback speed if the adapter does not support rclk. The call was failing
    and so was the rest of the adapter init.
    
    The makes the new ftdi driver emulate the old ftdi driver.
    
    Change-Id: Ic7fac7d201241eb181e98f1ba7111f159731f6e0
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c
index 46797d7..a8d396c 100644
--- a/src/jtag/drivers/ftdi.c
+++ b/src/jtag/drivers/ftdi.c
@@ -247,6 +247,11 @@ static int ftdi_speed_div(int speed, int *khz)
 
 static int ftdi_khz(int khz, int *jtag_speed)
 {
+       if (khz == 0 && !mpsse_is_high_speed(mpsse_ctx)) {
+               LOG_DEBUG("RCLK not supported");
+               return ERROR_FAIL;
+       }
+
        *jtag_speed = khz * 1000;
        return ERROR_OK;
 }

-- 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to