Skip to content
Commit 3a9a62a1 authored by Stefan Mavrodiev's avatar Stefan Mavrodiev Committed by Simon Glass
Browse files

common: fdt_support: Check mtdparts cell size



When using fdt_fixup_mtdparts() offset and length cell sizes
are limited to 4 bytes (1 cell). However if the mtd device is
bigger then 4GiB, then #address-cells and #size-cells are
8 bytes (2 cells) [1].

This patch read #size-cells and uses either fdt32_t or
fdt64_t cell size. The default is fdt32_t.

[1] Documentation/devicetree/bindings/mtd/partition.txt

Signed-off-by: default avatarStefan Mavrodiev <stefan@olimex.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 3bf2f153
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment