summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomek CEDRO <cederom@tlen.pl>2011-11-06 02:40:56 +0000
committerTomek CEDRO <cederom@tlen.pl>2011-11-06 02:40:56 +0000
commit2c1702116d1bd4d39fdde3ded710ed8e2a55dba3 (patch)
tree95b96fe1a25448e774bb19226683550d607dcc12 /src
parent9406d18ba621adee8e2c4b42a9ce24e5bd26388c (diff)
downloadopenocd_libswd-2c1702116d1bd4d39fdde3ded710ed8e2a55dba3.tar.gz
openocd_libswd-2c1702116d1bd4d39fdde3ded710ed8e2a55dba3.tar.bz2
openocd_libswd-2c1702116d1bd4d39fdde3ded710ed8e2a55dba3.tar.xz
openocd_libswd-2c1702116d1bd4d39fdde3ded710ed8e2a55dba3.zip
target/arm_adi_v5: ahbap_debugport_init() returns error when both CDBGPWRUPACK|CSYSPWRUPACK flags are not set after read retries - this may indicate communication failure.
Diffstat (limited to 'src')
-rw-r--r--src/target/arm_adi_v5.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c
index 88a5d3b8..b6c66b85 100644
--- a/src/target/arm_adi_v5.c
+++ b/src/target/arm_adi_v5.c
@@ -1150,9 +1150,12 @@ int ahbap_debugport_init(struct adiv5_dap *dap)
alive_sleep(10);
}
- //TC: Here CDBGPWRUPACK|CSYSPWRUPACK still may not be set!
- //TODO: Should we proceed anyway?
- if (cnt>=10) LOG_ERROR("CDBGPWRUPACK|CSYSPWRUPACK FLAGS NOT SET IN RESPONSE!");
+ //TC: At this point CDBGPWRUPACK|CSYSPWRUPACK still may not be set!
+ // We should not proceed, it may indicate target failure...
+ if (cnt>=10) {
+ LOG_ERROR("CDBGPWRUPACK|CSYSPWRUPACK FLAGS NOT SET IN RESPONSE!");
+ return(ERROR_FAIL);
+ }
retval = dap_queue_dp_read(dap, DP_CTRL_STAT, NULL);
if (retval != ERROR_OK)