mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-08-20 04:06:20 -04:00
Blackfin: jtag-console: fix timer usage
Reported-by: Graeme Russ <graeme.russ@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
bb83875d5d
commit
d8940a6544
@ -48,11 +48,11 @@ static inline uint32_t bfin_read_emudat(void)
|
|||||||
static bool jtag_write_emudat(uint32_t emudat)
|
static bool jtag_write_emudat(uint32_t emudat)
|
||||||
{
|
{
|
||||||
static bool overflowed = false;
|
static bool overflowed = false;
|
||||||
ulong timeout = get_timer(0) + CONFIG_JTAG_CONSOLE_TIMEOUT;
|
ulong timeout = get_timer(0);
|
||||||
while (bfin_read_DBGSTAT() & 0x1) {
|
while (bfin_read_DBGSTAT() & 0x1) {
|
||||||
if (overflowed)
|
if (overflowed)
|
||||||
return overflowed;
|
return overflowed;
|
||||||
if (timeout < get_timer(0))
|
if (get_timer(timeout) > CONFIG_JTAG_CONSOLE_TIMEOUT)
|
||||||
overflowed = true;
|
overflowed = true;
|
||||||
}
|
}
|
||||||
overflowed = false;
|
overflowed = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user