ARM: rename armv4_5_algorithm as arm_algorithm
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 5 Dec 2009 04:19:49 +0000 (20:19 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 5 Dec 2009 04:19:49 +0000 (20:19 -0800)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
src/flash/arm_nandio.c
src/flash/nor/aduc702x.c
src/flash/nor/cfi.c
src/flash/nor/ecos.c
src/flash/nor/lpc2000.c
src/flash/nor/lpc2900.c
src/flash/nor/str7x.c
src/flash/nor/str9x.c
src/target/arm7_9_common.c
src/target/armv4_5.c
src/target/armv4_5.h

index 12c4b2f97f3cb221504fea95f2aa12e63df381f9..67619d545a3e41376bc500b34f2ada299e11e1ea 100644 (file)
@@ -93,7 +93,7 @@ int arm_code_to_working_area(struct target *target,
 int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
 {
        struct target           *target = nand->target;
-       struct armv4_5_algorithm        algo;
+       struct arm_algorithm    algo;
        struct arm              *armv4_5 = target->arch_info;
        struct reg_param        reg_params[3];
        uint32_t                target_buf;
@@ -177,7 +177,7 @@ int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
 int arm_nandread(struct arm_nand_data *nand, uint8_t *data, uint32_t size)
 {
        struct target *target = nand->target;
-       struct armv4_5_algorithm algo;
+       struct arm_algorithm algo;
        struct arm *armv4_5 = target->arch_info;
        struct reg_param reg_params[3];
        uint32_t target_buf;
index de362cb80955ad8991090b5fef6cbdf95f9ee173..57018bb1dfef53e69df639500f5827d72a81baab 100644 (file)
@@ -165,7 +165,7 @@ static int aduc702x_write_block(struct flash_bank *bank, uint8_t *buffer, uint32
        struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[6];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        int retval = ERROR_OK;
 
        if (((count%2)!=0)||((offset%2)!=0))
index cffc22a0f52790029de1ece1feed7d6a5d0996c4..1ab93418818219059d3cc5f579b186eb0c79318b 100644 (file)
@@ -1012,7 +1012,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, uint8_t *buffer, uint3
        struct cfi_flash_bank *cfi_info = bank->driver_priv;
        struct target *target = bank->target;
        struct reg_param reg_params[7];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        struct working_area *source;
        uint32_t buffer_size = 32768;
        uint32_t write_command_val, busy_pattern_val, error_pattern_val;
@@ -1257,7 +1257,7 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, ui
        struct cfi_spansion_pri_ext *pri_ext = cfi_info->pri_ext;
        struct target *target = bank->target;
        struct reg_param reg_params[10];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        struct working_area *source;
        uint32_t buffer_size = 32768;
        uint32_t status;
index b216903948a6d892792b83aea6ff97fb202693bf..b51e0a0338c3ff28132cfb35fc13abe9e2846dc8 100644 (file)
@@ -209,7 +209,7 @@ static int runCode(struct ecosflash_flash_bank *info,
        struct target *target = info->target;
 
        struct reg_param reg_params[3];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        armv4_5_info.common_magic = ARM_COMMON_MAGIC;
        armv4_5_info.core_mode = ARM_MODE_SVC;
        armv4_5_info.core_state = ARM_STATE_ARM;
index 6888b76838cc8c1d694960780068a5a6e8d75475..0caf3e09b80663ba215e57a5c5ed3a10fe7d9464 100644 (file)
@@ -242,7 +242,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta
        struct target *target = bank->target;
        struct mem_param mem_params[2];
        struct reg_param reg_params[5];
-       struct armv4_5_algorithm armv4_5_info; /* for LPC2000 */
+       struct arm_algorithm armv4_5_info; /* for LPC2000 */
        struct armv7m_algorithm armv7m_info;   /* for LPC1700 */
        uint32_t status_code;
        uint32_t iap_entry_point = 0; /* to make compiler happier */
index 1ef759e2b05bc5f7659f2831719e93c800a3e93b..ce74bbbac4eef15c010eb12ea27221eb65985394 100644 (file)
@@ -1302,7 +1302,7 @@ static int lpc2900_write(struct flash_bank *bank, uint8_t *buffer,
        if( warea )
        {
                struct reg_param reg_params[5];
-               struct armv4_5_algorithm armv4_5_info;
+               struct arm_algorithm armv4_5_info;
 
                /* We can use target mode. Download the algorithm. */
                retval = target_write_buffer( target,
index 45aa6574f0c76f2591137ddb1b5d75d54844d076..ef693e95844a2dcf21157bb4c8a0854654a23867 100644 (file)
@@ -318,7 +318,7 @@ static int str7x_write_block(struct flash_bank *bank, uint8_t *buffer, uint32_t
        struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[6];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        int retval = ERROR_OK;
 
        uint32_t str7x_flash_write_code[] = {
index 95da3e242f3392877b34f413bad1bdd98f2f00c3..9cddb5063f301af8f9a92e4915d8d149d668d0cc 100644 (file)
@@ -356,7 +356,7 @@ static int str9x_write_block(struct flash_bank *bank,
        struct working_area *source;
        uint32_t address = bank->base + offset;
        struct reg_param reg_params[4];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        int retval = ERROR_OK;
 
        uint32_t str9x_flash_write_code[] = {
index 68005c013855156c142a53ed562508b55c7b457c..25f8cb3206e8616c76f539bfffb6ba86026aa789 100644 (file)
@@ -2693,7 +2693,7 @@ int arm7_9_bulk_write_memory(struct target *target, uint32_t address, uint32_t c
                }
        }
 
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        struct reg_param reg_params[1];
 
        armv4_5_info.common_magic = ARM_COMMON_MAGIC;
index 6941c1619a8a60f31e6b6b971513b61948252f0f..e07f60670112c21edc2c5fa02bb306e879c64d00 100644 (file)
@@ -1037,7 +1037,7 @@ int armv4_5_run_algorithm_inner(struct target *target,
                                int timeout_ms, void *arch_info))
 {
        struct arm *armv4_5 = target_to_arm(target);
-       struct armv4_5_algorithm *armv4_5_algorithm_info = arch_info;
+       struct arm_algorithm *arm_algorithm_info = arch_info;
        enum arm_state core_state = armv4_5->core_state;
        uint32_t context[17];
        uint32_t cpsr;
@@ -1047,7 +1047,7 @@ int armv4_5_run_algorithm_inner(struct target *target,
 
        LOG_DEBUG("Running algorithm");
 
-       if (armv4_5_algorithm_info->common_magic != ARM_COMMON_MAGIC)
+       if (arm_algorithm_info->common_magic != ARM_COMMON_MAGIC)
        {
                LOG_ERROR("current target isn't an ARMV4/5 target");
                return ERROR_TARGET_INVALID;
@@ -1077,10 +1077,10 @@ int armv4_5_run_algorithm_inner(struct target *target,
                struct reg *r;
 
                r = &ARMV4_5_CORE_REG_MODE(armv4_5->core_cache,
-                               armv4_5_algorithm_info->core_mode, i);
+                               arm_algorithm_info->core_mode, i);
                if (!r->valid)
                        armv4_5->read_core_reg(target, r, i,
-                                       armv4_5_algorithm_info->core_mode);
+                                       arm_algorithm_info->core_mode);
                context[i] = buf_get_u32(r->value, 0, 32);
        }
        cpsr = buf_get_u32(armv4_5->cpsr->value, 0, 32);
@@ -1114,7 +1114,7 @@ int armv4_5_run_algorithm_inner(struct target *target,
                }
        }
 
-       armv4_5->core_state = armv4_5_algorithm_info->core_state;
+       armv4_5->core_state = arm_algorithm_info->core_state;
        if (armv4_5->core_state == ARM_STATE_ARM)
                exit_breakpoint_size = 4;
        else if (armv4_5->core_state == ARM_STATE_THUMB)
@@ -1125,12 +1125,12 @@ int armv4_5_run_algorithm_inner(struct target *target,
                return ERROR_INVALID_ARGUMENTS;
        }
 
-       if (armv4_5_algorithm_info->core_mode != ARM_MODE_ANY)
+       if (arm_algorithm_info->core_mode != ARM_MODE_ANY)
        {
                LOG_DEBUG("setting core_mode: 0x%2.2x",
-                               armv4_5_algorithm_info->core_mode);
+                               arm_algorithm_info->core_mode);
                buf_set_u32(armv4_5->cpsr->value, 0, 5,
-                               armv4_5_algorithm_info->core_mode);
+                               arm_algorithm_info->core_mode);
                armv4_5->cpsr->dirty = 1;
                armv4_5->cpsr->valid = 1;
        }
@@ -1193,13 +1193,13 @@ int armv4_5_run_algorithm_inner(struct target *target,
        for (i = 0; i <= 16; i++)
        {
                uint32_t regvalue;
-               regvalue = buf_get_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).value, 0, 32);
+               regvalue = buf_get_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, arm_algorithm_info->core_mode, i).value, 0, 32);
                if (regvalue != context[i])
                {
-                       LOG_DEBUG("restoring register %s with value 0x%8.8" PRIx32 "", ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).name, context[i]);
-                       buf_set_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).value, 0, 32, context[i]);
-                       ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).valid = 1;
-                       ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).dirty = 1;
+                       LOG_DEBUG("restoring register %s with value 0x%8.8" PRIx32 "", ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, arm_algorithm_info->core_mode, i).name, context[i]);
+                       buf_set_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, arm_algorithm_info->core_mode, i).value, 0, 32, context[i]);
+                       ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, arm_algorithm_info->core_mode, i).valid = 1;
+                       ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, arm_algorithm_info->core_mode, i).dirty = 1;
                }
        }
 
@@ -1225,7 +1225,7 @@ int arm_checksum_memory(struct target *target,
                uint32_t address, uint32_t count, uint32_t *checksum)
 {
        struct working_area *crc_algorithm;
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        struct reg_param reg_params[2];
        int retval;
        uint32_t i;
@@ -1320,7 +1320,7 @@ int arm_blank_check_memory(struct target *target,
 {
        struct working_area *check_algorithm;
        struct reg_param reg_params[3];
-       struct armv4_5_algorithm armv4_5_info;
+       struct arm_algorithm armv4_5_info;
        int retval;
        uint32_t i;
 
index b56a1f16eb2d57ef310ee55d8f03a365b8af3fde..0b28301332673c147f707dcd816400357a74c2eb 100644 (file)
@@ -160,7 +160,7 @@ static inline bool is_arm(struct arm *arm)
        return arm && arm->common_magic == ARM_COMMON_MAGIC;
 }
 
-struct armv4_5_algorithm
+struct arm_algorithm
 {
        int common_magic;
 

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)