
24 Apr
2019
24 Apr
'19
5:18 p.m.
On Tue, 23 Apr 2019 at 23:32, Stefan Mavrodiev stefan@olimex.com wrote:
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: Stefan Mavrodiev stefan@olimex.com
Changes for v2: - Use fdt_setprop_u64() and ..._u32() instead of fdt_setprop() - Add size value using fdt_appendprop_u64() and ..._u32()
common/fdt_support.c | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org