public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] bootp can use mdelay
@ 2014-07-11  9:39 Pavel Machek
  2014-07-11  9:43 ` Marek Vasut
  2014-07-22 19:22 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Machek @ 2014-07-11  9:39 UTC (permalink / raw)
  To: u-boot

Cleanup bootp code by using mdelay.

Signed-off-by: Pavel Machek <pavel@denx.de>

diff --git a/net/bootp.c b/net/bootp.c
index 189a003..fdb97cb 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -605,7 +605,7 @@ BootpRequest(void)
 	int extlen, pktlen, iplen;
 	int eth_hdr_size;
 #ifdef CONFIG_BOOTP_RANDOM_DELAY
-	ulong i, rand_ms;
+	ulong rand_ms;
 #endif
 
 	bootstage_mark_name(BOOTSTAGE_ID_BOOTP_START, "bootp_start");
@@ -623,8 +623,7 @@ BootpRequest(void)
 		rand_ms = rand() >> 19;
 
 	printf("Random delay: %ld ms...\n", rand_ms);
-	for (i = 0; i < rand_ms; i++)
-		udelay(1000); /*Wait 1ms*/
+	mdelay(rand_ms);
 
 #endif	/* CONFIG_BOOTP_RANDOM_DELAY */
 
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] bootp can use mdelay
  2014-07-11  9:39 [U-Boot] [PATCH] bootp can use mdelay Pavel Machek
@ 2014-07-11  9:43 ` Marek Vasut
  2014-07-22 19:22 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2014-07-11  9:43 UTC (permalink / raw)
  To: u-boot

On Friday, July 11, 2014 at 11:39:37 AM, Pavel Machek wrote:
> Cleanup bootp code by using mdelay.

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] bootp can use mdelay
  2014-07-11  9:39 [U-Boot] [PATCH] bootp can use mdelay Pavel Machek
  2014-07-11  9:43 ` Marek Vasut
@ 2014-07-22 19:22 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2014-07-22 19:22 UTC (permalink / raw)
  To: u-boot

On Fri, Jul 11, 2014 at 11:39:37AM +0200, Pavel Machek wrote:

> Cleanup bootp code by using mdelay.
> 
> Signed-off-by: Pavel Machek <pavel@denx.de>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140722/bcb23b1a/attachment.pgp>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-22 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-11  9:39 [U-Boot] [PATCH] bootp can use mdelay Pavel Machek
2014-07-11  9:43 ` Marek Vasut
2014-07-22 19:22 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox