jtag/drivers/stlink: demote the output of available speeds to DEBUG
[openocd.git] / src / target / mips32.c
index 795efddf033ac158edf4b5d59d119d6b75520793..75197f170f85f5368e2bce18a1eda6d67522dac7 100644 (file)
@@ -289,7 +289,7 @@ int mips32_init_arch_info(struct target *target, struct mips32_common *mips32, s
        mips32->common_magic = MIPS32_COMMON_MAGIC;
        mips32->fast_data_area = NULL;
 
-       /* has breakpoint/watchpint unit been scanned */
+       /* has breakpoint/watchpoint unit been scanned */
        mips32->bp_scanned = 0;
        mips32->data_break_list = NULL;
 
@@ -536,31 +536,36 @@ int mips32_configure_break_unit(struct target *target)
        if (retval != ERROR_OK)
                return retval;
 
-       /* EJTAG 2.0 defines IB and DB bits in IMP instead of DCR.
-        * Since these DCR bits should be reserved on EJTAG 2.0, we can
-        * just remap them. */
+       /* EJTAG 2.0 defines IB and DB bits in IMP instead of DCR. */
        if (ejtag_info->ejtag_version == EJTAG_VERSION_20) {
+               ejtag_info->debug_caps = dcr & EJTAG_DCR_ENM;
                if (!(ejtag_info->impcode & EJTAG_V20_IMP_NOIB))
-                       dcr |= EJTAG_DCR_IB;
+                       ejtag_info->debug_caps |= EJTAG_DCR_IB;
                if (!(ejtag_info->impcode & EJTAG_V20_IMP_NODB))
-                       dcr |= EJTAG_DCR_DB;
-       }
+                       ejtag_info->debug_caps |= EJTAG_DCR_DB;
+       } else
+               /* keep  debug caps for later use */
+               ejtag_info->debug_caps = dcr & (EJTAG_DCR_ENM
+                               | EJTAG_DCR_IB | EJTAG_DCR_DB);
+
 
-       if (dcr & EJTAG_DCR_IB) {
+       if (ejtag_info->debug_caps & EJTAG_DCR_IB) {
                retval = mips32_configure_ibs(target);
                if (retval != ERROR_OK)
                        return retval;
        }
 
-       if (dcr & EJTAG_DCR_DB) {
+       if (ejtag_info->debug_caps & EJTAG_DCR_DB) {
                retval = mips32_configure_dbs(target);
                if (retval != ERROR_OK)
                        return retval;
        }
 
        /* check if target endianness settings matches debug control register */
-       if (((dcr & EJTAG_DCR_ENM) && (target->endianness == TARGET_LITTLE_ENDIAN)) ||
-                       (!(dcr & EJTAG_DCR_ENM) && (target->endianness == TARGET_BIG_ENDIAN)))
+       if (((ejtag_info->debug_caps & EJTAG_DCR_ENM)
+                       && (target->endianness == TARGET_LITTLE_ENDIAN)) ||
+                       (!(ejtag_info->debug_caps & EJTAG_DCR_ENM)
+                        && (target->endianness == TARGET_BIG_ENDIAN)))
                LOG_WARNING("DCR endianness settings does not match target settings");
 
        LOG_DEBUG("DCR 0x%" PRIx32 " numinst %i numdata %i", dcr, mips32->num_inst_bpoints,

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)