Browse Source

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 <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/839
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
tags/v0.7.0-rc1
Spencer Oliver 11 years ago
committed by Freddie Chopin
parent
commit
e4df550ad9
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/jtag/drivers/ftdi.c

+ 5
- 0
src/jtag/drivers/ftdi.c View File

@@ -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;
}


Loading…
Cancel
Save