]>
git.ipfire.org Git - people/ms/u-boot.git/blob - common/common_fit.c
2 * Copyright (C) 2016 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
14 ulong
fdt_getprop_u32(const void *fdt
, int node
, const char *prop
)
19 cell
= fdt_getprop(fdt
, node
, prop
, &len
);
20 if (!cell
|| len
!= sizeof(*cell
))
23 return fdt32_to_cpu(*cell
);
27 * Iterate over all /configurations subnodes and call a platform specific
28 * function to find the matching configuration.
29 * Returns the node offset or a negative error number.
31 int fit_find_config_node(const void *fdt
)
36 conf
= fdt_path_offset(fdt
, FIT_CONFS_PATH
);
38 debug("%s: Cannot find /configurations node: %d\n", __func__
,
42 for (node
= fdt_first_subnode(fdt
, conf
);
44 node
= fdt_next_subnode(fdt
, node
)) {
45 name
= fdt_getprop(fdt
, node
, "description", &len
);
47 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
48 printf("%s: Missing FDT description in DTB\n",
53 if (board_fit_config_name_match(name
))
56 debug("Selecting config '%s'", name
);