fixed warning
[fw/openocd] / src / target / mips_m4k.c
index 8695a6269b6cac3ed550b2ffc6d49809f7570fec..7cca55de61f375cb602ff1d2f6b5c1f761a78356 100644 (file)
@@ -43,10 +43,10 @@ int mips_m4k_read_memory(struct target_s *target, u32 address, u32 size, u32 cou
 int mips_m4k_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
 int mips_m4k_register_commands(struct command_context_s *cmd_ctx);
 int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int mips_m4k_quit();
+int mips_m4k_quit(void);
 int mips_m4k_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
 
-int mips_m4k_examine(struct command_context_s *cmd_ctx, struct target_s *target);
+int mips_m4k_examine(struct target_s *target);
 int mips_m4k_assert_reset(target_t *target);
 int mips_m4k_deassert_reset(target_t *target);
 
@@ -266,6 +266,14 @@ int mips_m4k_assert_reset(target_t *target)
 
        mips32_invalidate_core_regs(target);
 
+    if (target->reset_halt)
+    {
+       int retval;
+               if ((retval = target_halt(target))!=ERROR_OK)
+                       return retval;
+    }
+       
+       
        return ERROR_OK;
 }
 
@@ -561,7 +569,7 @@ int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target_s *tar
        return ERROR_OK;
 }
 
-int mips_m4k_quit()
+int mips_m4k_quit(void)
 {
        return ERROR_OK;
 }
@@ -610,7 +618,7 @@ int mips_m4k_target_command(struct command_context_s *cmd_ctx, char *cmd, char *
        return ERROR_OK;
 }
 
-int mips_m4k_examine(struct command_context_s *cmd_ctx, struct target_s *target)
+int mips_m4k_examine(struct target_s *target)
 {
        int retval;
        mips32_common_t *mips32 = target->arch_info;