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 8CB5DC61D97 for ; Mon, 23 Jan 2023 10:06:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C228D85747; Mon, 23 Jan 2023 11:06:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com 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=bootlin.com header.i=@bootlin.com header.b="gd5ZCEIf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 12ED285707; Mon, 23 Jan 2023 11:06:17 +0100 (CET) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) (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 CFCD985717 for ; Mon, 23 Jan 2023 11:06:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=miquel.raynal@bootlin.com Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 085EA2000E; Mon, 23 Jan 2023 10:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1674468371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qhTtFs8BJboYc4x/DQh19/JUdYYmebA32b72UFPvV+8=; b=gd5ZCEIfDs/KCuZdMOIai+faC4NIaLXfxSDxQ2bgAUUupZuqlZ8SNwfbQfNFLvprPpAidE mcA94lxeisWG3dKcdHhZ1jAKFxNm5jimhxM4RRkRgM63ane9cX+jrQX12E6aZURTHw+epq DC039cl0/ckPxzVXZ/cJSARCCeN6X4nlMWf4kk/0NBAU37b2eC18SNFV2tiGFIf5tHdPHw FYCQwR8zGmTvFN0fQ7x/hcKQAn2xzh+wLMROU0CBNbtbsuypuoPeq6LMrBVTtQTIVNY74F EWiA63pgdrOYikAyc19WuqhTpHAXQyM61RYkz8eD45y61fKA41ozhH1wg/XM6A== Date: Mon, 23 Jan 2023 11:06:06 +0100 From: Miquel Raynal To: Tom Rini Cc: Francesco Dolcini , Simon Glass , u-boot@lists.denx.de, Marcel Ziswiler , Francesco Dolcini , Marek Vasut , linux-mtd@lists.infradead.org Subject: Re: [PATCH v1 0/3] fdt: Fix mtparts fixup Message-ID: <20230123110606.56110e40@xps-13> In-Reply-To: <20230113193411.GW3787616@bill-the-cat> References: <20230113184547.487322-1-francesco@dolcini.it> <20230113193411.GW3787616@bill-the-cat> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Hi Tom, trini@konsulko.com wrote on Fri, 13 Jan 2023 14:34:11 -0500: > On Fri, Jan 13, 2023 at 07:45:44PM +0100, Francesco Dolcini wrote: >=20 > > From: Francesco Dolcini > >=20 > > Recently we had a boot regression on colibri-imx7 because of a cleanup = change > > on Linux imx7.dtsi setting nand controller node #size-cells from 1 to 0. > >=20 > > Because of that Linux partition parser was no longer able to properly > > parse the OF partitions leading to a boot failure, the above change was > > reverted in the meantime as an immediate workaround, but some improveme= nt > > is required on both Linux and U-Boot. > >=20 > > This change improve the U-Boot part of it, #size-cell is set to 1 when > > it has an invalid value. This has the limitation to work only with devi= ces > > smaller than 4GiB. In general the suggestion from the Linux MTD maintai= ner would > > be to just deprecate using this U-Boot function and pass the MTD partit= ions > > from the command line, unless they are statically defined in the DTS fi= le > > in the first place. > >=20 > > This series therefore convert colibri-imx6ull and colibri-imx7 to pass = the > > partition list from the command line instead of fixing up the DT. > >=20 > > Link: https://lore.kernel.org/all/20221202071900.1143950-1-francesco@do= lcini.it/ > > Link: https://lore.kernel.org/all/Y4dgBTGNWpM6SQXI@francesco-nb.int.tor= adex.com/ =20 >=20 > My higher level question / concern here is, is using one of the dts > partition schemes still valid / preferred, or should everyone now have > reverted to passing via the kernel command line? If device tree still, > is mtd/partitions/fixed-partitions.yaml the one to follow or something > else? I don't think we can "prefer" one mode over the other between cmdline and DTS. Both should work pretty well. Of course on the cmdline you can only define fixed partitions and many devices require more advanced parsers, which are only available through DTS, but for simple partitions, it works totally okay. The only thing that I would like to avoid is the need to write code in the bootloaders to tweak the FDT in order to add partitions. That is clearly not needed, error prone, and do not follow evolution of the "standard", as we just discovered. Thanks, Miqu=C3=A8l