From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
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>
Subject: Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings
Date: Thu, 18 May 2017 09:09:57 +0200 [thread overview]
Message-ID: <20170518090957.227954c1@bbrezillon> (raw)
In-Reply-To: <CAK7LNAQzPcM6T+3yG8=ezd0vRetW-vcibHWYSw5yJC5TorPKVQ@mail.gmail.com>
On Thu, 18 May 2017 15:27:11 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> 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.
Okay.
>
>
> 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?)
It could make sense if one wants to maximize the strength for a
specific step-size, but most of the time the user will let the driver
choose the best step-size+strength pair.
next prev parent reply other threads:[~2017-05-18 7:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-19 7:06 [PATCH 0/2] mtd: nand: Add generic helpers check, match, maximize ECC settings Masahiro Yamada
2017-04-19 7:06 ` [PATCH 1/2] mtd: nand: add generic helpers to " Masahiro Yamada
2017-04-28 16:32 ` Boris Brezillon
2017-05-08 3:40 ` Masahiro Yamada
2017-05-15 11:54 ` Boris Brezillon
2017-05-18 6:27 ` Masahiro Yamada
2017-05-18 7:09 ` Boris Brezillon [this message]
2017-05-24 8:23 ` Masahiro Yamada
2017-04-19 7:06 ` [PATCH 2/2] mtd: nand: denali: show how to use generic helpers (do not apply) Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170518090957.227954c1@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=chuanxiao.dong@intel.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=dinguyen@kernel.org \
--cc=dwmw2@infradead.org \
--cc=ejo@pengutronix.de \
--cc=grmoore@opensource.altera.com \
--cc=jaswinder.singh@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mhiramat@kernel.org \
--cc=richard@nod.at \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox