Skip to content

Commit 67759cf

Browse files
committed
of/fdt: Don't use default address cell sizes for address translation
FDT systems should never be relying on default cell sizes. It's been a warning in dtc since 2007. The behavior here doesn't even match the unflattened code which will walk the parent nodes looking for the cell size properties (also deprecated). Furthermore, the FDT address translation code is only used in one spot by SH and for earlycon which was added 2014 and certainly isn't used on Powerpc systems. Returning -1 values will result in an error message. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 01d0467 commit 67759cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/of/fdt_address.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ static void __init fdt_bus_default_count_cells(const void *blob, int parentoffse
5555
if (prop)
5656
*addrc = be32_to_cpup(prop);
5757
else
58-
*addrc = dt_root_addr_cells;
58+
*addrc = -1;
5959
}
6060

6161
if (sizec) {
6262
prop = fdt_getprop(blob, parentoffset, "#size-cells", NULL);
6363
if (prop)
6464
*sizec = be32_to_cpup(prop);
6565
else
66-
*sizec = dt_root_size_cells;
66+
*sizec = -1;
6767
}
6868
}
6969

0 commit comments

Comments
 (0)