[U-Boot] [PATCH v1 (WIP) 16/16] [Timer]Replace get_timer() usage in arch/
Simon Glass
sjg at chromium.org
Wed Jun 29 06:45:53 CEST 2011
Hi Graeme,
On Tue, Jun 28, 2011 at 4:41 AM, Graeme Russ <graeme.russ at gmail.com> wrote:
>
> Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
> ---
> arch/blackfin/cpu/jtag-console.c | 4 ++--
> arch/microblaze/lib/time.c | 4 ++--
> arch/nios2/cpu/epcs.c | 12 ++++++------
> arch/powerpc/cpu/mpc824x/drivers/i2c/i2c.c | 8 ++++----
> arch/powerpc/cpu/mpc8260/ether_fcc.c | 12 ++++++------
> 5 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/arch/blackfin/cpu/jtag-console.c b/arch/blackfin/cpu/jtag-console.c
> index e0f2975..97ff1de 100644
> --- a/arch/blackfin/cpu/jtag-console.c
> +++ b/arch/blackfin/cpu/jtag-console.c
> @@ -48,11 +48,11 @@ static inline uint32_t bfin_read_emudat(void)
> static bool jtag_write_emudat(uint32_t emudat)
> {
> static bool overflowed = false;
> - ulong timeout = get_timer(0) + CONFIG_JTAG_CONSOLE_TIMEOUT;
> + ulong start = time_now_ms();
> while (bfin_read_DBGSTAT() & 0x1) {
> if (overflowed)
> return overflowed;
> - if (timeout < get_timer(0))
> + if (time_since_ms(start) >= CONFIG_JTAG_CONSOLE_TIMEOUT)
> overflowed = true;
> }
> overflowed = false;
Here I think I have found a use of future time. It is true what they
say (or should say) that there is every kind of timeout in U-Boot.
Regards,
Simon
More information about the U-Boot
mailing list