Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1643895

Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mtd: nand: add generic helpers to check, match, maximize ECC settings
Date 2017-05-18 09:20 +0200
Message-ID <tInT5-6TZ-33@gated-at.bofh.it> (permalink)
References (1 earlier) <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> <tIn6F-68Z-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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