From d24460151afb4c5ffb82f75c40e23d7eb1f1a1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Tue, 29 Jan 2008 23:21:32 +0000 Subject: [PATCH] set instructions of all parts to BYPASS for tap_reset(), fixes [ 1873260 ] Command 'reset' does not reset internal states git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@972 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 6 ++++++ jtag/src/part/part.c | 3 +++ jtag/src/tap/tap.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 295d2560..778982f4 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,9 @@ +2008-01-30 Arnim Laeuger + + * src/tap/tap.c (tap_reset): set instructions of all parts to BYPASS, fix + [ 1873260 ] Command 'reset' does not reset internal states + * src/part/part.c (parts_set_instruction): catch NULL pointer + 2008-01-25 Kolja Waschk * include/jim.h, src/jim/tap.c, intel_28f800b3.c, Makefile.am, diff --git a/jtag/src/part/part.c b/jtag/src/part/part.c index f49ad5e7..dfe065df 100644 --- a/jtag/src/part/part.c +++ b/jtag/src/part/part.c @@ -306,6 +306,9 @@ parts_set_instruction( parts_t *ps, const char *iname ) { int i; + if (!ps) + return; + for (i = 0; i < ps->len; i++) ps->parts[i]->active_instruction = part_find_instruction( ps->parts[i], iname ); } diff --git a/jtag/src/tap/tap.c b/jtag/src/tap/tap.c index 885c1398..1e497339 100644 --- a/jtag/src/tap/tap.c +++ b/jtag/src/tap/tap.c @@ -39,6 +39,8 @@ tap_reset( chain_t *chain ) chain_clock( chain, 1, 0, 5 ); /* Test-Logic-Reset */ chain_clock( chain, 0, 0, 1 ); /* Run-Test/Idle */ + + parts_set_instruction( chain->parts, "BYPASS" ); } void