Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp478762imm; Wed, 6 Jun 2018 00:29:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIMZFOBQ+TZdrvbBqR6BmId+hYCF27cUPQ5C91lYB3cAoxLWFWQEPwVsTM7klOo8pjO1gyG X-Received: by 2002:a65:6250:: with SMTP id q16-v6mr1688614pgv.113.1528270181056; Wed, 06 Jun 2018 00:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528270181; cv=none; d=google.com; s=arc-20160816; b=GnnjvTSY468dFbMwnJYA8moBQWWRgU8DYk6Wo1+ajXOzVRIQtYsBIO8Onub7VBTq6O oLHP9ecp3/UY1MOrtZsRx3CAqjt9ETABkhpQox7WrN2Yv0SvJvt9MPJbg3mF3M1lwZP6 fuetkALyCkRgJSAlGf1Bn1V9u06dasgeOqTIhsSqP6Edn3DXykFP+GjN+ZALqscvP8kO ndYNT77K6rX8HCVNqKA2MuXU6A24oCo+KGAAuymWML7D0ukhvhniKYUzwMoeJMLKjmj6 cwbheNkPnYxfAQ6905id0d2PHoKuU9lyyOVupywPO0Gh+GoD7o57dbAPpgKxmboXGeeO n+Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=d8XHzl3JVc5CrUqnqa0o3HkfaRngZOk0lBoLNaihIhg=; b=yVtgmi2lts/nrjBd0zHaDNKJ/wO0t6EW6g9cpK8szxGHo/ys3pI/7ieeVziWJ5h7TK ok5NS722M9u9YGCwSsvqw3k2fA+m8x/zOzSQp1TPK9e3IWGOI+MMhoLoSDi/n0gH04yQ eIYRHGm3jTT6/JWbaQjm3q0fQNWB0ocA40nUcc5J/6mX8VhM6MX5G9i8Sipoo2Kea60t cXKgyxLtotoYN94riEUVQowTa41giqXZuB/5fde7udDedpJKDVXTjwm3QMhrYlbvlAm4 RaFcbV7lZNY+hegDT8nkXBB/+z3/+Ssc3h+2XKS33e6Wf4UwgFo5/zSmCW9U/ohmoYF7 7J9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si16199979plb.27.2018.06.06.00.29.25; Wed, 06 Jun 2018 00:29:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932134AbeFFH2s (ORCPT + 99 others); Wed, 6 Jun 2018 03:28:48 -0400 Received: from mail.bootlin.com ([62.4.15.54]:38419 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932122AbeFFH2r (ORCPT ); Wed, 6 Jun 2018 03:28:47 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 4C74E20799; Wed, 6 Jun 2018 09:28:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-125-111.w90-88.abo.wanadoo.fr [90.88.63.111]) by mail.bootlin.com (Postfix) with ESMTPSA id C413C203B0; Wed, 6 Jun 2018 09:28:44 +0200 (CEST) Date: Wed, 6 Jun 2018 09:28:44 +0200 From: Boris Brezillon To: Rob Herring Cc: Stefan Agner , dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, mark.rutland@arm.com, thierry.reding@gmail.com, dev@lynxeye.de, miquel.raynal@bootlin.com, richard@nod.at, marcel@ziswiler.com, krzk@kernel.org, digetx@gmail.com, benjamin.lindqvist@endian.se, jonathanh@nvidia.com, pdeschrijver@nvidia.com, pgaikwad@nvidia.com, mirza.krak@gmail.com, linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/6] mtd: rawnand: add an option to specify NAND chip as a boot device Message-ID: <20180606092844.3ab746b2@bbrezillon> In-Reply-To: <20180605201102.GA22487@rob-hp-laptop> References: <20180531221637.6017-1-stefan@agner.ch> <20180531221637.6017-3-stefan@agner.ch> <20180605201102.GA22487@rob-hp-laptop> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On Tue, 5 Jun 2018 14:11:02 -0600 Rob Herring wrote: > On Fri, Jun 01, 2018 at 12:16:33AM +0200, Stefan Agner wrote: > > Allow to define a NAND chip as a boot device. This can be helpful > > for the selection of the ECC algorithm and strength in case the boot > > ROM supports only a subset of controller provided options. > > > > Signed-off-by: Stefan Agner > > --- > > Documentation/devicetree/bindings/mtd/nand.txt | 4 ++++ > > drivers/mtd/nand/raw/nand_base.c | 3 +++ > > include/linux/mtd/rawnand.h | 6 ++++++ > > 3 files changed, 13 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt > > index 8bb11d809429..8daf81b9748c 100644 > > --- a/Documentation/devicetree/bindings/mtd/nand.txt > > +++ b/Documentation/devicetree/bindings/mtd/nand.txt > > @@ -43,6 +43,10 @@ Optional NAND chip properties: > > This is particularly useful when only the in-band area is > > used by the upper layers, and you want to make your NAND > > as reliable as possible. > > +- nand-is-boot-medium: Whether the NAND chip is a boot medium. Drivers might use > > + this information to select ECC algorithms supported by > > + the boot ROM or similar restrictions. > > + > > Shouldn't this be a partition level option? You could conceivably do one > ECC type for boot area and something else for the rest of the NAND. I tried that a long time ago [1]. The result was far from perfect. I'm not saying it's impossible to do it, but it definitely requires a lot of work if we want to do it properly. Also, what about boards that are not defining their partitions in the DT but through the command line (using mtdparts)? That means patching the mtdparts part parser to also take the ECC setup into account. Regards, Boris [1]http://lists.infradead.org/pipermail/linux-mtd/2015-July/060600.html