openocd: src: fix incorrect SPDX tags
[openocd.git] / src / flash / nor / numicro.c
index d9ea16d279a5337ab6636ab919a15a2331d53a53..34875084c032d3c38bd74dfc1c10db6ff8d98c21 100644 (file)
@@ -151,7 +151,7 @@ struct numicro_cpu_type {
        {NUMICRO_CONFIG_BASE, 1024} }
 
 
-static const struct numicro_cpu_type NuMicroParts[] = {
+static const struct numicro_cpu_type numicro_parts[] = {
        /*PART NO*/     /*PART ID*/ /*Banks*/
        /* NUC100 Version B */
        {"NUC100LD2BN", 0x10010004, NUMICRO_BANKS_NUC100(64*1024)},
@@ -1385,13 +1385,6 @@ static int numicro_writeblock(struct flash_bank *bank, const uint8_t *buffer,
        init_reg_param(&reg_params[1], "r1", 32, PARAM_OUT);    /* faddr */
        init_reg_param(&reg_params[2], "r2", 32, PARAM_OUT);    /* number of words to program */
 
-       struct armv7m_common *armv7m = target_to_armv7m(target);
-       if (armv7m == NULL) {
-               /* something is very wrong if armv7m is NULL */
-               LOG_ERROR("unable to get armv7m target");
-               return retval;
-       }
-
        /* write code buffer and use Flash programming code within NuMicro     */
        /* Set breakpoint to 0 with time-out of 1000 ms                        */
        while (count > 0) {
@@ -1532,8 +1525,6 @@ static int numicro_erase(struct flash_bank *bank, unsigned int first,
                        retval = target_write_u32(target, NUMICRO_FLASH_ISPCON, (status | ISPCON_ISPFF));
                        if (retval != ERROR_OK)
                                return retval;
-               } else {
-                       bank->sectors[i].is_erased = 1;
                }
        }
 
@@ -1648,9 +1639,9 @@ static int numicro_get_cpu_type(struct target *target, const struct numicro_cpu_
 
        LOG_INFO("Device ID: 0x%08" PRIx32 "", part_id);
        /* search part numbers */
-       for (size_t i = 0; i < ARRAY_SIZE(NuMicroParts); i++) {
-               if (part_id == NuMicroParts[i].partid) {
-                       *cpu = &NuMicroParts[i];
+       for (size_t i = 0; i < ARRAY_SIZE(numicro_parts); i++) {
+               if (part_id == numicro_parts[i].partid) {
+                       *cpu = &numicro_parts[i];
                        LOG_INFO("Device Name: %s", (*cpu)->partname);
                        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)