From patchwork Thu Jan 23 08:28:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olliver Schinagl X-Patchwork-Id: 239956 List-Id: U-Boot discussion From: oliver at schinagl.nl (Olliver Schinagl) Date: Thu, 23 Jan 2020 09:28:38 +0100 Subject: [PATCH] zynq/spl: Explain unsupported boot mode more Message-ID: <20200123082838.23421-1-oliver@schinagl.nl> 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 --- 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(); }