aboutsummaryrefslogtreecommitdiff
path: root/lib/fdtdec.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-12-23 18:10:15 -0500
committerTom Rini <trini@konsulko.com>2020-12-23 18:10:15 -0500
commit958b9e2482538ebfeb2e1161257603d4dec498cb (patch)
tree6b9283b58c8684a239d25492c2e8a8b1319be8ca /lib/fdtdec.c
parent8351a29d2df18c92d8e365cfa848218c3859f3d2 (diff)
parentec1add1e51affd4aacc308dc37439ea13dc1b70e (diff)
Merge tag 'dm-next-23dec20' of git://git.denx.de/u-boot-dm into next
dm: New sequence number implementation SPI handling of bus with different-speed devices patman supression of sign-offs
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r--lib/fdtdec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index ee1bd41b08..0ab7105fef 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -500,6 +500,17 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int offset,
slash = strrchr(prop, '/');
if (strcmp(slash + 1, find_name))
continue;
+
+ /*
+ * Adding an extra check to distinguish DT nodes with
+ * same name
+ */
+ if (IS_ENABLED(CONFIG_PHANDLE_CHECK_SEQ)) {
+ if (fdt_get_phandle(blob, offset) !=
+ fdt_get_phandle(blob, fdt_path_offset(blob, prop)))
+ continue;
+ }
+
val = trailing_strtol(name);
if (val != -1) {
*seqp = val;