Skip to content

Commit 75f1f31

Browse files
committed
Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'"
This reverts commit 267b21d. Turns out some DTs do depend on this behavior. Specifically, a downstream Pixel 6 DT. Revert the change at least until we can decide if the DT spec can be changed instead. Cc: [email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 038e33f commit 75f1f31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: drivers/of/of_reserved_mem.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam
415415

416416
prop = of_get_flat_dt_prop(node, "alignment", &len);
417417
if (prop) {
418-
if (len != dt_root_size_cells * sizeof(__be32)) {
418+
if (len != dt_root_addr_cells * sizeof(__be32)) {
419419
pr_err("invalid alignment property in '%s' node.\n",
420420
uname);
421421
return -EINVAL;
422422
}
423-
align = dt_mem_next_cell(dt_root_size_cells, &prop);
423+
align = dt_mem_next_cell(dt_root_addr_cells, &prop);
424424
}
425425

426426
nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL;

0 commit comments

Comments
 (0)