diff options
Diffstat (limited to 'src/target')
-rw-r--r-- | src/target/arm7_9_common.c | 2 | ||||
-rw-r--r-- | src/target/armv4_5.c | 10 | ||||
-rw-r--r-- | src/target/armv4_5.h | 4 | ||||
-rw-r--r-- | src/target/xscale.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c index 408259e0..68005c01 100644 --- a/src/target/arm7_9_common.c +++ b/src/target/arm7_9_common.c @@ -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; diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index 4fc8c826..6941c161 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -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 */ diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h index 42fbeacc..6a082a57 100644 --- a/src/target/armv4_5.h +++ b/src/target/armv4_5.h @@ -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 diff --git a/src/target/xscale.c b/src/target/xscale.c index 0fa32700..352e1593 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -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; |