summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-05-10 14:42:23 +0000
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-05-10 14:42:23 +0000
commite8af4de0a7d224e1aa28e72f0de1ddf0bec5beb8 (patch)
tree566279287a06dc3e790b9a46d3ccd7b5ca48574d /src/target
parent054b091623edcdc962e8c65066039f38edf2f814 (diff)
downloadopenocd+libswd-e8af4de0a7d224e1aa28e72f0de1ddf0bec5beb8.tar.gz
openocd+libswd-e8af4de0a7d224e1aa28e72f0de1ddf0bec5beb8.tar.bz2
openocd+libswd-e8af4de0a7d224e1aa28e72f0de1ddf0bec5beb8.tar.xz
openocd+libswd-e8af4de0a7d224e1aa28e72f0de1ddf0bec5beb8.zip
-- corrected embedded ice definitions
-- changed arm966e to use standard arm9_7 reset handling git-svn-id: svn://svn.berlios.de/openocd/trunk@146 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm720t.c2
-rw-r--r--src/target/arm7_9_common.c2
-rw-r--r--src/target/arm920t.c2
-rw-r--r--src/target/arm926ejs.c2
-rw-r--r--src/target/arm966e.c79
5 files changed, 7 insertions, 80 deletions
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index 1fa5ef11..a3c40d6f 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -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();
diff --git a/src/target/arm7_9_common.c b/src/target/arm7_9_common.c
index d28aca59..2c82c91e 100644
--- a/src/target/arm7_9_common.c
+++ b/src/target/arm7_9_common.c
@@ -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();
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 805624ee..1bcca0ad 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -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();
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 4d43c17a..89fbfae3 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -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();
diff --git a/src/target/arm966e.c b/src/target/arm966e.c
index 01d01d75..616fb946 100644
--- a/src/target/arm966e.c
+++ b/src/target/arm966e.c
@@ -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]");