aboutsummaryrefslogtreecommitdiff
path: root/src/target/xscale.c
diff options
context:
space:
mode:
authorMatt Reimer <mreimer@sdgsystems.com>2011-09-19 10:30:13 -0400
committerØyvind Harboe <oyvindharboe@gmail.com>2011-10-18 20:32:36 +0000
commit4eca579a6edf49ff8cb0872c757165c35013e46d (patch)
tree8ad77114f6b073445fb54a64c0c12075c8ba44a1 /src/target/xscale.c
parent0dac042a107f000936995ea468c3fa02b9896fb6 (diff)
downloadriscv-openocd-4eca579a6edf49ff8cb0872c757165c35013e46d.zip
riscv-openocd-4eca579a6edf49ff8cb0872c757165c35013e46d.tar.gz
riscv-openocd-4eca579a6edf49ff8cb0872c757165c35013e46d.tar.bz2
xscale: fix bug in xscale_receive()
The code in xscale_receive() that tries to skip invalid reads (i.e. reads that don't have the DBG_SR[0] 'valid' bit set) seems to be wrong, as it only looks at the first word's valid flag rather than each word's own valid flag. Am I reading the code correctly? If so, the attached patch should fix it. If this looks correct, I'll generate a proper patch and commit message. Matt Change-Id: I74ebe2ad7a36d340a9dd3b8487578b6ea7f3cf1e Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/32 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src/target/xscale.c')
-rw-r--r--src/target/xscale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 3b56745..b469b86 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -317,7 +317,7 @@ static int xscale_receive(struct target *target, uint32_t *buffer, int num_words
/* examine results */
for (i = words_done; i < num_words; i++)
{
- if (!(field0[0] & 1))
+ if (!(field0[i] & 1))
{
/* move backwards if necessary */
int j;