summaryrefslogtreecommitdiff
path: root/tools/dtoc/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-07-28 19:23:11 -0600
committerSimon Glass <sjg@chromium.org>2021-08-01 09:05:24 -0600
commiteec44c7218a3c3ce924a282cc46a59e83feb9de1 (patch)
tree2508a115df4604adc9395b4f72e8ec3ec8fff90f /tools/dtoc/test
parentca04494d76bf1152cd9ab1f67af5101c86e0824f (diff)
dtoc: Support widening a bool value
At present if we see 'ranges' property (with no value) we assume it is a boolean, as per the devicetree spec. But another node may define 'ranges' with a value, forcing us to widen it to an int array. At present this is not supported and causes an error. Fix this and add some test cases. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/dtoc/test')
-rw-r--r--tools/dtoc/test/dtoc_test_simple.dts2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/dtoc/test/dtoc_test_simple.dts b/tools/dtoc/test/dtoc_test_simple.dts
index b5c1274bb7c..5a6fa88d5cc 100644
--- a/tools/dtoc/test/dtoc_test_simple.dts
+++ b/tools/dtoc/test/dtoc_test_simple.dts
@@ -14,6 +14,7 @@
u-boot,dm-pre-reloc;
compatible = "sandbox,spl-test";
boolval;
+ maybe-empty-int = <>;
intval = <1>;
intarray = <2 3 4>;
byteval = [05];
@@ -42,6 +43,7 @@
compatible = "sandbox,spl-test";
stringarray = "one";
longbytearray = [09 0a 0b 0c 0d 0e 0f 10];
+ maybe-empty-int = <1>;
};
i2c@0 {