]> git.sur5r.net Git - openocd/commitdiff
-- corrected embedded ice definitions
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 10 May 2007 14:42:23 +0000 (14:42 +0000)
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 10 May 2007 14:42:23 +0000 (14:42 +0000)
-- changed arm966e to use standard arm9_7 reset handling

git-svn-id: svn://svn.berlios.de/openocd/trunk@146 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/ft2232.c
src/target/arm720t.c
src/target/arm7_9_common.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm966e.c

index 858a6c1b04d03890d29c00fe4cfac7cfc12efc7b..a6dbadc6184cc45305618d9a3c13a308a03d6f59 100644 (file)
@@ -272,7 +272,7 @@ int ft2232_register_commands(struct command_context_s *cmd_ctx)
        return ERROR_OK;
 }
 
-void ft2232_end_state(state)
+void ft2232_end_state(enum tap_state state)
 {
        if (tap_move_map[state] != -1)
                end_state = state;
index 1fa5ef11b6edcd92fe4eb41d8db06bd5491588c7..a3c40d6f6a60bd181b6ae7c087b54f2d8cb28243 100644 (file)
@@ -372,7 +372,7 @@ int arm720t_soft_reset_halt(struct target_s *target)
                target->type->halt(target);
        }
        
-       while (buf_get_u32(dbg_stat->value, EICE_DBG_CONTROL_DBGACK, 1) == 0)
+       while (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1) == 0)
        {
                embeddedice_read_reg(dbg_stat);
                jtag_execute_queue();
index d28aca59f67ebb6d41356983757000c51630d83d..2c82c91e705946dbe404216d7ed9c8354f30f4c4 100644 (file)
@@ -785,7 +785,7 @@ int arm7_9_soft_reset_halt(struct target_s *target)
                target->type->halt(target);
        }
        
-       while (buf_get_u32(dbg_stat->value, EICE_DBG_CONTROL_DBGACK, 1) == 0)
+       while (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1) == 0)
        {
                embeddedice_read_reg(dbg_stat);
                jtag_execute_queue();
index 805624eebdbd7a88266853d2189d3eb0915ba304..1bcca0ad2e4bb161fe7772a893835627de7c50b4 100644 (file)
@@ -626,7 +626,7 @@ int arm920t_soft_reset_halt(struct target_s *target)
                target->type->halt(target);
        }
        
-       while (buf_get_u32(dbg_stat->value, EICE_DBG_CONTROL_DBGACK, 1) == 0)
+       while (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1) == 0)
        {
                embeddedice_read_reg(dbg_stat);
                jtag_execute_queue();
index 4d43c17a90c7005df2a7b42fe03e9e51d7b7c70e..89fbfae3b05f52fc215e20dde4ac03df64f835ec 100644 (file)
@@ -566,7 +566,7 @@ int arm926ejs_soft_reset_halt(struct target_s *target)
                target->type->halt(target);
        }
        
-       while (buf_get_u32(dbg_stat->value, EICE_DBG_CONTROL_DBGACK, 1) == 0)
+       while (buf_get_u32(dbg_stat->value, EICE_DBG_STATUS_DBGACK, 1) == 0)
        {
                embeddedice_read_reg(dbg_stat);
                jtag_execute_queue();
index 01d01d756c72eb2ab82860d00ce142ef96112f2b..616fb9463aa65a62d1b522f2050052d4b2b08264 100644 (file)
@@ -43,8 +43,6 @@
 int arm966e_register_commands(struct command_context_s *cmd_ctx);
 
 /* forward declarations */
-int arm966e_deassert_reset(target_t *target);
-int arm966e_assert_reset(target_t *target);
 int arm966e_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
 int arm966e_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
 int arm966e_quit(void);
@@ -60,8 +58,8 @@ target_type_t arm966e_target =
        .resume = arm7_9_resume,
        .step = arm7_9_step,
 
-       .assert_reset = arm966e_assert_reset,
-       .deassert_reset = arm966e_deassert_reset,
+       .assert_reset = arm7_9_assert_reset,
+       .deassert_reset = arm7_9_deassert_reset,
        .soft_reset_halt = arm7_9_soft_reset_halt,
        .prepare_reset_halt = arm7_9_prepare_reset_halt,
 
@@ -84,77 +82,6 @@ target_type_t arm966e_target =
        .quit = arm966e_quit,
 };
 
-int arm966e_assert_reset(target_t *target)
-{
-       int retval;
-       
-       DEBUG("target->state: %s", target_state_strings[target->state]);
-       
-       if (target->state == TARGET_HALTED || target->state == TARGET_UNKNOWN)
-       {
-               /* assert SRST and TRST */
-               /* system would get ouf sync if we didn't reset test-logic, too */
-               if ((retval = jtag_add_reset(1, 1)) != ERROR_OK)
-               {
-                       if (retval == ERROR_JTAG_RESET_CANT_SRST)
-                       {
-                               WARNING("can't assert srst");
-                               return retval;
-                       }
-                       else
-                       {
-                               ERROR("unknown error");
-                               exit(-1);
-                       }
-               }
-               jtag_add_sleep(5000);
-               if ((retval = jtag_add_reset(0, 1)) != ERROR_OK)
-               {
-                       if (retval == ERROR_JTAG_RESET_WOULD_ASSERT_TRST)
-                       {
-                               WARNING("srst resets test logic, too");
-                               retval = jtag_add_reset(1, 1);
-                       }
-               }
-       }
-       else
-       {
-               if ((retval = jtag_add_reset(0, 1)) != ERROR_OK)
-               {
-                       if (retval == ERROR_JTAG_RESET_WOULD_ASSERT_TRST)
-                       {
-                               WARNING("srst resets test logic, too");
-                               retval = jtag_add_reset(1, 1);
-                       }
-                       
-                       if (retval == ERROR_JTAG_RESET_CANT_SRST)
-                       {
-                               WARNING("can't assert srst");
-                               return retval;
-                       }
-                       else if (retval != ERROR_OK)
-                       {
-                               ERROR("unknown error");
-                               exit(-1);
-                       }
-               }
-       }
-       
-       target->state = TARGET_RESET;
-       jtag_add_sleep(50000);
-       
-       armv4_5_invalidate_core_regs(target);
-       
-       return ERROR_OK;
-}
-
-int arm966e_deassert_reset(target_t *target)
-{
-       arm7_9_deassert_reset( target );
-       
-       return ERROR_OK;
-}
-
 int arm966e_init_target(struct command_context_s *cmd_ctx, struct target_s *target)
 {
        arm9tdmi_init_target(cmd_ctx, target);
@@ -413,7 +340,7 @@ int arm966e_register_commands(struct command_context_s *cmd_ctx)
        int retval;
        command_t *arm966e_cmd;
        
-       retval = arm7_9_register_commands(cmd_ctx);
+       retval = arm9tdmi_register_commands(cmd_ctx);
        arm966e_cmd = register_command(cmd_ctx, NULL, "arm966e", NULL, COMMAND_ANY, "arm966e specific commands");
        register_command(cmd_ctx, arm966e_cmd, "cp15", arm966e_handle_cp15_command, COMMAND_EXEC, "display/modify cp15 register <num> [value]");