[U-Boot] [PATCH v2] spl: Change debug to printf for "Unsupported boot-device"

Stefan Roese sr at denx.de
Tue Nov 11 19:03:55 CET 2014


We had the problem on an AM33xx platform, that SPL detected an
unsupported boot-device. But since this message is a debug message
it took a bit of time to really know, where the hangup in SPL
resulted from. So let's change this debug message to a printf
and also print the detected boot-device that is not supported.
This makes debugging of such cases much easier.

Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Tom Rini <trini at ti.com>
---
v2:
- Added #if check so that the printf is only included when serial support
  is enabled.
- Compile tested on all ARM boards

 common/spl/spl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index d85bab3..cef7bca 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -216,7 +216,9 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 		break;
 #endif
 	default:
-		debug("SPL: Un-supported Boot Device\n");
+#if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
+		printf("SPL: Unsupported Boot Device %d\n", boot_device);
+#endif
 		hang();
 	}
 
-- 
2.1.3



More information about the U-Boot mailing list