]> git.sur5r.net Git - openocd/commitdiff
ARM: ARMV4_5_COMMON_MAGIC --> ARM_COMMON_MAGIC
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 5 Dec 2009 03:46:44 +0000 (19:46 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 5 Dec 2009 03:46:44 +0000 (19:46 -0800)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
12 files changed:
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
src/target/xscale.c

index 3991c0fb8f9d835c2729b8d5cfa0cfba7bf593fc..12c4b2f97f3cb221504fea95f2aa12e63df381f9 100644 (file)
@@ -136,7 +136,7 @@ int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size)
                return retval;
 
        /* set up algorithm and parameters */
-       algo.common_magic = ARMV4_5_COMMON_MAGIC;
+       algo.common_magic = ARM_COMMON_MAGIC;
        algo.core_mode = ARM_MODE_SVC;
        algo.core_state = ARM_STATE_ARM;
 
@@ -212,7 +212,7 @@ int arm_nandread(struct arm_nand_data *nand, uint8_t *data, uint32_t size)
        target_buf = nand->copy_area->address + sizeof(code);
 
        /* set up algorithm and parameters */
-       algo.common_magic = ARMV4_5_COMMON_MAGIC;
+       algo.common_magic = ARM_COMMON_MAGIC;
        algo.core_mode = ARM_MODE_SVC;
        algo.core_state = ARM_STATE_ARM;
 
index 69c8274a0c0b3a6375a8cf994ff01111d0cc9871..de362cb80955ad8991090b5fef6cbdf95f9ee173 100644 (file)
@@ -241,7 +241,7 @@ static int aduc702x_write_block(struct flash_bank *bank, uint8_t *buffer, uint32
                }
        }
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       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 16ba9996c326ba3455bd5a7a2364ee2d968b4da3..cffc22a0f52790029de1ece1feed7d6a5d0996c4 100644 (file)
@@ -1085,7 +1085,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, uint8_t *buffer, uint3
 
        cfi_intel_clear_status_register(bank);
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       armv4_5_info.common_magic = ARM_COMMON_MAGIC;
        armv4_5_info.core_mode = ARM_MODE_SVC;
        armv4_5_info.core_state = ARM_STATE_ARM;
 
