common: Move some board functions out of common.h
[oweals/u-boot.git] / arch / arm / mach-rockchip / spl-boot-order.c
index 843998dfdcb8d256bbb5966761273e40805646c6..fa8e096426b68cafb0a95977ffcb2c00130e0ae8 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <common.h>
@@ -9,7 +8,7 @@
 #include <mmc.h>
 #include <spl.h>
 
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_LIBFDT)
 /**
  * spl_node_to_boot_device() - maps from a DT-node to a SPL boot device
  * @node:      of_offset of the node
@@ -62,6 +61,9 @@ static int spl_node_to_boot_device(int node)
                default:
                        return -ENOSYS;
                }
+       } else if (!uclass_get_device_by_of_offset(UCLASS_SPI_FLASH, node,
+               &parent)) {
+               return BOOT_DEVICE_SPI;
        }
 
        /*
@@ -132,7 +134,7 @@ void board_boot_order(u32 *spl_boot_list)
                /* Try to resolve the config item (or alias) as a path */
                node = fdt_path_offset(blob, conf);
                if (node < 0) {
-                       debug("%s: could not find %s in FDT", __func__, conf);
+                       debug("%s: could not find %s in FDT\n", __func__, conf);
                        continue;
                }