summaryrefslogtreecommitdiff
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
parentc795b0d8f143a52e0b7196c6e353b381ac04f8ae (diff)
downloadopenocd_libswd-924bf27596f31ab8e79fbb4de702be4a9fa12874.tar.gz
openocd_libswd-924bf27596f31ab8e79fbb4de702be4a9fa12874.tar.bz2
openocd_libswd-924bf27596f31ab8e79fbb4de702be4a9fa12874.tar.xz
openocd_libswd-924bf27596f31ab8e79fbb4de702be4a9fa12874.zip
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>
-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 9070f2e3..2c205b7a 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*/