adi_v5_jtag.c: Avoid infinite recursion in jtagdp_transaction_endcheck()
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Tue, 9 Oct 2012 14:47:16 +0000 (16:47 +0200)
committerPeter Stuge <peter@stuge.se>
Sun, 28 Oct 2012 01:33:57 +0000 (01:33 +0000)
Change-Id: I81163d9c2ff97ed768f8a3ac1505a8d2b5016b91
Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://openocd.zylin.com/908
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/target/adi_v5_jtag.c

index b6473b0..9f37bd5 100644 (file)
@@ -254,7 +254,7 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap)
                                        DP_CTRL_STAT, DPAP_READ, 0, &ctrlstat);
                        if (retval != ERROR_OK)
                                return retval;
-                       retval = dap_run(dap);
+                       retval = jtag_execute_queue();
                        if (retval != ERROR_OK)
                                return retval;
                        dap->ack = dap->ack & 0x7;
@@ -305,7 +305,7 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap)
                                        DP_CTRL_STAT, DPAP_READ, 0, &ctrlstat);
                        if (retval != ERROR_OK)
                                return retval;
-                       retval = dap_run(dap);
+                       retval = jtag_execute_queue();
                        if (retval != ERROR_OK)
                                return retval;
 
@@ -321,14 +321,14 @@ static int jtagdp_transaction_endcheck(struct adiv5_dap *dap)
                        if (retval != ERROR_OK)
                                return retval;
 
-                       retval = dap_run(dap);
+                       retval = jtag_execute_queue();
                        if (retval != ERROR_OK)
                                return retval;
                        LOG_ERROR("MEM_AP_CSW 0x%" PRIx32 ", MEM_AP_TAR 0x%"
                                        PRIx32, mem_ap_csw, mem_ap_tar);
 
                }
-               retval = dap_run(dap);
+               retval = jtag_execute_queue();
                if (retval != ERROR_OK)
                        return retval;
                return ERROR_JTAG_DEVICE_ERROR;