aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-01-18 21:54:58 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-01-19 10:58:48 +0100
commit924bf27596f31ab8e79fbb4de702be4a9fa12874 (patch)
tree5e1fe55fa5449fad44b9b0138230bb87a1f73cf3 /src
parentc795b0d8f143a52e0b7196c6e353b381ac04f8ae (diff)
downloadriscv-openocd-924bf27596f31ab8e79fbb4de702be4a9fa12874.zip
riscv-openocd-924bf27596f31ab8e79fbb4de702be4a9fa12874.tar.gz
riscv-openocd-924bf27596f31ab8e79fbb4de702be4a9fa12874.tar.bz2
zy1000: flush jtag buffer before changing speed
It is conceivable that there could be commands in the queue when a speed change request comes in. Flush the hw queue before changing speed. Not observed, found by inspection. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/zy1000/zy1000.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jtag/zy1000/zy1000.c b/src/jtag/zy1000/zy1000.c
index 9070f2e..2c205b7 100644
--- a/src/jtag/zy1000/zy1000.c
+++ b/src/jtag/zy1000/zy1000.c
@@ -199,6 +199,9 @@ void zy1000_reset(int trst, int srst)
int zy1000_speed(int speed)
{
+ /* flush JTAG master FIFO before setting speed */
+ waitIdle();
+
if (speed == 0)
{
/*0 means RCLK*/