target: constify structures
[openocd.git] / src / target / xscale.c
index 04189a1484bab6fda631d30b78185ecc8b0208e8..8d97a89fbed059e8391820f358d464ed254b5618 100644 (file)
@@ -78,7 +78,7 @@ static const uint8_t xscale_debug_handler[] = {
 #include "xscale_debug.inc"
 };
 
-static char *const xscale_reg_list[] = {
+static const char *const xscale_reg_list[] = {
        "XSCALE_MAINID",                /* 0 */
        "XSCALE_CACHETYPE",
        "XSCALE_CTRL",
@@ -2905,7 +2905,7 @@ static int xscale_init_target(struct command_context *cmd_ctx,
 }
 
 static int xscale_init_arch_info(struct target *target,
-       struct xscale_common *xscale, struct jtag_tap *tap, const char *variant)
+       struct xscale_common *xscale, struct jtag_tap *tap)
 {
        struct arm *arm;
        uint32_t high_reset_branch, low_reset_branch;
@@ -2916,33 +2916,7 @@ static int xscale_init_arch_info(struct target *target,
        /* store architecture specfic data */
        xscale->common_magic = XSCALE_COMMON_MAGIC;
 
-       /* we don't really *need* a variant param ... */
-       if (variant) {
-               int ir_length = 0;
-
-               if (strcmp(variant, "pxa250") == 0
-                       || strcmp(variant, "pxa255") == 0
-                       || strcmp(variant, "pxa26x") == 0)
-                       ir_length = 5;
-               else if (strcmp(variant, "pxa27x") == 0
-                       || strcmp(variant, "ixp42x") == 0
-                       || strcmp(variant, "ixp45x") == 0
-                       || strcmp(variant, "ixp46x") == 0)
-                       ir_length = 7;
-               else if (strcmp(variant, "pxa3xx") == 0)
-                       ir_length = 11;
-               else
-                       LOG_WARNING("%s: unrecognized variant %s",
-                               tap->dotted_name, variant);
-
-               if (ir_length && ir_length != tap->ir_length) {
-                       LOG_WARNING("%s: IR length for %s is %d; fixing",
-                               tap->dotted_name, variant, ir_length);
-                       tap->ir_length = ir_length;
-               }
-       }
-
-       /* PXA3xx shifts the JTAG instructions */
+       /* PXA3xx with 11 bit IR shifts the JTAG instructions */
        if (tap->ir_length == 11)
                xscale->xscale_variant = XSCALE_PXA3XX;
        else
@@ -3033,8 +3007,7 @@ static int xscale_target_create(struct target *target, Jim_Interp *interp)
        if (!xscale)
                return ERROR_FAIL;
 
-       return xscale_init_arch_info(target, xscale, target->tap,
-                       target->variant);
+       return xscale_init_arch_info(target, xscale, target->tap);
 }
 
 COMMAND_HANDLER(xscale_handle_debug_handler_command)

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)