]> git.baikalelectronics.ru Git - uboot.git/commit
xyz-modem: Change getc timeout loop waiting
authortomas.melin@vaisala.com <tomas.melin@vaisala.com>
Mon, 21 Nov 2016 08:18:51 +0000 (10:18 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 29 Nov 2016 00:49:48 +0000 (19:49 -0500)
commita6395737c72a2f7bbe618021109f3c456cfc4fa3
tree3a54e49a7b2b49c96c4136fb8cfea4bdbd07b90a
parent84f317f7c523997563a2c99e2f014726bea5aa30
xyz-modem: Change getc timeout loop waiting

This fixes the loop delay when using a hw watchdog.

In case a watchdog is used that accesses CPU registers,
the defined delay of 20us in a tight loop will cause a
huge delay in the actual timeout seen. This is caused
by the fact that udelay will inheritantly call WATCHDOG_RESET.
Together with the omap wdt implementation, the seen timeout increases up to
around 30s. This makes the loop very slow and causes long
delays when using the modem.

Instead, implement the 2 sec loop by using the timer interface to know
when to break out of the timeout loop. Watchdog kicking is taken care of
by getc().

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
common/xyzModem.c