aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2022-10-27 13:28:56 +0200
committerThierry Reding <treding@nvidia.com>2022-10-27 13:28:56 +0200
commit9fc45740bebd8c602bbae8693f3db9c2894e9d7c (patch)
tree4f2d0c3d8169cfa2faff3b69b750d369272ae639
parent5b9e2220d29ad249a02e9d2af32c0affbdbf2040 (diff)
downloadmaint-scripts-9fc45740bebd8c602bbae8693f3db9c2894e9d7c.tar.gz
check-sort-order: Special-case memory@80000000 node
On older device trees, the memory@80000000 node always comes first, so it needs to be special-cased. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--check-sort-order.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/check-sort-order.py b/check-sort-order.py
index 0a4779c..026d245 100644
--- a/check-sort-order.py
+++ b/check-sort-order.py
@@ -22,8 +22,11 @@ def check_node(filename, node, indent = 0):
if child.unit_address is not None:
if prev is not None:
if child.unit_address < prev.unit_address:
- print('ERROR: %s: %s < %s' % (filename, child, prev))
- break
+ if prev.name == 'memory' and prev.unit_address == 0x80000000:
+ if False:
+ print('WARNING: %s: %s < %s' % (filename, child, prev))
+ else:
+ print('ERROR: %s: %s < %s' % (filename, child, prev))
prev = child
@@ -31,6 +34,8 @@ def check_node(filename, node, indent = 0):
check_node(filename, child, indent + 2)
#dts = devicetree.compile(sys.argv[1])
+#with open(sys.argv[1] + '.tmp', 'w') as fobj:
+# fobj.write(dts)
#with open(sys.argv[1], 'r') as fobj:
# dts = fobj.read()