[U-Boot] [PATCH v1 (WIP) 09/16] [Timer]Replace get_timer() usage in drivers/block/

2011-06-28 Thread Graeme Russ
Signed-off-by: Graeme Russ graeme.r...@gmail.com --- drivers/block/mg_disk.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c index 2198017..c8cc195 100644 --- a/drivers/block/mg_disk.c +++

Re: [U-Boot] [PATCH v1 (WIP) 09/16] [Timer]Replace get_timer() usage in drivers/block/

2011-06-28 Thread Simon Glass
Hi Graeme, On Tue, Jun 28, 2011 at 4:41 AM, Graeme Russ graeme.r...@gmail.com wrote: Signed-off-by: Graeme Russ graeme.r...@gmail.com ---  drivers/block/mg_disk.c |    9 -  1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/block/mg_disk.c

Re: [U-Boot] [PATCH v1 (WIP) 09/16] [Timer]Replace get_timer() usage in drivers/block/

2011-06-28 Thread Reinhard Meyer
Dear All, Well I know i have asked this before, but I feel I should ask again because I didn't like the answer much. Imagine we change this code to: ts = time_now_ms() + msec do { ... } while (time_since_ms(ts) 0); That should be legal, right? But I don't think this can work since the

Re: [U-Boot] [PATCH v1 (WIP) 09/16] [Timer]Replace get_timer() usage in drivers/block/

2011-06-28 Thread Graeme Russ
Hi Reinhard, On Wed, Jun 29, 2011 at 3:06 PM, Reinhard Meyer u-b...@emk-elektronik.de wrote: Dear All, Well I know i have asked this before, but I feel I should ask again because I didn't like the answer much. Imagine we change this code to: ts = time_now_ms() + msec do { ... } while

Re: [U-Boot] [PATCH v1 (WIP) 09/16] [Timer]Replace get_timer() usage in drivers/block/

2011-06-28 Thread Simon Glass
Hi Graeme, On Tue, Jun 28, 2011 at 10:19 PM, Graeme Russ graeme.r...@gmail.com wrote: Hi Reinhard, On Wed, Jun 29, 2011 at 3:06 PM, Reinhard Meyer u-b...@emk-elektronik.de wrote: Dear All, Well I know i have asked this before, but I feel I should ask again because I didn't like the answer

Re: [U-Boot] [PATCH v1 (WIP) 09/16] [Timer]Replace get_timer() usage in drivers/block/

2011-06-28 Thread Graeme Russ
Hi Simon,        u32 end = time_future_ms(timeout);        do {                ...blah...        } while(time_now_ms() end); ... Actually: } while (time_passed_ms(end)) Sorry, but I think you've lost me here... but anyway I agree it is a matter of taste and I'm quite happy with