X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Farm920t.c;h=29f7917dcd8a9a753bbb2180778d69d11ae39716;hb=8f446fcf676e9cd13cf53d9946f0cae5d29a10ec;hp=99b4bbd378b856cc65bcf153251dae292035c4ea;hpb=2861877b32a7a2f4022a1c3d9b66c9b4879878ac;p=openocd.git diff --git a/src/target/arm920t.c b/src/target/arm920t.c index 99b4bbd378..29f7917dcd 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -244,7 +244,7 @@ static int arm920t_read_cp15_interpreted(struct target *target, LOG_DEBUG("cp15_opcode: %8.8x, address: %8.8x, value: %8.8x", cp15_opcode, address, *value); #endif - if (armv4_5_mode_to_number(armv4_5->core_mode)==-1) + if (!is_arm_mode(armv4_5->core_mode)) return ERROR_FAIL; ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5->core_mode, 0).dirty = 1; @@ -284,7 +284,7 @@ int arm920t_write_cp15_interpreted(struct target *target, LOG_DEBUG("cp15_opcode: %8.8x, value: %8.8x, address: %8.8x", cp15_opcode, value, address); #endif - if (armv4_5_mode_to_number(armv4_5->core_mode)==-1) + if (!is_arm_mode(armv4_5->core_mode)) return ERROR_FAIL; ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5->core_mode, 0).dirty = 1; @@ -451,7 +451,7 @@ int arm920t_arch_state(struct target *target) "MMU: %s, D-Cache: %s, I-Cache: %s", armv4_5_state_strings[armv4_5->core_state], Jim_Nvp_value2name_simple(nvp_target_debug_reason, target->debug_reason)->name, - armv4_5_mode_strings[armv4_5_mode_to_number(armv4_5->core_mode)], + arm_mode_name(armv4_5->core_mode), buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32), buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32), state[arm920t->armv4_5_mmu.mmu_enabled], @@ -889,7 +889,7 @@ COMMAND_HANDLER(arm920t_handle_read_cache_command) fclose(output); - if (armv4_5_mode_to_number(armv4_5->core_mode)==-1) + if (!is_arm_mode(armv4_5->core_mode)) return ERROR_FAIL; /* mark registers dirty. */ @@ -1172,7 +1172,7 @@ COMMAND_HANDLER(arm920t_handle_read_mmu_command) fclose(output); - if (armv4_5_mode_to_number(armv4_5->core_mode)==-1) + if (!is_arm_mode(armv4_5->core_mode)) return ERROR_FAIL; /* mark registers dirty */