mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 12:45:29 -05:00
dtc: Convert #address-cells and #size-cells related checks
This patch converts checks related to #address-cells and #size-cells to the new framework. Specifically, it reimplements the check that "reg" properties have a valid size based on the relevant #address-cells and #size-cells values. The new implementation uses the correct default value, unlike the old-style check which assumed the values were inherited by default. It also implements a new, similar test for "ranges" properties. Finally, since relying on the default values of these variables is considered not-good-practice these days, it implements a "style" check which will give a warning if the tree ever relies on the default values (that is if any node with either "reg" or "ranges" appears under a parent which has no #address-cells or #size-cells property).
This commit is contained in:
parent
e110920707
commit
7e089d9473
5 changed files with 164 additions and 51 deletions
|
|
@ -169,7 +169,9 @@ dtc_tests () {
|
|||
|
||||
run_test dtc-checkfails.sh address_cells_is_cell size_cells_is_cell interrupt_cells_is_cell -- -I dts -O dtb bad-ncells.dts
|
||||
run_test dtc-checkfails.sh device_type_is_string model_is_string status_is_string -- -I dts -O dtb bad-string-props.dts
|
||||
|
||||
run_test dtc-checkfails.sh reg_format ranges_format -- -I dts -O dtb bad-reg-ranges.dts
|
||||
run_test dtc-checkfails.sh ranges_format -- -I dts -O dtb bad-empty-ranges.dts
|
||||
run_test dtc-checkfails.sh avoid_default_addr_size -- -I dts -O dtb default-addr-size.dts
|
||||
}
|
||||
|
||||
while getopts "vt:m" ARG ; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue