Skip to content
Snippets Groups Projects
Commit 2c77c0d6 authored by tomas.melin@vaisala.com's avatar tomas.melin@vaisala.com Committed by Tom Rini
Browse files

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: default avatarTomas Melin <tomas.melin@vaisala.com>
parent aa6ab905
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment