Skip to content
Snippets Groups Projects
Commit 8e8d73b4 authored by Pavel Machek's avatar Pavel Machek Committed by Tom Rini
Browse files

bootp can use mdelay


Cleanup bootp code by using mdelay.

Signed-off-by: default avatarPavel Machek <pavel@denx.de>
Acked-by: default avatarMarek Vasut <marex@denx.de>
parent c13bb167
No related branches found
No related tags found
No related merge requests found
...@@ -605,7 +605,7 @@ BootpRequest(void) ...@@ -605,7 +605,7 @@ BootpRequest(void)
int extlen, pktlen, iplen; int extlen, pktlen, iplen;
int eth_hdr_size; int eth_hdr_size;
#ifdef CONFIG_BOOTP_RANDOM_DELAY #ifdef CONFIG_BOOTP_RANDOM_DELAY
ulong i, rand_ms; ulong rand_ms;
#endif #endif
bootstage_mark_name(BOOTSTAGE_ID_BOOTP_START, "bootp_start"); bootstage_mark_name(BOOTSTAGE_ID_BOOTP_START, "bootp_start");
...@@ -623,8 +623,7 @@ BootpRequest(void) ...@@ -623,8 +623,7 @@ BootpRequest(void)
rand_ms = rand() >> 19; rand_ms = rand() >> 19;
printf("Random delay: %ld ms...\n", rand_ms); printf("Random delay: %ld ms...\n", rand_ms);
for (i = 0; i < rand_ms; i++) mdelay(rand_ms);
udelay(1000); /*Wait 1ms*/
#endif /* CONFIG_BOOTP_RANDOM_DELAY */ #endif /* CONFIG_BOOTP_RANDOM_DELAY */
......
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