str9x.c: remove optimization when erasing the whole bank
[openocd.git] / src / flash / nor / at91sam3.c
index b27ea941c1391ad478ca5d78a87386a0bc810113..5dacf6fda79c8040a6da2885135cdedb4844abcf 100644 (file)
 #endif
 
 
-#include <stdio.h>
-#include <string.h>
-#include <stddef.h>
-#include "types.h"
-#include "flash.h"
-#include <helper/membuf.h>
+#include "imp.h"
 #include "at91sam3.h"
+#include <helper/membuf.h>
 #include <helper/time_support.h>
 
 #define REG_NAME_WIDTH  (12)
@@ -2292,7 +2288,7 @@ COMMAND_HANDLER(sam3_handle_info_command)
                        return ERROR_FAIL;
                }
        }
-       // above garentees the "chip details" structure is valid
+       // above guarantees the "chip details" structure is valid
        // and thus, bank private areas are valid
        // and we have a SAM3 chip, what a concept!
 
@@ -2390,7 +2386,7 @@ COMMAND_HANDLER(sam3_handle_gpnvm_command)
 
        if (0 == strcmp("show", CMD_ARGV[0])) {
                if (who == -1) {
-               showall:
+showall:
                        r = ERROR_OK;
                        for (x = 0 ; x < pChip->details.n_gpnvms ; x++) {
                                r = FLASHD_GetGPNVM(&(pChip->details.bank[0]), x, &v);
@@ -2470,24 +2466,27 @@ COMMAND_HANDLER(sam3_handle_slowclk_command)
 static const struct command_registration at91sam3_exec_command_handlers[] = {
        {
                .name = "gpnvm",
-               .handler = &sam3_handle_gpnvm_command,
+               .handler = sam3_handle_gpnvm_command,
                .mode = COMMAND_EXEC,
-               .usage = "[(set|clear) [<bit_id>]]",
-               .help = "Without arguments, shows the gpnvm register; "
-                       "otherwise, sets or clear the specified bit.",
+               .usage = "[('clr'|'set'|'show') bitnum]",
+               .help = "Without arguments, shows all bits in the gpnvm "
+                       "register.  Otherwise, clears, sets, or shows one "
+                       "General Purpose Non-Volatile Memory (gpnvm) bit.",
        },
        {
                .name = "info",
-               .handler = &sam3_handle_info_command,
+               .handler = sam3_handle_info_command,
                .mode = COMMAND_EXEC,
-               .help = "print information about the current sam3 chip",
+               .help = "Print information about the current at91sam3 chip"
+                       "and its flash configuration.",
        },
        {
                .name = "slowclk",
-               .handler = &sam3_handle_slowclk_command,
+               .handler = sam3_handle_slowclk_command,
                .mode = COMMAND_EXEC,
-               .usage = "<value>",
-               .help = "set the slowclock frequency (default 32768hz)",
+               .usage = "[clock_hz]",
+               .help = "Display or set the slowclock frequency "
+                       "(default 32768 Hz).",
        },
        COMMAND_REGISTRATION_DONE
 };

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)