boothang: Reset the board when we can't boot from anything

Additionally enables debugging output from
mmc_load_image_raw_sector.

Change-Id: I278ae63a71ce67712fe6fc916250ce3bc9a91aed
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 88d4b8a..f42e613 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -615,7 +615,16 @@
 	if (boot_from_devices(&spl_image, spl_boot_list,
 			      ARRAY_SIZE(spl_boot_list))) {
 		puts(SPL_TPL_PROMPT "failed to boot from all boot devices\n");
-		hang();
+		puts ("resetting ...\n");
+
+		udelay (50000);    /* wait 50 ms */
+		disable_interrupts();
+
+		reset_misc();
+		reset_cpu(0);
+
+		/*NOTREACHED*/
+		return 0;
 	}
 
 	spl_perform_fixups(&spl_image);
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 3e3c43b..ed12252 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -67,7 +67,7 @@
 
 	/* read image header to find the image size & load address */
 	count = blk_dread(bd, sector, 1, header);
-	debug("hdr read sector %lx, count=%lu\n", sector, count);
+	printf("hdr read sector %lx, count=%lu\n", sector, count);
 	if (count == 0) {
 		ret = -EIO;
 		goto end;