Some parts of code are version specific. It will be easier
if we extract ejtag version and store it some where.
Change-Id: I8f9addc42108cba5ae9d61b8ade8f9d7f02a0fb5
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-on: http://openocd.zylin.com/1462
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
int mips_ejtag_init(struct mips_ejtag *ejtag_info)
{
int mips_ejtag_init(struct mips_ejtag *ejtag_info)
{
- uint32_t ejtag_version;
int retval;
retval = mips_ejtag_get_impcode(ejtag_info, &ejtag_info->impcode);
int retval;
retval = mips_ejtag_get_impcode(ejtag_info, &ejtag_info->impcode);
LOG_DEBUG("impcode: 0x%8.8" PRIx32 "", ejtag_info->impcode);
/* get ejtag version */
LOG_DEBUG("impcode: 0x%8.8" PRIx32 "", ejtag_info->impcode);
/* get ejtag version */
- ejtag_version = ((ejtag_info->impcode >> 29) & 0x07);
+ ejtag_info->ejtag_version = ((ejtag_info->impcode >> 29) & 0x07);
- switch (ejtag_version) {
- case 0:
+ switch (ejtag_info->ejtag_version) {
+ case EJTAG_VERSION_20:
LOG_DEBUG("EJTAG: Version 1 or 2.0 Detected");
break;
LOG_DEBUG("EJTAG: Version 1 or 2.0 Detected");
break;
LOG_DEBUG("EJTAG: Version 2.5 Detected");
break;
LOG_DEBUG("EJTAG: Version 2.5 Detected");
break;
LOG_DEBUG("EJTAG: Version 2.6 Detected");
break;
LOG_DEBUG("EJTAG: Version 2.6 Detected");
break;
LOG_DEBUG("EJTAG: Version 3.1 Detected");
break;
LOG_DEBUG("EJTAG: Version 3.1 Detected");
break;
LOG_DEBUG("EJTAG: Version 4.1 Detected");
break;
LOG_DEBUG("EJTAG: Version 4.1 Detected");
break;
LOG_DEBUG("EJTAG: Version 5.1 Detected");
break;
default:
LOG_DEBUG("EJTAG: Version 5.1 Detected");
break;
default:
#define EJTAG_DBCn_BLM_SHIFT 4
#define EJTAG_DBCn_BE (1 << 0)
#define EJTAG_DBCn_BLM_SHIFT 4
#define EJTAG_DBCn_BE (1 << 0)
+#define EJTAG_VERSION_20 0
+#define EJTAG_VERSION_25 1
+#define EJTAG_VERSION_26 2
+#define EJTAG_VERSION_31 3
+#define EJTAG_VERSION_41 4
+#define EJTAG_VERSION_51 5
+
struct mips_ejtag {
struct jtag_tap *tap;
uint32_t impcode;
struct mips_ejtag {
struct jtag_tap *tap;
uint32_t impcode;
uint32_t reg9;
unsigned scan_delay;
int mode;
uint32_t reg9;
unsigned scan_delay;
int mode;
+ unsigned int ejtag_version;
};
void mips_ejtag_set_instr(struct mips_ejtag *ejtag_info,
};
void mips_ejtag_set_instr(struct mips_ejtag *ejtag_info,
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)