From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Bruce Suen <bruce_suen@163.com>
Cc: linux-mtd@lists.infradead.org, richard@nod.at, vigneshr@ti.com
Subject: Re: [PATCH] mtd: spinand: Add support for XTX XT26xxxDxxxxx
Date: Wed, 11 Oct 2023 09:09:48 +0200 [thread overview]
Message-ID: <20231011090948.1dee1a90@xps-13> (raw)
In-Reply-To: <c8dace54-bb25-957f-d7b3-8c705b480cdc@163.com>
Hi Bruce,
> "ECCS3/ECCS2/ECCS1/ECCS0 provides ECC Status as follows:
> XX00b= No bit errors were detected during the previous read algorithm.
> 0001b= Bit errors(≤4) were detected and corrected.
> 0101b= Bit errors(=5) were detected and corrected.
> 1001b= Bit errors(=6) were detected and corrected.
> 1101b= Bit errors(=7) were detected and corrected.
> XX10b= Bit errors greater than ECC capability (8 bits) and not corrected
> XX11b= Bit errors reach ECC capability (8 bits) and corrected"
Nice
>
> ECCS1,ECCS0 = 00: No bit errors
> ECCS1,ECCS0 = 10: bit errors > 8
> ECCS1,ECCS0 = 11: bit errors = 8
> ECCS1,ECCS0 = 01: 1<=bit errors<=7
>
> so I use 4 cases to represent it.
>
> for ECCS1,ECCS0 = 11, bitfilps can be subdivided by ECCS3 ECCS2:
>
> ECCS3 ECCS2 = 00: bitfip<=4=4+0, I return 4 for this;
> ECCS3 ECCS2 = 01: bitfip=5=4+1, I return 5 for this;
> ECCS3 ECCS2 = 10: bitfip=6=4+2, I return 6 for this;
> ECCS3 ECCS2 = 11: bitfip=7=4+3, I return 7 for this;
Please use FIELD_GET() and create macros to clarify what you are
looking at. Please include all values.
> so,I use "4+((status & XT26XXXD_STATUS_ECC_MASK) >> 6)" to represent it.
>
> >
> > Also please run checkpatch.pl --strict.
> I run checkpatch.pl without --strict,there are no checks.
> I run checkpatch.pl --strict,there are 5 checks.
> I'm sorry for that,I will fix it in next version of patch.
> >> + case XT26XXXD_STATUS_ECC_8_CORRECTED:
> >> + return 8;
> >> + default:
> >> + break;
> >> + }
> >> +
> >> + return -EINVAL;
> >> +}
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2023-10-11 7:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 9:09 [PATCH] mtd: spinand: Add support for XTX XT26xxxDxxxxx Bruce Suen
2023-10-09 12:58 ` Miquel Raynal
2023-10-11 3:09 ` Bruce Suen
2023-10-11 7:09 ` Miquel Raynal [this message]
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=20231011090948.1dee1a90@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=bruce_suen@163.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.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