nds32: Avoid detected JTAG clock
AICE2 doesn't support scan for the maximum clock frequency of JTAG chain. It will cause USB command timeout. Change-Id: I41d1e3be387b6ed5a4dd0be663385a5f053fbcf9 Signed-off-by: Hellosun Wu <wujiheng.tw@gmail.com> Reviewed-on: http://openocd.zylin.com/4292 Tested-by: jenkins Reviewed-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
84b571f667
commit
e36c2f2da4
|
@ -2289,6 +2289,7 @@ get_delay:
|
||||||
|
|
||||||
static int aice_usb_set_clock(int set_clock)
|
static int aice_usb_set_clock(int set_clock)
|
||||||
{
|
{
|
||||||
|
if (set_clock & AICE_TCK_CONTROL_TCK_SCAN) {
|
||||||
if (aice_write_ctrl(AICE_WRITE_CTRL_TCK_CONTROL,
|
if (aice_write_ctrl(AICE_WRITE_CTRL_TCK_CONTROL,
|
||||||
AICE_TCK_CONTROL_TCK_SCAN) != ERROR_OK)
|
AICE_TCK_CONTROL_TCK_SCAN) != ERROR_OK)
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
|
@ -2321,6 +2322,7 @@ static int aice_usb_set_clock(int set_clock)
|
||||||
LOG_ERROR("User specifies higher jtag clock than TCK_SCAN clock");
|
LOG_ERROR("User specifies higher jtag clock than TCK_SCAN clock");
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (aice_write_ctrl(AICE_WRITE_CTRL_TCK_CONTROL, set_clock) != ERROR_OK)
|
if (aice_write_ctrl(AICE_WRITE_CTRL_TCK_CONTROL, set_clock) != ERROR_OK)
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
|
|
||||||
/* Constants for AICE command WRITE_CTRL:TCK_CONTROL */
|
/* Constants for AICE command WRITE_CTRL:TCK_CONTROL */
|
||||||
#define AICE_TCK_CONTROL_TCK3048 0x08
|
#define AICE_TCK_CONTROL_TCK3048 0x08
|
||||||
|
#define AICE_TCK_CONTROL_TCK_SCAN 0x10
|
||||||
|
|
||||||
/* Constants for AICE command WRITE_CTRL:JTAG_PIN_CONTROL */
|
/* Constants for AICE command WRITE_CTRL:JTAG_PIN_CONTROL */
|
||||||
#define AICE_JTAG_PIN_CONTROL_SRST 0x01
|
#define AICE_JTAG_PIN_CONTROL_SRST 0x01
|
||||||
|
|
Loading…
Reference in New Issue