- change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_...
[openocd.git] / src / target / mips32.c
index 48e2b3427cf2b0c6e6d95a76915807f927ef5c39..9eb7b0c9a23ffa22766842446851ee2024bf6b34 100644 (file)
 #endif
 
 #include "mips32.h"
-#include "jtag.h"
-#include "log.h"
 
-#include <stdlib.h>
-#include <string.h>
 
 char* mips32_core_reg_list[] =
 {
@@ -350,9 +346,9 @@ int mips32_examine(struct target_s *target)
 {
        mips32_common_t *mips32 = target->arch_info;
        
-       if (!target->type->examined)
+       if (target_was_examined(target))
        {
-               target->type->examined = 1;
+               target_set_examined(target);
        
                /* we will configure later */
                mips32->bp_scanned = 0;
@@ -424,3 +420,41 @@ int mips32_configure_break_unit(struct target_s *target)
        
        return ERROR_OK;
 }
+
+int mips32_enable_interrupts(struct target_s *target, int enable)
+{
+       int retval;
+       int update = 0;
+       u32 dcr;
+       
+       /* read debug control register */
+       if ((retval = target_read_u32(target, EJTAG_DCR, &dcr)) != ERROR_OK)
+               return retval;
+       
+       if (enable)
+       {
+               if (!(dcr & (1<<4)))
+               {
+                       /* enable interrupts */
+                       dcr |= (1<<4);
+                       update = 1;
+               }
+       }
+       else
+       {
+               if (dcr & (1<<4))
+               {
+                       /* disable interrupts */
+                       dcr &= ~(1<<4);
+                       update = 1;
+               }
+       }
+       
+       if (update)
+       {
+               if ((retval = target_write_u32(target, EJTAG_DCR, dcr)) != ERROR_OK)
+                       return retval;
+       }
+       
+       return ERROR_OK;
+}

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)