@@ -1408,7 +1408,7 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, ui
                0xeafffffe      /* b    8204 <sp_8_done>               */
        };
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       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 2524ae7f24c2eb4ee05386e538993541a979778d..b216903948a6d892792b83aea6ff97fb202693bf 100644 (file)
@@ -210,7 +210,7 @@ static int runCode(struct ecosflash_flash_bank *info,
 
        struct reg_param reg_params[3];
        struct armv4_5_algorithm armv4_5_info;
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       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 c14df1f879903a311df01203c50a70baaa43131e..6888b76838cc8c1d694960780068a5a6e8d75475 100644 (file)
@@ -292,7 +292,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta
                        break;
                case lpc2000_v1:
                case lpc2000_v2:
-                       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+                       armv4_5_info.common_magic = ARM_COMMON_MAGIC;
                        armv4_5_info.core_mode = ARM_MODE_SVC;
                        armv4_5_info.core_state = ARM_STATE_ARM;
                        iap_entry_point = 0x7ffffff1;
index aec8bcd6728b4391ddfff623cd6ee80090388d11..1ef759e2b05bc5f7659f2831719e93c800a3e93b 100644 (file)
@@ -1423,7 +1423,7 @@ static int lpc2900_write(struct flash_bank *bank, uint8_t *buffer,
                        buf_set_u32(reg_params[4].value, 0, 32, FPTR_EN_T | prog_time);
 
                        /* Execute algorithm, assume breakpoint for last instruction */
-                       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+                       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 5767b9300219f1a955850f2c866e1c0de82d50f1..45aa6574f0c76f2591137ddb1b5d75d54844d076 100644 (file)
@@ -371,7 +371,7 @@ static int str7x_write_block(struct flash_bank *bank, uint8_t *buffer, uint32_t
                }
        }
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       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 60367cb9d71d48ccedf26b23bc7d0458d34ea46d..95da3e242f3392877b34f413bad1bdd98f2f00c3 100644 (file)
@@ -408,7 +408,7 @@ static int str9x_write_block(struct flash_bank *bank,
                }
        }
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       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 408259e0f902df5ca1bd2d20f1a611f75d134dfb..68005c013855156c142a53ed562508b55c7b457c 100644 (file)
@@ -2696,7 +2696,7 @@ int arm7_9_bulk_write_memory(struct target *target, uint32_t address, uint32_t c
        struct armv4_5_algorithm armv4_5_info;
        struct reg_param reg_params[1];
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       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 4fc8c82609b18f3e579faffa9e5a3f95581a7237..6941c1619a8a60f31e6b6b971513b61948252f0f 100644 (file)
@@ -585,7 +585,7 @@ int armv4_5_arch_state(struct target *target)
 {
        struct arm *armv4_5 = target_to_arm(target);
 
-       if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC)
+       if (armv4_5->common_magic != ARM_COMMON_MAGIC)
        {
                LOG_ERROR("BUG: called for a non-ARM target");
                return ERROR_FAIL;
@@ -1047,7 +1047,7 @@ int armv4_5_run_algorithm_inner(struct target *target,
 
        LOG_DEBUG("Running algorithm");
 
-       if (armv4_5_algorithm_info->common_magic != ARMV4_5_COMMON_MAGIC)
+       if (armv4_5_algorithm_info->common_magic != ARM_COMMON_MAGIC)
        {
                LOG_ERROR("current target isn't an ARMV4/5 target");
                return ERROR_TARGET_INVALID;
@@ -1273,7 +1273,7 @@ int arm_checksum_memory(struct target *target,
                        return retval;
        }
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       armv4_5_info.common_magic = ARM_COMMON_MAGIC;
        armv4_5_info.core_mode = ARM_MODE_SVC;
        armv4_5_info.core_state = ARM_STATE_ARM;
 
@@ -1350,7 +1350,7 @@ int arm_blank_check_memory(struct target *target,
                        return retval;
        }
 
-       armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
+       armv4_5_info.common_magic = ARM_COMMON_MAGIC;
        armv4_5_info.core_mode = ARM_MODE_SVC;
        armv4_5_info.core_state = ARM_STATE_ARM;
 
@@ -1424,7 +1424,7 @@ int armv4_5_init_arch_info(struct target *target, struct arm *armv4_5)
        target->arch_info = armv4_5;
        armv4_5->target = target;
 
-       armv4_5->common_magic = ARMV4_5_COMMON_MAGIC;
+       armv4_5->common_magic = ARM_COMMON_MAGIC;
        arm_set_cpsr(armv4_5, ARM_MODE_USR);
 
        /* core_type may be overridden by subtype logic */
index 42fbeacc21dde529286f65f5841af2e93647b140..6a082a57dd36f73718723dba7ee247a65c088414 100644 (file)
@@ -67,7 +67,7 @@ extern const int armv4_5_core_reg_map[8][17];
 /* offset into armv4_5 core register cache -- OBSOLETE, DO NOT USE! */
 enum { ARMV4_5_CPSR = 31, };
 
-#define ARMV4_5_COMMON_MAGIC 0x0A450A45
+#define ARM_COMMON_MAGIC 0x0A450A45
 
 /**
  * Represents a generic ARM core, with standard application registers.
@@ -149,7 +149,7 @@ static inline struct arm *target_to_arm(struct target *target)
 
 static inline bool is_arm(struct arm *arm)
 {
-       return arm && arm->common_magic == ARMV4_5_COMMON_MAGIC;
+       return arm && arm->common_magic == ARM_COMMON_MAGIC;
 }
 
 struct armv4_5_algorithm
index 0fa3270034434912cd3e2bdc961c6125cc243186..352e1593edb901c95be1dd3dea34e3517d7eef4f 100644 (file)
@@ -857,7 +857,7 @@ static int xscale_arch_state(struct target *target)
                "", "\n(processor reset)", "\n(trace buffer full)"
        };
 
-       if (armv4_5->common_magic != ARMV4_5_COMMON_MAGIC)
+       if (armv4_5->common_magic != ARM_COMMON_MAGIC)
        {
                LOG_ERROR("BUG: called for a non-ARMv4/5 target");
                return ERROR_INVALID_ARGUMENTS;