Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1643841
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings |
| Date | Thu, 18 May 2017 08:30:01 +0200 |
| Message-ID | <tIn6F-68Z-1@gated-at.bofh.it> (permalink) |
| References | <txS49-oS-9@gated-at.bofh.it> <txS49-oS-13@gated-at.bofh.it> <tBh61-1ww-1@gated-at.bofh.it> <tEHQm-6QI-7@gated-at.bofh.it> <tHmPn-7IC-7@gated-at.bofh.it> |
| Dkim-Filter | OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com v4I6RCXx017662 |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1495088833; bh=Dd9e1wqbbQPveuZy33+aeC/NLe9Td3TE2LICz1mNZvE=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=twg1SIzIhgECio7DixqVf2a7xBupB/nL0cg+Wk0GyUm5YW3kOsjZXWxrtXFQ+P+hZ ZsiWeDXRxYtdNDApCIwjn5Qx1Tqglub/wZvewxAsBInZI5QMF98FsZJkDUwh9VN/Xh XvMkGzM5ITp37Fj63c250q6c9SwYQ54Nb1Al+fCUaXMKjijq38uHzeUsYP0Lu7ypKC AZ3HUoYEyceh862wNiIgQQou17bKI8d+C+XwvGH8o30I1TcFN7lTcaVxTxVi21xAuB 10Da4nQxFU39NWMvl/+6CK4EGuSkcg1W/sVX3iyi+iweg2y0MLR1su+2z1ZjpeTUS9 H4rpDy+wZvwEQ== |
| X-Nifty-Srcip | [209.85.161.173] |
| X-Gm-Message-State | AODbwcDRO83ry/hCYhwJnWpl8z11mEFMR3CbUWSBciCBWMXeSQZitOTQ 8unlQG6ugMc3OY6FL9pGRqUVdQgCfg== |
| X-Received | by 10.13.224.134 with SMTP id j128mr2086085ywe.248.1495088832023; Wed, 17 May 2017 23:27:12 -0700 (PDT) |
| MIME-Version | 1.0 |
| X-Gmail-Original-Message-ID | <CAK7LNAQzPcM6T+3yG8=ezd0vRetW-vcibHWYSw5yJC5TorPKVQ@mail.gmail.com> |
| Content-Type | text/plain; charset="UTF-8" |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 70 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-mtd@lists.infradead.org, Enrico Jorns <ejo@pengutronix.de>, Artem Bityutskiy <artem.bityutskiy@linux.intel.com>, Dinh Nguyen <dinguyen@kernel.org>, Marek Vasut <marek.vasut@gmail.com>, Graham Moore <grmoore@opensource.altera.com>, David Woodhouse <dwmw2@infradead.org>, Masami Hiramatsu <mhiramat@kernel.org>, Chuanxiao Dong <chuanxiao.dong@intel.com>, Jassi Brar <jaswinder.singh@linaro.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Brian Norris <computersforpeace@gmail.com>, Richard Weinberger <richard@nod.at>, Cyrille Pitchen <cyrille.pitchen@atmel.com> |
| X-Original-Date | Thu, 18 May 2017 15:27:11 +0900 |
| X-Original-Message-ID | <CAK7LNAQzPcM6T+3yG8=ezd0vRetW-vcibHWYSw5yJC5TorPKVQ@mail.gmail.com> |
| X-Original-References | <1492585618-13655-1-git-send-email-yamada.masahiro@socionext.com> <1492585618-13655-2-git-send-email-yamada.masahiro@socionext.com> <20170428183250.4c43e107@bbrezillon> <CAK7LNAQZyMoKJjzPjr12TE9s=G8GJbHGgfequtLE4h+meJT03w@mail.gmail.com> <20170515135433.2edda630@bbrezillon> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1643841 |
Show key headers only | View raw
Hi Boris,
2017-05-15 20:54 GMT+09:00 Boris Brezillon <boris.brezillon@free-electrons.com>:
> Hi Masahiro,
>
> Sorry for the late reply.
>
> On Mon, 8 May 2017 12:40:47 +0900
> Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
>
>> Hi Boris,
>>
>>
>> 2017-04-29 1:32 GMT+09:00 Boris Brezillon <boris.brezillon@free-electrons.com>:
>>
>> >> + for (setting = caps->ecc_settings; setting->step; setting++) {
>> >> + /* If chip->ecc.size is already set, respect it. */
>> >> + if (chip->ecc.size && setting->step != chip->ecc.size)
>> >> + continue;
>> >> +
>> >> + /* If chip->ecc.strength is already set, respect it. */
>> >> + if (chip->ecc.strength &&
>> >> + setting->strength != chip->ecc.strength)
>> >> + continue;
>> >
>> > Hm, I don't get it. If chip->ecc.strength and chip->ecc.size are
>> > explicitly set, you should just call nand_check_ecc_caps() and skip
>> > nand_try_to_match_ecc_req(). Why would you call
>> > nand_try_to_match_ecc_req() in this case?
>>
>>
>> I want to call this function if
>> ecc.size is specified but ecc.strength is not
>> (or vice versa).
>
> That's not a valid combination. I accepted the case where
> nand-ecc-step-size is not defined in the DT just because sometime you
> only have one possible setting which is imposed by the controller. In
> this case ecc.size should be explicitly set by the driver not left to 0.
>
>>
>>
>> If both ecc.size and ecc.strength are already specified,
>> you are right, no need to call this function.
>> This function can check the sanity of the specified
>> combination of (step, strength), but this is the same
>> as what nand_check_ecc_caps() does.
I am working on the next version because I really need to
merge all of my Denali controller patches for my SoCs.
One question about this part.
/* If chip->ecc.size is already set, respect it. */
if (chip->ecc.size && step_size != chip->ecc.size)
continue;
Does this make sense for nand_try_to_maximize_ecc()?
(In other words, can nand-ecc-maximize stand together with nand-ecc-step-size?)
--
Best Regards
Masahiro Yamada
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-05-15 14:00 +0200
Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-05-18 08:30 +0200
Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-05-18 09:20 +0200
Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-05-24 10:30 +0200
csiph-web