tap post reset event added. Allows omap3530 to send 100 runtest idle tickle's after...
[openocd.git] / src / jtag / jtag.h
index 1564ca650c2bdab372170291e8a430337c7f0ba3..b7bfd4cc9d4b3211061c0e0eba96eccf877bf147 100644 (file)
@@ -2,7 +2,7 @@
 *   Copyright (C) 2005 by Dominic Rath                                    *
 *   Dominic.Rath@gmx.de                                                   *
 *                                                                         *
-*   Copyright (C) 2007,2008 Øyvind Harboe                                 *
+*   Copyright (C) 2007,2008 Øyvind Harboe                                 *
 *   oyvind.harboe@zylin.com                                               *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
@@ -144,7 +144,7 @@ typedef struct jtag_tap_event_action_s jtag_tap_event_action_t;
 
 /* this is really: typedef jtag_tap_t */
 /* But - the typedef is done in "types.h" */
-/* due to "forward decloration reasons" */
+/* due to "forward declaration reasons" */
 struct jtag_tap_s
 {
        const char* chip;
@@ -161,6 +161,7 @@ struct jtag_tap_s
        uint32_t ir_capture_mask;
        uint8_t* expected_mask; /**< Capture-IR expected mask */
        uint32_t idcode;
+       bool hasidcode; /* not all devices have idcode, we'll discover this during chain examination */
        /**< device identification code */
 
        /// Array of expected identification codes */
@@ -185,7 +186,6 @@ extern jtag_tap_t* jtag_all_taps(void);
 extern const char *jtag_tap_name(const jtag_tap_t *tap);
 extern jtag_tap_t* jtag_tap_by_string(const char* dotted_name);
 extern jtag_tap_t* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj);
-extern jtag_tap_t* jtag_tap_by_position(unsigned abs_position);
 extern jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p);
 extern unsigned jtag_tap_count_enabled(void);
 extern unsigned jtag_tap_count(void);
@@ -208,6 +208,7 @@ enum jtag_event {
        JTAG_TRST_ASSERTED,
        JTAG_TAP_EVENT_ENABLE,
        JTAG_TAP_EVENT_DISABLE,
+       JTAG_TAP_EVENT_POST_RESET,
 };
 
 struct jtag_tap_event_action_s
@@ -253,13 +254,16 @@ int jtag_get_speed_readable(int *speed);
  * @returns ERROR_OK during configuration or on success, or an error
  *   code returned from the interface @c speed callback.
  */
-int jtag_set_speed(int speed);
+int jtag_config_speed(int speed);
 
 
 /// Attempt to configure the interface for the specified KHz.
 int jtag_config_khz(unsigned khz);
-/// Set the clock speed of the JTAG interface in KHz.
-void jtag_set_speed_khz(unsigned speed);
+/**
+ * Attempt to enable RTCK/RCLK. If that fails, fallback to the
+ * specified frequency.
+ */
+int jtag_config_rclk(unsigned fallback_speed_khz);
 /// Retreives the clock speed of the JTAG interface in KHz.
 unsigned jtag_get_speed_khz(void);
 
@@ -438,7 +442,7 @@ typedef int (*jtag_callback_t)(jtag_callback_data_t data0, jtag_callback_data_t
  * arguments.
  *
  * @param f The callback function to add.
- * @param in Typically used to point to the data to operate on.
+ * @param data0 Typically used to point to the data to operate on.
  * Frequently this will be the data clocked in during a shift operation.
  * @param data1 An integer big enough to use as an @c int or a pointer.
  * @param data2 An integer big enough to use as an @c int or a pointer.
@@ -632,6 +636,9 @@ extern void jtag_execute_queue_noclear(void);
 /// @returns the number of times the scan queue has been flushed
 int jtag_get_flush_queue_count(void);
 
+/// Notify all TAP's about a TLR reset
+void jtag_notify_reset(void);
+
 
 /* can be implemented by hw + sw */
 extern int jtag_power_dropout(int* dropout);

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)