From: Øyvind Harboe Date: Mon, 18 Jan 2010 20:54:58 +0000 (+0100) Subject: zy1000: flush jtag buffer before changing speed X-Git-Tag: v0.4.0-rc2~73 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=924bf27596f31ab8e79fbb4de702be4a9fa12874;p=openocd 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 --- 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*/