If parport_toggling_time is called before the adapter speed has been
configured then the call fails. Probably not the best fix, but does at least
enable parport_toggling_time to be used again.
This regression was added in commit
740b9e25b410c164e661d0334a9ea4168406726b
Change-Id: I90300916d6bda5ef053c557e5ac136c4f002bdd1
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1309
Tested-by: jenkins
parport_toggling_time_ns = ns;
retval = jtag_get_speed(&wait_states);
- if (retval != ERROR_OK)
- return retval;
+ if (retval != ERROR_OK) {
+ /* if jtag_get_speed fails then the clock_mode
+ * has not been configured, this happens if parport_toggling_time is
+ * called before the adapter speed is set */
+ LOG_INFO("no parport speed set - defaulting to zero wait states");
+ wait_states = 0;
+ }
}
command_print(CMD_CTX, "parport toggling time = %" PRIu32 " ns",