]> git.sur5r.net Git - openocd/commitdiff
mips_ejtag.c: do not set v2.6 ECR bits on v2.0 devices
authorOleksij Rempel <linux@rempel-privat.de>
Thu, 23 Jan 2014 08:47:37 +0000 (09:47 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 19 Aug 2014 20:17:43 +0000 (20:17 +0000)
Change-Id: I894abbb923282d5f84daf8e0bca69190c07567de
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/1930
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/mips_ejtag.c

index 375cf51763a6e6f17bbe260ddef755f9f03b4ce8..f6cd4510e4e2371c8621073ad5b63654083bf1e1 100644 (file)
@@ -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);