Lines Matching +full:dts +full:- +full:node
4 * SPDX-License-Identifier: GPL-2.0+
22 * spl_node_to_boot_device() - maps from a DT-node to a SPL boot device
23 * @node: of_offset of the node
26 * sources. These may take on a device-specific meaning, depending on
27 * what nodes are enabled in a DTS (e.g. BOOT_DEVICE_MMC1 may refer to
28 * different controllers/block-devices, depending on which SD/MMC controllers
29 * are enabled in any given DTS). This function maps from a DT-node back
33 * -ENOENT, if no device matching the node could be found
34 * -ENOSYS, if the device matching the node can not be mapped onto a
36 * -1, for unspecified failures
39 static int spl_node_to_boot_device(int node) in spl_node_to_boot_device() argument
45 * aware of the block-device layer. Until then (and to avoid unneeded in spl_node_to_boot_device()
46 * delays in getting this feature out, it lives at the board-level). in spl_node_to_boot_device()
48 if (!uclass_get_device_by_of_offset(UCLASS_MMC, node, &parent)) { in spl_node_to_boot_device()
62 return -ENOENT; in spl_node_to_boot_device()
64 switch (desc->devnum) { in spl_node_to_boot_device()
70 return -ENOSYS; in spl_node_to_boot_device()
80 if (!uclass_get_device_by_of_offset(UCLASS_SPI_FLASH, node, &parent)) in spl_node_to_boot_device()
86 if (!uclass_get_device_by_of_offset(UCLASS_MTD, node, &parent)) { in spl_node_to_boot_device()
100 return -ENOENT; in spl_node_to_boot_device()
102 switch (desc->devnum) { in spl_node_to_boot_device()
108 return -ENOSYS; in spl_node_to_boot_device()
115 * aware of the block-device layer. Until then (and to avoid unneeded in spl_node_to_boot_device()
116 * delays in getting this feature out, it lives at the board-level). in spl_node_to_boot_device()
118 if (!uclass_get_device_by_of_offset(UCLASS_RKNAND, node, &parent)) in spl_node_to_boot_device()
121 return -1; in spl_node_to_boot_device()
125 * board_spl_was_booted_from() - retrieves the of-path the SPL was loaded from
127 * To support a 'same-as-spl' specification in the search-order for the next
128 * stage, we need a SoC- or board-specific way to handshake with what 'came
138 debug("%s: no support for 'same-as-spl' for this board\n", __func__); in board_spl_was_booted_from()
144 const void *blob = gd->fdt_blob; in board_boot_order()
149 int node; in board_boot_order() local
161 "u-boot,spl-boot-order", elem, NULL)); in board_boot_order()
166 if (strncmp(conf, "same-as-spl", 11) == 0) { in board_boot_order()
178 node = fdt_path_offset(blob, conf); in board_boot_order()
179 if (node < 0) { in board_boot_order()
185 boot_device = spl_node_to_boot_device(node); in board_boot_order()
187 debug("%s: could not map node @%x to a boot-device\n", in board_boot_order()
188 __func__, node); in board_boot_order()