summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/spl-boot-order.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-rockchip/spl-boot-order.c')
-rw-r--r--arch/arm/mach-rockchip/spl-boot-order.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index c147d5821e..94673f34c9 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mmc.h>
#include <spl.h>
@@ -98,6 +99,12 @@ __weak const char *board_spl_was_booted_from(void)
void board_boot_order(u32 *spl_boot_list)
{
+ /* In case of no fdt (or only platdata), use spl_boot_device() */
+ if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) {
+ spl_boot_list[0] = spl_boot_device();
+ return;
+ }
+
const void *blob = gd->fdt_blob;
int chosen_node = fdt_path_offset(blob, "/chosen");
int idx = 0;