Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932536AbdCaFGl (ORCPT ); Fri, 31 Mar 2017 01:06:41 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:53808 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751120AbdCaFGj (ORCPT ); Fri, 31 Mar 2017 01:06:39 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com v2V56XIv001417 X-Nifty-SrcIP: [209.85.213.173] MIME-Version: 1.0 In-Reply-To: <20170330160238.59e5a2c1@bbrezillon> References: <1490856383-31560-1-git-send-email-yamada.masahiro@socionext.com> <1490856383-31560-15-git-send-email-yamada.masahiro@socionext.com> <20170330160238.59e5a2c1@bbrezillon> From: Masahiro Yamada Date: Fri, 31 Mar 2017 14:06:32 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 14/37] mtd: nand: denali: support "nand-ecc-strength" DT property To: Boris Brezillon Cc: linux-mtd@lists.infradead.org, Enrico Jorns , Artem Bityutskiy , Dinh Nguyen , Marek Vasut , Graham Moore , David Woodhouse , Masami Hiramatsu , Chuanxiao Dong , Jassi Brar , devicetree@vger.kernel.org, Linux Kernel Mailing List , Brian Norris , Richard Weinberger , Cyrille Pitchen , Rob Herring , Mark Rutland Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1426 Lines: 50 Hi Boris, 2017-03-30 23:02 GMT+09:00 Boris Brezillon : > On Thu, 30 Mar 2017 15:46:00 +0900 > Masahiro Yamada wrote: > >> Historically, this driver tried to choose as big ECC strength as >> possible, but it would be reasonable to allow DT to set a particular >> ECC strength with "nand-ecc-strength" property. This is useful >> when a particular ECC setting is hard-coded by firmware (or hard- >> wired by boot ROM). >> >> If no ECC strength is specified in DT, "nand-ecc-maximize" is implied >> since this was the original behavior. > > You said there is currently no DT users, Right. No DT users ever in upstream. > so how about changing the > "fallback to ECC maximization" behavior for DT users, and instead of > maximizing the ECC strength take the NAND requirements into account > (chip->ecc_strength_ds). This is difficult to judge in some cases. As I said before, 4/512 and 8/1024 are not equivalent. If chip's requirement chip->ecc_step_ds matches to the ecc->size supported by the controller, this is easy. If a chip requests 1024B, then the controller can only support 512B chunk (or vice versa), it is difficult to simply compare ecc strength. Is it a bad thing if we use too strong ECC strength? The disadvantage I see is we will have less OOB-free bytes, but this will not be fatal, I guess. -- Best Regards Masahiro Yamada