From 91bfd9dbf2edef5373278ecf0d520dd0430de8d1 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Thu, 23 Jan 2014 09:47:37 +0100 Subject: [PATCH] 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 --- src/target/mips_ejtag.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.39.5