dtoc: Support widening a bool value
authorSimon Glass <sjg@chromium.org>
Thu, 29 Jul 2021 01:23:11 +0000 (19:23 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 1 Aug 2021 15:05:24 +0000 (09:05 -0600)
commiteec44c7218a3c3ce924a282cc46a59e83feb9de1
tree2508a115df4604adc9395b4f72e8ec3ec8fff90f
parentca04494d76bf1152cd9ab1f67af5101c86e0824f
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>
arch/sandbox/dts/sandbox.dtsi
test/dm/of_platdata.c
tools/dtoc/fdt.py
tools/dtoc/test/dtoc_test_simple.dts
tools/dtoc/test_dtoc.py
tools/dtoc/test_fdt.py