All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Matouschek <felix@matouschek.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: spinand: Add support for XTX XT26G0xA
Date: Wed, 06 Apr 2022 18:16:16 +0200	[thread overview]
Message-ID: <c1387c1949a8ec705116f5ee8a73fa35979aa196.camel@matouschek.org> (raw)
In-Reply-To: <20220404104141.7b7b79d5@xps13>

Hi Miquel,

thank you for your review.

Am Montag, dem 04.04.2022 um 10:41 +0200 schrieb Miquel Raynal:

> > +static int xt26g0xa_ooblayout_ecc(struct mtd_info *mtd, int
> > section,
> > +                                  struct mtd_oob_region *region)
> > +{
> > +       if (section)
> > +               return -ERANGE;
> > +
> > +       region->offset = 8;
> > +       region->length = 40;
> 
> Only 48 OOB bytes?
> 
> Maybe we can be more future proof by assuming that ECC bytes will
> always be at the end (or at a specific offset) and what will change
> is
> the amount of bytes used for storing the ECC information if, let's
> say,
> the company decides to increase the strength.
> 
> Same below.

I'm not quite sure if I interpreted that data-sheet correctly. 
The section describing the array organization (page 7) says that there
are 2k + 64 bytes per page. The section describing the ECC protection
(page 41) says that only offsets 808H to 82FH can be used for user data
and are covered by ECC.

> > +static int xt26g0xa_ooblayout_free(struct mtd_info *mtd, int
> > section,
> > +                                  struct mtd_oob_region *region)
> > +{
> > +       if (section)
> > +               return -ERANGE;
> > +
> > +       region->offset = 1;
> > +       region->length = 7;
> > +
> > +       return 0;
> > +}

The data-sheet says that only offsets 801H to 807H can be used for user
data and are not covered by ECC (offset 800H is reserved for the bad
block mark).

The remaining 16 bytes from offset 830H to 83FH are read-only when ECC
is enabled, so they are of no use? Can you please advise if there is
something I can change?

Thank you,
Felix

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2022-04-06 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 21:29 [PATCH] mtd: spinand: Add support for XTX XT26G0xA Felix Matouschek
2022-04-04  8:41 ` Miquel Raynal
2022-04-06 16:16   ` Felix Matouschek [this message]
2022-04-07  7:09     ` Chuanhong Guo
2022-04-07  7:50       ` Miquel Raynal
2022-04-08 16:22       ` Felix Matouschek
  -- strict thread matches above, loose matches on Subject: below --
2021-07-02 19:52 Felix Matouschek
2021-12-22 11:27 ` Felix Matouschek

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=c1387c1949a8ec705116f5ee8a73fa35979aa196.camel@matouschek.org \
    --to=felix@matouschek.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.