From 2861877b32a7a2f4022a1c3d9b66c9b4879878ac Mon Sep 17 00:00:00 2001 From: Zachary T Welch Date: Sun, 15 Nov 2009 05:57:37 -0800 Subject: command_handler: change 'cmd_ctx' to CMD_CTX Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX. --- src/target/arm926ejs.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/target/arm926ejs.c') diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index 66780540..cc6318b9 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -715,7 +715,7 @@ static int arm926ejs_target_create(struct target *target, Jim_Interp *interp) COMMAND_HANDLER(arm926ejs_handle_cp15_command) { int retval; - struct target *target = get_current_target(cmd_ctx); + struct target *target = get_current_target(CMD_CTX); struct arm926ejs_common *arm926ejs = target_to_arm926(target); int opcode_1; int opcode_2; @@ -724,7 +724,7 @@ COMMAND_HANDLER(arm926ejs_handle_cp15_command) if ((CMD_ARGC < 4) || (CMD_ARGC > 5)) { - command_print(cmd_ctx, "usage: arm926ejs cp15 [value]"); + command_print(CMD_CTX, "usage: arm926ejs cp15 [value]"); return ERROR_OK; } @@ -733,13 +733,13 @@ COMMAND_HANDLER(arm926ejs_handle_cp15_command) COMMAND_PARSE_NUMBER(int, CMD_ARGV[2], CRn); COMMAND_PARSE_NUMBER(int, CMD_ARGV[3], CRm); - retval = arm926ejs_verify_pointer(cmd_ctx, arm926ejs); + retval = arm926ejs_verify_pointer(CMD_CTX, arm926ejs); if (retval != ERROR_OK) return retval; if (target->state != TARGET_HALTED) { - command_print(cmd_ctx, "target must be stopped for \"%s\" command", CMD_NAME); + command_print(CMD_CTX, "target must be stopped for \"%s\" command", CMD_NAME); return ERROR_OK; } @@ -748,7 +748,7 @@ COMMAND_HANDLER(arm926ejs_handle_cp15_command) uint32_t value; if ((retval = arm926ejs->read_cp15(target, opcode_1, opcode_2, CRn, CRm, &value)) != ERROR_OK) { - command_print(cmd_ctx, "couldn't access register"); + command_print(CMD_CTX, "couldn't access register"); return ERROR_OK; } if ((retval = jtag_execute_queue()) != ERROR_OK) @@ -756,7 +756,7 @@ COMMAND_HANDLER(arm926ejs_handle_cp15_command) return retval; } - command_print(cmd_ctx, "%i %i %i %i: %8.8" PRIx32 "", opcode_1, opcode_2, CRn, CRm, value); + command_print(CMD_CTX, "%i %i %i %i: %8.8" PRIx32 "", opcode_1, opcode_2, CRn, CRm, value); } else { @@ -764,10 +764,10 @@ COMMAND_HANDLER(arm926ejs_handle_cp15_command) COMMAND_PARSE_NUMBER(u32, CMD_ARGV[4], value); if ((retval = arm926ejs->write_cp15(target, opcode_1, opcode_2, CRn, CRm, value)) != ERROR_OK) { - command_print(cmd_ctx, "couldn't access register"); + command_print(CMD_CTX, "couldn't access register"); return ERROR_OK; } - command_print(cmd_ctx, "%i %i %i %i: %8.8" PRIx32 "", opcode_1, opcode_2, CRn, CRm, value); + command_print(CMD_CTX, "%i %i %i %i: %8.8" PRIx32 "", opcode_1, opcode_2, CRn, CRm, value); } return ERROR_OK; @@ -776,14 +776,14 @@ COMMAND_HANDLER(arm926ejs_handle_cp15_command) COMMAND_HANDLER(arm926ejs_handle_cache_info_command) { int retval; - struct target *target = get_current_target(cmd_ctx); + struct target *target = get_current_target(CMD_CTX); struct arm926ejs_common *arm926ejs = target_to_arm926(target); - retval = arm926ejs_verify_pointer(cmd_ctx, arm926ejs); + retval = arm926ejs_verify_pointer(CMD_CTX, arm926ejs); if (retval != ERROR_OK) return retval; - return armv4_5_handle_cache_info_command(cmd_ctx, &arm926ejs->armv4_5_mmu.armv4_5_cache); + return armv4_5_handle_cache_info_command(CMD_CTX, &arm926ejs->armv4_5_mmu.armv4_5_cache); } static int arm926ejs_virt2phys(struct target *target, uint32_t virtual, uint32_t *physical) -- cgit v1.2.3