adapter_khz_to_speed wasn't changing the speed variable passed to it if the
jtag interface wasn't set up. Otherwise, if adapter_khz was called before
openocd was done initializing, openocd would report a speed different than
it was actually outputting.
Tested on SAM3s_ek board with an olimex-arm-usb-ocd interface and an
oscilloscope.
Kevin Kiningham
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 0073374..4c5d37a 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -1601,8 +1601,6 @@ static int adapter_khz_to_speed(unsigned khz, int* speed)
return retval;
}
*speed = speed_div1;
- } else {
- *speed = khz;
}
return ERROR_OK;
}
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development