From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Miquel Raynal <miquel.raynal@free-electrons.com>
Cc: Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: nand: samsung: add datasheet minimum strength requirements for a chip
Date: Wed, 6 Dec 2017 09:24:01 +0100 [thread overview]
Message-ID: <20171206092401.1a625db7@bbrezillon> (raw)
In-Reply-To: <20171130151041.15132-1-miquel.raynal@free-electrons.com>
Hi Miquel,
On Thu, 30 Nov 2017 16:10:41 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
Why not naming the chip in the subject line?
"mtd: nand: samsung: add ECC requirements for K9F4G08U0D"
> Samsung NAND chip K9F4G08U0D minimum ECC strength requirement is 1 bit
> per 512 bytes. As the chip is not ONFI nor JEDEC and because of the lack
> of these values, boards using it failed to probe the NAND controller
> driver. Fix this by adding the default values if needed.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
> drivers/mtd/nand/nand_samsung.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mtd/nand/nand_samsung.c b/drivers/mtd/nand/nand_samsung.c
> index d348f0129ae7..5dc4fa4862d7 100644
> --- a/drivers/mtd/nand/nand_samsung.c
> +++ b/drivers/mtd/nand/nand_samsung.c
> @@ -91,6 +91,13 @@ static void samsung_nand_decode_id(struct nand_chip *chip)
> }
> } else {
> nand_decode_ext_id(chip);
> +
> + /* Datasheet values for SLC Samsung K9F4G08U0D-S[I|C]B0(T00) */
> + if (nand_is_slc(chip) && chip->id.data[1] == 0xDC &&
> + (!chip->ecc_step_ds || !chip->ecc_strength_ds)) {
Why do you test chip->ecc_step_ds and chip->ecc_strenght_ds values? I
mean, the chip is not ONFI or JEDEC compliant, so there's no reason
these fields would have been assigned to something != 0, and if they
were, it's a bug.
> + chip->ecc_step_ds = 512;
> + chip->ecc_strength_ds = 1;
> + }
> }
> }
>
prev parent reply other threads:[~2017-12-06 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 15:10 [PATCH] mtd: nand: samsung: add datasheet minimum strength requirements for a chip Miquel Raynal
2017-12-06 8:24 ` Boris Brezillon [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=20171206092401.1a625db7@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@free-electrons.com \
--cc=richard@nod.at \
/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