Skip to content

Commit

Permalink
lk2nd-device: Only parse a single qcom,board-id from device tree
Browse files Browse the repository at this point in the history
If there are multiple we have no way to figure out which one is the
right one for the device. In that case we should assume that it is
already correct.
  • Loading branch information
stephan-gh committed Jan 24, 2021
1 parent 1555ff0 commit 47e2951
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/aboot/lk2nd-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ static void lk2nd_fdt_parse(void)
if (dev_tree_get_board_id(fdt, 0, &lk2nd_dev.board_id) == 0)
update_board_id(&lk2nd_dev.board_id);
else
dprintf(INFO, "No valid qcom,board-id in device tree\n");
dprintf(INFO, "No valid (or multiple) qcom,board-id in device tree\n");

lk2nd_dev.cmdline = dev_tree_get_boot_args(fdt);
if (lk2nd_dev.cmdline) {
Expand Down
2 changes: 1 addition & 1 deletion platform/msm_shared/dev_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ int dev_tree_get_board_id(const void *fdt, int offset, struct board_id *board_id
}

board_prop = (const struct board_id*) fdt_getprop(fdt, offset, "qcom,board-id", &len);
if (!board_prop || len < BOARD_ID_SIZE)
if (!board_prop || len != BOARD_ID_SIZE)
return 1;

board_id->variant_id = fdt32_to_cpu(board_prop->variant_id);
Expand Down

0 comments on commit 47e2951

Please sign in to comment.