mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
checks: Warn about missing #address-cells for interrupt parents
The device tree specification (v0.4) suggests that #address-cells is mandatory for interrupt parent nodes. If this property is missing, Linux will default to the value of 0. A number of device tree files rely on Linux' fallback and don't specify an explicit #address-cells as suggested by the specification. This can cause issues when these device trees are passed to software with a more pedantic interpretation of the DT spec. Add a warning when this case is detected so that device tree files can be fixed. Reported-by: Brad Griffis <bgriffis@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Message-ID: <20241213141438.3616902-1-thierry.reding@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
755db11535
commit
267efc7d46
1 changed files with 4 additions and 0 deletions
4
checks.c
4
checks.c
|
@ -1676,6 +1676,10 @@ static void check_interrupt_map(struct check *c,
|
||||||
cellprop = get_property(provider_node, "#address-cells");
|
cellprop = get_property(provider_node, "#address-cells");
|
||||||
if (cellprop)
|
if (cellprop)
|
||||||
parent_cellsize += propval_cell(cellprop);
|
parent_cellsize += propval_cell(cellprop);
|
||||||
|
else
|
||||||
|
FAIL_PROP(c, dti, node, irq_map_prop,
|
||||||
|
"Missing property '#address-cells' in node %s, using 0 as fallback",
|
||||||
|
provider_node->fullpath);
|
||||||
|
|
||||||
cell += 1 + parent_cellsize;
|
cell += 1 + parent_cellsize;
|
||||||
if (cell > map_cells)
|
if (cell > map_cells)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue