summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>2024-05-10 08:22:38 +0200
committerMichal Simek <michal.simek@amd.com>2024-06-17 16:02:29 +0200
commit454f948ff4828ebd5361e9976a8c51087d7cfab1 (patch)
treebb89dbbfeab916e3133b0c9f32d982f373fc05f6
parentfd5e18db0aedb7bc34b9c1c1ef20e653fd86cb6c (diff)
xilinx: versal: Do not prioritize boot device if driver is not enabled
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> Link: https://lore.kernel.org/r/8b7cca5c7b84cb4854104e0c48f8aa63c4ec5ace.1715322156.git.michal.simek@amd.com
-rw-r--r--board/xilinx/versal/board.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 77ba783501e..39474674cca 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -150,14 +150,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: