[RESEND v3 33/52] clock: Use udelay() to implement mdelay()

Andrey Smirnov andrew.smirnov at gmail.com
Thu Jun 7 06:00:49 PDT 2018


Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 include/clock.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/clock.h b/include/clock.h
index 38b335c2c..8e40451a3 100644
--- a/include/clock.h
+++ b/include/clock.h
@@ -86,9 +86,7 @@ static inline void udelay(unsigned long usecs)
 
 static inline void mdelay(unsigned long msecs)
 {
-	uint64_t start = get_time_ns();
-
-	while(!is_timeout(start, msecs * MSECOND));
+	udelay(msecs * MSECOND / USECOND);
 }
 
 static inline void mdelay_non_interruptible(unsigned long msecs)
-- 
2.17.0




More information about the barebox mailing list