Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> --- lib/clock.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/clock.c b/lib/clock.c index b7cc49fa6..37e45489c 100644 --- a/lib/clock.c +++ b/lib/clock.c @@ -50,9 +50,11 @@ EXPORT_SYMBOL(udelay); void mdelay(unsigned long msecs) { - uint64_t start = get_time_ns(); - - while(!is_timeout(start, msecs * MSECOND)); + /* + * Parens around division below are needed to pervent ARM/EABI + * toolchain from emitting a call to __aeabi_uldivmod. + */ + udelay(msecs * (MSECOND / USECOND)); } EXPORT_SYMBOL(mdelay); -- 2.17.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox