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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C514C433F5 for ; Thu, 21 Oct 2021 15:56:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A31B661056 for ; Thu, 21 Oct 2021 15:56:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A31B661056 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB6B88346A; Thu, 21 Oct 2021 17:56:35 +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="V4hS0R/b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 93B10834A2; Thu, 21 Oct 2021 17:56:33 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 CDDC98346A for ; Thu, 21 Oct 2021 17:56:29 +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: by mail.kernel.org (Postfix) with ESMTPSA id 6F9FC60F50; Thu, 21 Oct 2021 15:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634831786; bh=3vaNG+XQiDvdYOinAAi2SToriy6y+5Fa86hoTLXGw/I=; h=From:To:Cc:Subject:Date:From; b=V4hS0R/boJOROvWbVKfsAwQ9RpauhCqi2dRFm91orrAVUOd4wBzeYtZPzl691iut8 AeAilaa61h/9a2V1QOFJHffwKBQy/uq2YcMx9xBhYRV8+KbU4Pw++LdVhtWOsTtEud aCOkcPAkLagZ9hE7zynS/BTsufsw9xUyNq1UG+BcpZgW6mpEq5mecvcvzuiYmGPspv hwrqnIY3Wbepd9Lw1kAVeo4DLPfjDKox7igpfM6/HtDTUISMreoV1pmBKQZwChElik ByOiS30Ut0xyuZilxm97gQKDMdqlEJa/AW62OGfj0Vih47Z/3kzeNZBADZiVINWY0s xRtEz9kUafIlQ== Received: by pali.im (Postfix) id 171AC85E; Thu, 21 Oct 2021 17:56:24 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , u-boot@lists.denx.de Subject: [PATCH] arm: mvebu: turris_omnia: Fix MTD partitions order for Linux Date: Thu, 21 Oct 2021 17:55:48 +0200 Message-Id: <20211021155548.21099-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 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.34 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.2 at phobos.denx.de X-Virus-Status: Clean Linux enumerates MTD partitions in DTB order, while the fdt_add_subnode() function puts a new subnode at the beginning. To fix this, put MTD partitions into DTB in reverse order. Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB") Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index a48e1f5c305d..d2f510993449 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -601,7 +601,7 @@ static bool fixup_mtd_partitions(void *blob, int offset, struct mtd_info *mtd) mtd_probe_devices(); - list_for_each_entry(slave, &mtd->partitions, node) { + list_for_each_entry_reverse(slave, &mtd->partitions, node) { char name[32]; int part; -- 2.20.1