target: add async algorithm timeout
commit5c2c269336cc49aa3ea7714d0ffcc4b2edf3057e
authorSpencer Oliver <spen@spen-soft.co.uk>
Mon, 5 Nov 2012 13:04:15 +0000 (5 13:04 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 6 Nov 2012 17:38:37 +0000 (6 17:38 +0000)
tree138c4011e006e9a3a7f8129fd968980dfd9a93b6
parenta72a42230be9a479dd93687d99d39b9029acb50a
target: add async algorithm timeout

An issue was observed when using an async algorithm with a target that had
not been previously reset beforehand. The target would enter a infinite
loop within target_run_flash_async_algorithm.

Add a timeout that will at least prevent this issue from happening. and also
suggest the user resets the target.

Change-Id: I5277e0d64e252d3d353e8d5bc9889a37fdc63060
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/949
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/target/target.c