dtoc: Make properties dirty when purging them
Without the 'dirty' flag properties are not written back to the
devicetree when synced. This means that new properties copied over to a
node are not always written out.
Fix this and add a test.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/dtoc/test/dtoc_test_copy.dts b/tools/dtoc/test/dtoc_test_copy.dts
index 36faa9b..8e50c75 100644
--- a/tools/dtoc/test/dtoc_test_copy.dts
+++ b/tools/dtoc/test/dtoc_test_copy.dts
@@ -37,11 +37,12 @@
new-prop;
};
- second1 {
+ second1: second1 {
new-prop;
};
second4 {
+ use_second1 = <&second1>;
};
};
};
@@ -65,12 +66,13 @@
};
second: second {
- second1 {
+ second_1_bad: second1 {
some-prop;
};
second2 {
some-prop;
+ use_second1_bad = <&second_1_bad>;
};
};
};