Lines Matching +full:dts +full:- +full:node
1 // SPDX-License-Identifier: GPL-2.0+
13 * spl_node_to_boot_device() - maps from a DT-node to a SPL boot device
14 * @node: of_offset of the node
17 * sources. These may take on a device-specific meaning, depending on
18 * what nodes are enabled in a DTS (e.g. BOOT_DEVICE_MMC1 may refer to
19 * different controllers/block-devices, depending on which SD/MMC controllers
20 * are enabled in any given DTS). This function maps from a DT-node back
24 * -ENOENT, if no device matching the node could be found
25 * -ENOSYS, if the device matching the node can not be mapped onto a
27 * -1, for unspecified failures
31 static int spl_node_to_boot_device(int node) in spl_node_to_boot_device() argument
37 * aware of the block-device layer. Until then (and to avoid unneeded in spl_node_to_boot_device()
38 * delays in getting this feature out, it lives at the board-level). in spl_node_to_boot_device()
40 if (!uclass_get_device_by_of_offset(UCLASS_MMC, node, &parent)) { in spl_node_to_boot_device()
54 return -ENOENT; in spl_node_to_boot_device()
56 switch (desc->devnum) { in spl_node_to_boot_device()
62 return -ENOSYS; in spl_node_to_boot_device()
64 } else if (!uclass_get_device_by_of_offset(UCLASS_SPI_FLASH, node, in spl_node_to_boot_device()
75 if (!uclass_get_device_by_of_offset(UCLASS_SPI_FLASH, node, &parent)) in spl_node_to_boot_device()
78 return -1; in spl_node_to_boot_device()
82 * board_spl_was_booted_from() - retrieves the of-path the SPL was loaded from
84 * To support a 'same-as-spl' specification in the search-order for the next
85 * stage, we need a SoC- or board-specific way to handshake with what 'came
95 debug("%s: no support for 'same-as-spl' for this board\n", __func__); in board_spl_was_booted_from()
101 const void *blob = gd->fdt_blob; in board_boot_order()
106 int node; in board_boot_order() local
118 "u-boot,spl-boot-order", elem, NULL)); in board_boot_order()
123 if (strncmp(conf, "same-as-spl", 11) == 0) { in board_boot_order()
135 node = fdt_path_offset(blob, conf); in board_boot_order()
136 if (node < 0) { in board_boot_order()
142 boot_device = spl_node_to_boot_device(node); in board_boot_order()
144 debug("%s: could not map node @%x to a boot-device\n", in board_boot_order()
145 __func__, node); in board_boot_order()