]> git.baikalelectronics.ru Git - uboot.git/commit
dtoc: Improve handling of reg properties
authorSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 03:17:27 +0000 (16:17 +1300)
committerSimon Glass <sjg@chromium.org>
Tue, 6 Apr 2021 04:33:19 +0000 (16:33 +1200)
commit43001bef369753069321e7afe9ea7feed13e31ed
tree637eaafb06d762d0a850504a3f5e0b8042022bcd
parent775499844bb9e196c6b5b9a096782cc74fd79c5d
dtoc: Improve handling of reg properties

This existing code assumes that a reg property is larger than one cell,
but this is not always the case. Fix this assumption.

Also if a node's parent is missing the #address-cells and #size-cells
properties we use 2 as a default for each. But this should not happen in
practice. More likely the properties were removed for SPL due to there
being no 'u-boot,dm-pre-reloc' property, or similar. Add a warning for
this as the failure can be very confusing.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/dtoc/dtb_platdata.py
tools/dtoc/test/dtoc_test_noprops.dts [new file with mode: 0644]
tools/dtoc/test/dtoc_test_single_reg.dts [new file with mode: 0644]
tools/dtoc/test_dtoc.py