From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQdRN-0000Sn-7W for barebox@lists.infradead.org; Wed, 06 Jun 2018 18:45:49 +0000 Received: by mail-pf0-x22f.google.com with SMTP id b17-v6so3576865pfi.0 for ; Wed, 06 Jun 2018 11:45:38 -0700 (PDT) From: Andrey Smirnov Date: Wed, 6 Jun 2018 11:44:26 -0700 Message-Id: <20180606184431.10348-34-andrew.smirnov@gmail.com> In-Reply-To: <20180606184431.10348-1-andrew.smirnov@gmail.com> References: <20180606184431.10348-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v3 33/38] clock: Use udelay() to implement mdelay() To: barebox@lists.infradead.org Cc: Andrey Smirnov Signed-off-by: Andrey Smirnov --- 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 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox