summaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-11 06:52:52 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-04-11 06:52:52 +0000
commit7805be1b3a8f65aff9a861fd8ca62518143f1524 (patch)
tree781e28e65d50b238decb01f06fac51b9d609c236 /src/target/target.h
parenta7d3a4a7f8a0def61ed3caa7fb461b82b2d6ade1 (diff)
downloadopenocd+libswd-7805be1b3a8f65aff9a861fd8ca62518143f1524.tar.gz
openocd+libswd-7805be1b3a8f65aff9a861fd8ca62518143f1524.tar.bz2
openocd+libswd-7805be1b3a8f65aff9a861fd8ca62518143f1524.tar.xz
openocd+libswd-7805be1b3a8f65aff9a861fd8ca62518143f1524.zip
added target->type->examine(). Eventually this will allow for bringing up telnet/gdb *before* jtag chain has been validated + it might fix some reset halt problems seen as examine() needs to run after TRST has been asserted.
git-svn-id: svn://svn.berlios.de/openocd/trunk@563 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/target/target.h b/src/target/target.h
index d95c4aa7..6480bc5b 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -98,6 +98,8 @@ typedef struct working_area_s
typedef struct target_type_s
{
char *name;
+
+ int examined;
/* poll current target status */
int (*poll)(struct target_s *target);
@@ -168,6 +170,18 @@ typedef struct target_type_s
int (*register_commands)(struct command_context_s *cmd_ctx);
int (*target_command)(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
+ /* invoked after JTAG chain has been examined & validated. During
+ * this stage the target is examined and any additional setup is
+ * performed.
+ *
+ * invoked every time after the jtag chain has been validated/examined
+ */
+ int (*examine)(struct command_context_s *cmd_ctx, struct target_s *target);
+ /* Set up structures for target.
+ *
+ * It is illegal to talk to the target at this stage as this fn is invoked
+ * before the JTAG chain has been examined/verified
+ */
int (*init_target)(struct command_context_s *cmd_ctx, struct target_s *target);
int (*quit)(void);
@@ -236,7 +250,7 @@ typedef struct target_timer_callback_s
extern int target_register_commands(struct command_context_s *cmd_ctx);
extern int target_register_user_commands(struct command_context_s *cmd_ctx);
extern int target_init(struct command_context_s *cmd_ctx);
-extern int target_init_reset(struct command_context_s *cmd_ctx);
+extern int target_examine(struct command_context_s *cmd_ctx);
extern int handle_target(void *priv);
extern int target_process_reset(struct command_context_s *cmd_ctx);