[Openocd-development] [PATCH] jtag: clean up jtag_sleep, handle short sleeps correctly via usleep

2011-03-03 Thread Øyvind Harboe
short sleeps are handled via usleep, longer sleeps we round up to nearest ms. There was a bug in jtag_sleep() in that it would round *down* to nearest ms, thus making all 1ms sleeps 0. Found by inspection rather than symptom. Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com ---

Re: [Openocd-development] [PATCH] jtag: clean up jtag_sleep, handle short sleeps correctly via usleep

2011-03-03 Thread Laurent Gauch
--- src/jtag/core.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/jtag/core.c b/src/jtag/core.c index d7e1cce..68c1257 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -871,9 +871,16 @@ static int jtag_reset_callback(enum jtag_event event, void

Re: [Openocd-development] [PATCH] jtag: clean up jtag_sleep, handle short sleeps correctly via usleep

2011-03-03 Thread Laurent Gauch
Øyvind Harboe wrote: On Thu, Mar 3, 2011 at 3:29 PM, Laurent Gauch laurent.ga...@amontec.com wrote: --- src/jtag/core.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/jtag/core.c b/src/jtag/core.c index d7e1cce..68c1257 100644 --- a/src/jtag/core.c +++

Re: [Openocd-development] [PATCH] jtag: clean up jtag_sleep, handle short sleeps correctly via usleep

2011-03-03 Thread Øyvind Harboe
Anyway, adding delays on JTAG level should be corresponding to generating some TCK in stable state, EVER. We never should have to add ANY 'software' delay in the JTAG level , if we do (and I think we do) this is the better way to get instable ISP. the delay is typically used to wait for SRST

Re: [Openocd-development] [PATCH] jtag: clean up jtag_sleep, handle short sleeps correctly via usleep

2011-03-03 Thread Laurent Gauch
Øyvind Harboe wrote: Anyway, adding delays on JTAG level should be corresponding to generating some TCK in stable state, EVER. We never should have to add ANY 'software' delay in the JTAG level , if we do (and I think we do) this is the better way to get instable ISP. the delay is