All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zynq/spl: Explain unsupported boot mode more
@ 2020-01-23  8:28 Olliver Schinagl
  0 siblings, 0 replies; only message in thread
From: Olliver Schinagl @ 2020-01-23  8:28 UTC (permalink / raw
  To: u-boot

When hit with an 'unsupported boot mode' error, a user would be happy to
know more, or the why. What boot mode is being tried. Was it as
expected. Since we know the selected boot mode at the point of failure,
lets print it so we have a better chance at figuring out what went
wrong.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
---
 arch/arm/mach-zynq/spl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 96ba90fb7a..4cc0324ba6 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -40,8 +40,10 @@ void spl_board_init(void)
 u32 spl_boot_device(void)
 {
 	u32 mode;
+	u8 boot_mode;
 
-	switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
+	boot_mode = (zynq_slcr_get_boot_mode() & ZYNQ_BM_MASK);
+	switch (boot_mode) {
 #ifdef CONFIG_SPL_SPI_SUPPORT
 	case ZYNQ_BM_QSPI:
 		puts("qspi boot\n");
@@ -64,7 +66,7 @@ u32 spl_boot_device(void)
 		mode = BOOT_DEVICE_RAM;
 		break;
 	default:
-		puts("Unsupported boot mode selected\n");
+		printf("Unsupported boot mode selected: 0x%x.\n", boot_mode);
 		hang();
 	}
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-23  8:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-23  8:28 [PATCH] zynq/spl: Explain unsupported boot mode more Olliver Schinagl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.