From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CACBC00144 for ; Mon, 1 Aug 2022 10:03:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 414D18414A; Mon, 1 Aug 2022 12:03:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="RXoKnmkj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4565B844B7; Mon, 1 Aug 2022 12:03:24 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1FF31810E8 for ; Mon, 1 Aug 2022 12:03:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C4C0261122; Mon, 1 Aug 2022 10:03:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08FA8C433D6; Mon, 1 Aug 2022 10:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659348200; bh=4rCAPCdOluv7nKHr8o6XEE+Qyy1lMIWaKowZjyoypcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RXoKnmkj1QrQuHsSUcr8C0KODr0fN/70NO6RIgBhX6826Yvk2m5R5xEEG7QFAFTMv 9J06haQYHFIOmc5uOi5KUWd0aeYwpuy/3d46yKQu5zPSVurQalgOSXnuhu1D8CtA/b AOiXmWP6J9f28/PQnbwGBCDfWtBKqOL/6Tl/E/Tns35teZQHVjKcwlEbQxQEPrc1re SJRREnSq/LY3sTybs5CWHFvgq3YbRnwi/08OVyVNrUgdHhbVPUWLZ6WO9RdQwYEwe4 zt13jJ7COK1ytBpULmPOqLoKN+5lzbmtmblMOugceKXbrPpiGlP5+BdQ3JcFU1JoI8 nrbKdRmc/sWSg== Received: by pali.im (Postfix) id 10341CD7; Mon, 1 Aug 2022 12:03:17 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , =?UTF-8?q?Marek=20Beh=C3=BAn?= Cc: u-boot@lists.denx.de Subject: [PATCH 2/2] arm: mvebu: turris_omnia: Increase fdt size in fixup_mtd_partitions Date: Mon, 1 Aug 2022 12:02:20 +0200 Message-Id: <20220801100220.24017-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220801100220.24017-1-pali@kernel.org> References: <20220801100220.24017-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 --- board/CZ.NIC/turris_omnia/turris_omnia.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index d836ac94ec29..108d160f486d 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -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; -- 2.20.1