* [PATCH] xilinx: versal: Do not prioritize boot device if driver is not enabled
@ 2024-05-10 6:22 Michal Simek
2024-05-29 13:15 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2024-05-10 6:22 UTC (permalink / raw)
To: u-boot, git
Cc: Venkatesh Yadav Abbarapu, Polak, Leszek, Stefan Roese, Tom Rini
From: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
SOC can boot out of the device which is not accessible from APU and running
this is detected as a warning, as the device is not accessible.For example
getting below warning when the boot mode is OSPI and OSPI is not enabled in
device tree.
Invalid bus 0 (err=-19)
Failed to initialize SPI flash at 0:0 (error -19)
Ignoring the prioritization of the boot device which driver is not enabled
and continue with the default boot_targets. Recommendation is to use custom
boot_targets via environment file as is done for example for Kria via
zynqmp_kria.env file.
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
---
board/xilinx/versal/board.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 4f6d56119db1..f00605da7825 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -151,14 +151,29 @@ static int boot_targets_setup(void)
break;
case QSPI_MODE_24BIT:
puts("QSPI_MODE_24\n");
+ if (uclass_get_device_by_name(UCLASS_SPI,
+ "spi@f1030000", &dev)) {
+ debug("QSPI driver for QSPI device is not present\n");
+ break;
+ }
mode = "xspi0";
break;
case QSPI_MODE_32BIT:
puts("QSPI_MODE_32\n");
+ if (uclass_get_device_by_name(UCLASS_SPI,
+ "spi@f1030000", &dev)) {
+ debug("QSPI driver for QSPI device is not present\n");
+ break;
+ }
mode = "xspi0";
break;
case OSPI_MODE:
puts("OSPI_MODE\n");
+ if (uclass_get_device_by_name(UCLASS_SPI,
+ "spi@f1010000", &dev)) {
+ debug("OSPI driver for OSPI device is not present\n");
+ break;
+ }
mode = "xspi0";
break;
case EMMC_MODE:
--
2.44.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] xilinx: versal: Do not prioritize boot device if driver is not enabled
2024-05-10 6:22 [PATCH] xilinx: versal: Do not prioritize boot device if driver is not enabled Michal Simek
@ 2024-05-29 13:15 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2024-05-29 13:15 UTC (permalink / raw)
To: u-boot, git
Cc: Venkatesh Yadav Abbarapu, Polak, Leszek, Stefan Roese, Tom Rini
On 5/10/24 08:22, Michal Simek wrote:
> From: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
>
> SOC can boot out of the device which is not accessible from APU and running
> this is detected as a warning, as the device is not accessible.For example
> getting below warning when the boot mode is OSPI and OSPI is not enabled in
> device tree.
> Invalid bus 0 (err=-19)
> Failed to initialize SPI flash at 0:0 (error -19)
>
> Ignoring the prioritization of the boot device which driver is not enabled
> and continue with the default boot_targets. Recommendation is to use custom
> boot_targets via environment file as is done for example for Kria via
> zynqmp_kria.env file.
>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
>
> board/xilinx/versal/board.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
> index 4f6d56119db1..f00605da7825 100644
> --- a/board/xilinx/versal/board.c
> +++ b/board/xilinx/versal/board.c
> @@ -151,14 +151,29 @@ static int boot_targets_setup(void)
> break;
> case QSPI_MODE_24BIT:
> puts("QSPI_MODE_24\n");
> + if (uclass_get_device_by_name(UCLASS_SPI,
> + "spi@f1030000", &dev)) {
> + debug("QSPI driver for QSPI device is not present\n");
> + break;
> + }
> mode = "xspi0";
> break;
> case QSPI_MODE_32BIT:
> puts("QSPI_MODE_32\n");
> + if (uclass_get_device_by_name(UCLASS_SPI,
> + "spi@f1030000", &dev)) {
> + debug("QSPI driver for QSPI device is not present\n");
> + break;
> + }
> mode = "xspi0";
> break;
> case OSPI_MODE:
> puts("OSPI_MODE\n");
> + if (uclass_get_device_by_name(UCLASS_SPI,
> + "spi@f1010000", &dev)) {
> + debug("OSPI driver for OSPI device is not present\n");
> + break;
> + }
> mode = "xspi0";
> break;
> case EMMC_MODE:
Applied.
M
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-29 13:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-10 6:22 [PATCH] xilinx: versal: Do not prioritize boot device if driver is not enabled Michal Simek
2024-05-29 13:15 ` Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox