* 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 *
/* 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;
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 */
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);
JTAG_TRST_ASSERTED,
JTAG_TAP_EVENT_ENABLE,
JTAG_TAP_EVENT_DISABLE,
+ JTAG_TAP_EVENT_POST_RESET,
};
struct jtag_tap_event_action_s
* @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);
* 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.
/// @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);