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 49B7FC38142 for ; Mon, 23 Jan 2023 10:52:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2AA7B85714; Mon, 23 Jan 2023 11:52:16 +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="NIq+KnRo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4CBE9851B7; Mon, 23 Jan 2023 11:52:13 +0100 (CET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 364D8851B7 for ; Mon, 23 Jan 2023 11:52:10 +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 D7F59C0015; Mon, 23 Jan 2023 10:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1674471129; 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=Em+wh7EuKAACsoEuy6n7AqkIrScyansnkvjPyxJcJRY=; b=NIq+KnRoX/3ITSDDsBq7KFI9CIGvBrKB3A19Cm03z0neNCcYw3VfxGFpL7aRmGfWFYX1/p eM7S5XrCG0IeFODoio6PXAtyUMFwNnoV9ca2j6/5mIgWYWI58zmITL/O0T7Hwz3wHj/TJf j+UWLDE1VibdugYvR9VjEWL1cqYwiAiT1fpFSASjafG5S1c+FMw4oGfgXrfSaEbq8Blbaa zoc9RYp82uqELzabBx/Vezk2NVgCX0y22M0q4vfjjaX2gMwsTQ34i0AW8Hlwg8w+W2hJNB 7J6vAko/tkWhUeQIYFlwB5FObbz6xD67RAzOh7VkcV5Udc6nN048d10w5LF5pQ== Date: Mon, 23 Jan 2023 11:52:07 +0100 From: Miquel Raynal To: Francesco Dolcini Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, Marek Vasut , Francesco Dolcini , u-boot@lists.denx.de, Greg Kroah-Hartman Subject: Re: [PATCH v2] mtd: parsers: ofpart: add workaround for #size-cells 0 Message-ID: <20230123115207.0f8e9a80@xps-13> In-Reply-To: References: <20230113184556.487405-1-francesco@dolcini.it> <20230123112808.6340a016@xps-13> 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 Francesco, francesco@dolcini.it wrote on Mon, 23 Jan 2023 11:35:37 +0100: > On Mon, Jan 23, 2023 at 11:28:08AM +0100, Miquel Raynal wrote: > > francesco@dolcini.it wrote on Fri, 13 Jan 2023 19:45:56 +0100: > > =20 > > > From: Francesco Dolcini > > >=20 > > > Add a mechanism to handle the case in which partitions are present as > > > direct child of the nand controller node and #size-cells is set to <0= >. > > >=20 > > > This could happen if the nand-controller node in the DTS is supposed = to > > > have #size-cells set to 0, but for some historical reason/bug it was = set > > > to 1 in the past, and the firmware (e.g. U-Boot) is adding the partit= ion > > > as direct children of the nand-controller defaulting to #size-cells > > > being to 1. > > >=20 > > > This prevents a real boot failure on colibri-imx7 that happened durin= g v6.1 > > > development cycles. > > >=20 > > > Link: https://lore.kernel.org/all/Y4dgBTGNWpM6SQXI@francesco-nb.int.t= oradex.com/ > > > Link: https://lore.kernel.org/all/20221202071900.1143950-1-francesco@= dolcini.it/ > > > Signed-off-by: Francesco Dolcini > > > Reviewed-by: Greg Kroah-Hartman > > > --- > > >=20 > > > Miquel, Marek: I do not expect this patch to be backported to stable,= however > > > I would expect that we do not backport nand-controller dts cleanups n= either. =20 > >=20 > > Okay. =20 >=20 > [snip] >=20 > > > + pr_warn("%s: ofpart partition %pOF (%pOF) #size-cells is wrongly = set to <0>, assuming <1> for parsing partitions.\n", > > > + master->name, pp, > > > + mtd_node); =20 > >=20 > > Why mtd_node on a new line? =20 >=20 > For some historical reason most of this file is like that, so I did the > same for consistency (to be honest when I did it I though it was _all_ > like that). >=20 > > Otherwise looks good to me. =20 > I can send a v2 with this changed. Yes please. Thanks for the U-Boot series by the way. Thanks, Miqu=C3=A8l