From cf5bdd4446135319cf5a5e1fe2e9770f0f623324 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 2 Apr 2007 20:26:04 +0000 Subject: [PATCH] Loop on sdcard init. This helps if one hasn't plugged in the card fast enough, or there's other issues that cause the first try to fail. --- sys/boot/arm/at91/boot2/boot2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/boot/arm/at91/boot2/boot2.c b/sys/boot/arm/at91/boot2/boot2.c index d336f40f001f..ffb524a86c63 100644 --- a/sys/boot/arm/at91/boot2/boot2.c +++ b/sys/boot/arm/at91/boot2/boot2.c @@ -148,8 +148,9 @@ main(void) board_init(); EMAC_Init(); - sdcard_init(); EMAC_SetMACAddress(mac); + while (sdcard_init() == 0) + printf("Looking for SD card\n"); dmadat = (void *)(0x20000000 + (16 << 20)); /* Process configuration file */