]> git.sur5r.net Git - openocd/commitdiff
mips: code cleanup in cp0 command handlers
authorSalvador Arroyo <sarroyofdez@yahoo.es>
Sat, 2 Mar 2013 15:20:42 +0000 (16:20 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 2 Apr 2013 15:14:50 +0000 (15:14 +0000)
After calling mips32_cp0_read() nothing has been queued, the call to jtag_exec_queue() is unnecessary.

Change-Id: Ie25438045a8e9b6b1b170df7b52609d45f284b5a
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/1190
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/mips32.c
src/target/mips_m4k.c

index ab39e6e7f3da8b914ee423f7a8c00205139daf66..1aaa6d6d826050f7da0e7d1fb59e5384fa060c70 100644 (file)
@@ -758,12 +758,9 @@ COMMAND_HANDLER(mips32_handle_cp0_command)
                                                cp0_reg);
                                return ERROR_OK;
                        }
-                       retval = jtag_execute_queue();
-                       if (retval != ERROR_OK)
-                               return retval;
-
                        command_print(CMD_CTX, "cp0 reg %" PRIi32 ", select %" PRIi32 ": %8.8" PRIx32,
                                        cp0_reg, cp0_sel, value);
+
                } else if (CMD_ARGC == 3) {
                        uint32_t value;
                        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], value);
index 485f4e8c71c05090add1e7355449d1ac8030ae29..a055696b04ec9fa2003e7d1e7a113f284e7c4510 100644 (file)
@@ -1194,12 +1194,9 @@ COMMAND_HANDLER(mips_m4k_handle_cp0_command)
                                                cp0_reg);
                                return ERROR_OK;
                        }
-                       retval = jtag_execute_queue();
-                       if (retval != ERROR_OK)
-                               return retval;
-
                        command_print(CMD_CTX, "cp0 reg %" PRIi32 ", select %" PRIi32 ": %8.8" PRIx32,
                                        cp0_reg, cp0_sel, value);
+
                } else if (CMD_ARGC == 3) {
                        uint32_t value;
                        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], value);