From: Oleksij Rempel Date: Thu, 23 Jan 2014 08:47:37 +0000 (+0100) Subject: mips_ejtag.c: do not set v2.6 ECR bits on v2.0 devices X-Git-Tag: v0.9.0-rc1~311 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=91bfd9dbf2edef5373278ecf0d520dd0430de8d1;p=openocd mips_ejtag.c: do not set v2.6 ECR bits on v2.0 devices Change-Id: I894abbb923282d5f84daf8e0bca69190c07567de Signed-off-by: Oleksij Rempel Reviewed-on: http://openocd.zylin.com/1930 Tested-by: jenkins Reviewed-by: Spencer Oliver --- diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c index 375cf517..f6cd4510 100644 --- a/src/target/mips_ejtag.c +++ b/src/target/mips_ejtag.c @@ -432,8 +432,11 @@ int mips_ejtag_init(struct mips_ejtag *ejtag_info) ejtag_info->impcode |= EJTAG_IMP_NODMA; } - /* set initial state for ejtag control reg */ - ejtag_info->ejtag_ctrl = EJTAG_CTRL_ROCC | EJTAG_CTRL_PRACC | EJTAG_CTRL_PROBEN | EJTAG_CTRL_SETDEV; + ejtag_info->ejtag_ctrl = EJTAG_CTRL_PRACC | EJTAG_CTRL_PROBEN; + + if (ejtag_info->ejtag_version != EJTAG_VERSION_20) + ejtag_info->ejtag_ctrl |= EJTAG_CTRL_ROCC | EJTAG_CTRL_SETDEV; + ejtag_info->fast_access_save = -1; mips_ejtag_init_mmr(ejtag_info);