]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: xilinx: add SPL boot device support
authorPadmarao Begari <padmarao.begari@amd.com>
Wed, 3 Dec 2025 07:36:59 +0000 (08:36 +0100)
committerMichal Simek <michal.simek@amd.com>
Fri, 19 Dec 2025 07:25:27 +0000 (08:25 +0100)
Add board_boot_order() function and remove spl_boot_device()
function because it is called from weak board_boot_order().

Add support to U-Boot SPL for booting from RAM or SPI, as
configured in defconfig.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a1f26a9392128309a1affed28b14809845714c21.1764747417.git.michal.simek@amd.com
board/xilinx/mbv/board.c

index ed3fe16af7b9024aaa298f8342fa199218c0732a..2b0005955ca5a7a21523b4c865ac64261512d713 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * (C) Copyright 2023, Advanced Micro Devices, Inc.
+ * (C) Copyright 2023-2025, Advanced Micro Devices, Inc.
  *
  * Michal Simek <michal.simek@amd.com>
  */
@@ -8,9 +8,15 @@
 #include <spl.h>
 
 #ifdef CONFIG_SPL
-u32 spl_boot_device(void)
+void board_boot_order(u32 *spl_boot_list)
 {
-       /* RISC-V QEMU only supports RAM as SPL boot device */
-       return BOOT_DEVICE_RAM;
+       u32 i = 0;
+
+       if (CONFIG_IS_ENABLED(SPI_FLASH_SUPPORT))
+               spl_boot_list[i++] = BOOT_DEVICE_SPI;
+
+       if (CONFIG_IS_ENABLED(RAM_SUPPORT))
+               spl_boot_list[i++] = BOOT_DEVICE_RAM;
+
 }
 #endif