diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-03-31 23:46:32 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-03-31 23:46:56 +0200 |
commit | 0c1ebf2673ef02c5fef7677cbf09d4ad4fa3c533 (patch) | |
tree | 9a401addc8d54451fa9773cb29c4be153ca25c8e /src/target/mips_ejtag.c | |
parent | 83ab5ad2408c7d67ea490986f887c432f229e0ef (diff) | |
download | riscv-openocd-0c1ebf2673ef02c5fef7677cbf09d4ad4fa3c533.zip riscv-openocd-0c1ebf2673ef02c5fef7677cbf09d4ad4fa3c533.tar.gz riscv-openocd-0c1ebf2673ef02c5fef7677cbf09d4ad4fa3c533.tar.bz2 |
mips: mips32_pracc_exec error propagation fixes
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target/mips_ejtag.c')
-rw-r--r-- | src/target/mips_ejtag.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/target/mips_ejtag.c b/src/target/mips_ejtag.c index f9eaef1..9df8a02 100644 --- a/src/target/mips_ejtag.c +++ b/src/target/mips_ejtag.c @@ -162,10 +162,8 @@ static int mips_ejtag_step_enable(struct mips_ejtag *ejtag_info) MIPS32_MFC0(1,31,0), /* move COP0 DeSave to $1 */ }; - mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code, \ - 0, NULL, 0, NULL, 1); - - return ERROR_OK; + return mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code, + 0, NULL, 0, NULL, 1); } static int mips_ejtag_step_disable(struct mips_ejtag *ejtag_info) @@ -187,10 +185,8 @@ static int mips_ejtag_step_disable(struct mips_ejtag *ejtag_info) MIPS32_MFC0(15,31,0), /* move COP0 DeSave to $15 */ }; - mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code, \ + return mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code, 0, NULL, 0, NULL, 1); - - return ERROR_OK; } int mips_ejtag_config_step(struct mips_ejtag *ejtag_info, int enable_step) @@ -228,9 +224,7 @@ int mips_ejtag_exit_debug(struct mips_ejtag *ejtag_info) inst = MIPS32_DRET; /* execute our dret instruction */ - mips32_pracc_exec(ejtag_info, 1, &inst, 0, NULL, 0, NULL, 0); - - return ERROR_OK; + return mips32_pracc_exec(ejtag_info, 1, &inst, 0, NULL, 0, NULL, 0); } int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg) @@ -252,10 +246,8 @@ int mips_ejtag_read_debug(struct mips_ejtag *ejtag_info, uint32_t* debug_reg) MIPS32_MFC0(15,31,0), /* move COP0 DeSave to $15 */ }; - mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code, \ + return mips32_pracc_exec(ejtag_info, ARRAY_SIZE(code), code, 0, NULL, 1, debug_reg, 1); - - return ERROR_OK; } int mips_ejtag_init(struct mips_ejtag *ejtag_info) |