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 4FC88C433EF for ; Fri, 22 Oct 2021 06:48:36 +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 D407D60EE3 for ; Fri, 22 Oct 2021 06:48:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D407D60EE3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 A2A4E83473; Fri, 22 Oct 2021 08:48:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634885314; bh=QuIpKcdXR0zo6Tl5DkeQ/TYU9hKIuKVUiZ/DR7S4iR4=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FBI1A//W5dFcxt22Kbxqf6F20rP08/wYO4w4k/3XiE6aXaB4OIdO9gXDkStEb3f6C RC27PMipePy3A+No03fRnWtGZ9jrwuNoGvEyBWboIOWOZxDEWEFtH0hPj2hEIPsF0d qNAQSvmq2zyGC6v7H2kUYfBQ8hevkH/oLoHSSMQ6nUAJabruq4f0YoVfG6MoP0itcY 5UAkeZfvk0f8iZFXm7lmB24/obk8GPMunPdrBfvoHM2NpYmQ9cO6hPk16T0bCkldCn 0TkKuseGw2+4JUapMEAFePSIT9NFaxq7/Orc0lSgvrpse2T8TB+BpyiI3udlEV2v0v JlEPF+O8+1WnQ== Received: by phobos.denx.de (Postfix, from userid 109) id ABC0083473; Fri, 22 Oct 2021 08:48:31 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [91.198.250.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E5D70832AF for ; Fri, 22 Oct 2021 08:48:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4HbFL365XQzQk98; Fri, 22 Oct 2021 08:48:27 +0200 (CEST) Subject: Re: [PATCH] arm: mvebu: turris_omnia: Fix MTD partitions order for Linux To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= , u-boot@lists.denx.de References: <20211021155548.21099-1-pali@kernel.org> From: Stefan Roese Message-ID: Date: Fri, 22 Oct 2021 08:48:24 +0200 MIME-Version: 1.0 In-Reply-To: <20211021155548.21099-1-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D06C0184B 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 On 21.10.21 17:55, Pali Rohár wrote: > 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 Reviewed-by: Stefan Roese Thanks, Stefan > --- > 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; > > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de