]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: turris_omnia: Increase fdt size in fixup_mtd_partitions
authorPali Rohár <pali@kernel.org>
Mon, 1 Aug 2022 10:02:20 +0000 (12:02 +0200)
committerStefan Roese <sr@denx.de>
Tue, 9 Aug 2022 06:57:23 +0000 (08:57 +0200)
Sometimes fixup_mtd_partitions() prints during booting kernel error
"Failed fixing SPI NOR partitions!" because it does not have enough space
for creating all paritions nodes. So increase fdt size.

Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Marek Behún <kabel@kernel.org>
board/CZ.NIC/turris_omnia/turris_omnia.c

index 796c55f3c63e2a141f6a9117d1fb712e7f41399a..98bad11537d3b0816b830cd0f54bb57237831f9d 100644 (file)
@@ -979,6 +979,9 @@ static bool fixup_mtd_partitions(void *blob, int offset, struct mtd_info *mtd)
                        return false;
        }
 
+       if (fdt_increase_size(blob, 512) < 0)
+               return false;
+
        parts = fdt_add_subnode(blob, offset, "partitions");
        if (parts < 0)
                return false;