* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
/* A reserved manufacturer ID is used in END_OF_CHAIN_FLAG, so we
* know that no valid TAP will have it as an IDCODE value.
*/
/* A reserved manufacturer ID is used in END_OF_CHAIN_FLAG, so we
* know that no valid TAP will have it as an IDCODE value.
*/
- while ((val = buf_get_u32(ir_test, chain_pos, tap->ir_length + 1)) == 1
- && tap->ir_length <= 32) {
+ while ((val = buf_get_u64(ir_test, chain_pos, tap->ir_length + 1)) == 1
+ && tap->ir_length <= 64) {
* this part of the JTAG spec, so their capture mask/value
* attributes might disable this test.
*/
* this part of the JTAG spec, so their capture mask/value
* attributes might disable this test.
*/
- (tap->ir_length + 7) / tap->ir_length,
- val,
- (tap->ir_length + 7) / tap->ir_length,
- (unsigned) tap->ir_capture_value);
+ (tap->ir_length + 7) / tap->ir_length, val,
+ (tap->ir_length + 7) / tap->ir_length, tap->ir_capture_value);
(tap->ir_length + 7) / tap->ir_length, val);
chain_pos += tap->ir_length;
}
/* verify the '11' sentinel we wrote is returned at the end */
(tap->ir_length + 7) / tap->ir_length, val);
chain_pos += tap->ir_length;
}
/* verify the '11' sentinel we wrote is returned at the end */
/* register the reset callback for the TAP */
jtag_register_event_callback(&jtag_reset_callback, tap);
/* register the reset callback for the TAP */
jtag_register_event_callback(&jtag_reset_callback, tap);
- "irlen %d, capture: 0x%x mask: 0x%x", tap->dotted_name,
- tap->abs_chain_position, tap->ir_length,
- (unsigned) tap->ir_capture_value,
- (unsigned) tap->ir_capture_mask);
- jtag_tap_add(tap);
+ "irlen %d, capture: 0x%x mask: 0x%x", tap->dotted_name,
+ tap->abs_chain_position, tap->ir_length,
+ (unsigned) tap->ir_capture_value,
+ (unsigned) tap->ir_capture_mask);
jtag_unregister_event_callback(&jtag_reset_callback, tap);
/** @todo is anything missing? no memory leaks please */
jtag_unregister_event_callback(&jtag_reset_callback, tap);
/** @todo is anything missing? no memory leaks please */
- free((void *)tap->expected);
- free((void *)tap->expected_ids);
- free((void *)tap->chip);
- free((void *)tap->tapname);
- free((void *)tap->dotted_name);
+ free(tap->expected);
+ free(tap->expected_ids);
+ free(tap->chip);
+ free(tap->tapname);
+ free(tap->dotted_name);
if (CLOCK_MODE_UNSELECTED == clock_mode) {
LOG_ERROR("An adapter speed is not selected in the init script."
" Insert a call to adapter_khz or jtag_rclk to proceed.");
if (CLOCK_MODE_UNSELECTED == clock_mode) {
LOG_ERROR("An adapter speed is not selected in the init script."
" Insert a call to adapter_khz or jtag_rclk to proceed.");
+
+ /* some targets enable us to connect with srst asserted */
+ if (jtag_reset_config & RESET_CNCT_UNDER_SRST) {
+ if (jtag_reset_config & RESET_SRST_NO_GATING)
+ jtag_add_reset(0, 1);
+ else {
+ LOG_WARNING("\'srst_nogate\' reset_config option is required");
+ jtag_add_reset(0, 0);
+ }
+ } else
+ jtag_add_reset(0, 0);
+
+ /* some targets enable us to connect with srst asserted */
+ if (jtag_reset_config & RESET_CNCT_UNDER_SRST) {
+ if (jtag_reset_config & RESET_SRST_NO_GATING)
+ jtag_add_reset(0, 1);
+ else
+ LOG_WARNING("\'srst_nogate\' reset_config option is required");
+ }
else if (get_current_transport() != NULL)
LOG_ERROR("reset is not supported on %s",
get_current_transport()->name);
else if (get_current_transport() != NULL)
LOG_ERROR("reset is not supported on %s",
get_current_transport()->name);
else if (get_current_transport() != NULL)
LOG_ERROR("reset is not supported on %s",
get_current_transport()->name);
else if (get_current_transport() != NULL)
LOG_ERROR("reset is not supported on %s",
get_current_transport()->name);