[Pdbg] [PATCH v2 05/22] libpdbg: Support paths including virutal nodes
Amitay Isaacs
amitay at ozlabs.org
Fri Sep 20 15:16:34 AEST 2019
With the presence of virtual nodes, some of the nodes can be reached
from the root using different paths:
- using virtual nodes (which provide the system device tree view)
- using the actual hwunits present in the backend (backend device tree)
Both device tree paths should result in the same hardware unit.
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/device.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libpdbg/device.c b/libpdbg/device.c
index 6e2e7bb..cba4475 100644
--- a/libpdbg/device.c
+++ b/libpdbg/device.c
@@ -294,7 +294,10 @@ static struct pdbg_target *dt_find_by_path(struct pdbg_target *root, const char
if (pal && (pal != nal || strncmp(pa, na, pal)))
match = false;
if (match) {
- root = n;
+ if (!n->compatible && n->vnode)
+ root = n->vnode;
+ else
+ root = n;
break;
}
}
--
2.21.0
More information about the Pdbg
mailing list