summaryrefslogtreecommitdiff
path: root/tools/dtoc/fdt.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-22 21:43:54 -0600
committerSimon Glass <sjg@chromium.org>2023-08-02 12:05:57 -0600
commit8df8b6d670e299764e28f07cc9a607a4309e7c44 (patch)
treeed09e9f94a064ca7ed9a6c62ce9c8d4793da6b8d /tools/dtoc/fdt.py
parent7155646b22a9ef41100cdee18f39cf353810788a (diff)
dtoc: Add some debugging when copying nodes
Show the operations being performed, when debugging is enabled. Convert a mistaken 'print' in test_copy_subnodes_from_phandles() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r--tools/dtoc/fdt.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 2589be990ae..f6a9dee0db1 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -249,6 +249,7 @@ class Prop:
"""
if self.dirty:
node = self._node
+ tout.debug(f'sync {node.path}: {self.name}')
fdt_obj = node._fdt._fdt_obj
node_name = fdt_obj.get_name(node._offset)
if node_name and node_name != node.name:
@@ -716,9 +717,13 @@ class Node:
'phandle' property is not copied since this might result in two nodes
with the same phandle, thus making phandle references ambiguous.
"""
+ tout.debug(f'copy to {self.path}: {src.path}')
for name, src_prop in src.props.items():
+ done = False
if name != 'phandle' and name not in self.props:
self.props[name] = Prop(self, None, name, src_prop.bytes)
+ done = True
+ tout.debug(f" {name}{'' if done else ' - ignored'}")
def copy_node(self, src):
"""Copy a node and all its subnodes into this node