From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Miquel Raynal <miquel.raynal@bootlin.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,
Miquel Raynal <miquel.raynal@free-electrons.com>
Subject: Re: [PATCH 6/6] mtd: nand: macronix: Unflag the support of changing timings for MX30LF2G18AC
Date: Wed, 14 Feb 2018 10:14:28 +0100 [thread overview]
Message-ID: <20180214101428.3ec6ae1d@bbrezillon> (raw)
In-Reply-To: <20180203095544.9855-7-miquel.raynal@bootlin.com>
On Sat, 3 Feb 2018 10:55:44 +0100
Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> From: Miquel Raynal <miquel.raynal@free-electrons.com>
>
> The MX30LF2G18AC chip declares in its parameter page supporting
> SET/GET_FEATURES but when it comes to timings, experience shows that it
> is not the case.
>
> Unflag this feature for this particular chip in the nand_parameters
> structure to avoid unnecessary errors and downturns.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
> drivers/mtd/nand/nand_macronix.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/mtd/nand/nand_macronix.c b/drivers/mtd/nand/nand_macronix.c
> index d290ff2a6d2f..c58567834595 100644
> --- a/drivers/mtd/nand/nand_macronix.c
> +++ b/drivers/mtd/nand/nand_macronix.c
> @@ -19,9 +19,21 @@
>
> static int macronix_nand_init(struct nand_chip *chip)
> {
> + const char model[20] = "MX30LF2G18AC";
> +
> if (nand_is_slc(chip))
> chip->bbt_options |= NAND_BBT_SCAN2NDPAGE;
>
> + /*
> + * MX30LF2G18AC chip does not support using SET/GET_FEATURES to change
> + * the timings unlike what is declared in the parameter page. Unflag
> + * this feature to avoid unnecessary downturns.
> + */
> + if (chip->parameters.support_setting_features &&
> + !strncmp(model, chip->parameters.model, ARRAY_SIZE(model)))
Why not
!strcmp("MX30LF2G18AC", chip->parameters.model)
?
> + bitmap_clear(chip->parameters.feature_list,
> + ONFI_FEATURE_ADDR_TIMING_MODE, 1);
> +
> return 0;
> }
>
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
prev parent reply other threads:[~2018-02-14 9:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-03 9:55 [PATCH 0/6] Improve timings handling in the NAND framework Miquel Raynal
2018-02-03 9:55 ` [PATCH 1/6] mtd: nand: Avoid setting again the timings to mode 0 after a reset Miquel Raynal
2018-02-03 9:55 ` [PATCH 2/6] mtd: nand: Use wrappers to call onfi GET/SET_FEATURES Miquel Raynal
2018-02-06 14:55 ` Boris Brezillon
2018-02-20 11:12 ` Miquel Raynal
2018-02-03 9:55 ` [PATCH 3/6] mtd: nand: mxc: Remove useless checks in GET/SET_FEATURES functions Miquel Raynal
2018-02-03 9:55 ` [PATCH 4/6] mtd: nand: Stop using a static parameter page for all chips Miquel Raynal
2018-02-14 8:41 ` Boris Brezillon
2018-03-01 23:21 ` Miquel Raynal
2018-02-14 8:53 ` Boris Brezillon
2018-02-03 9:55 ` [PATCH 5/6] mtd: nand: Allow vendors to declare (un)supported features Miquel Raynal
2018-02-14 8:51 ` Boris Brezillon
2018-03-01 23:21 ` Miquel Raynal
2018-02-03 9:55 ` [PATCH 6/6] mtd: nand: macronix: Unflag the support of changing timings for MX30LF2G18AC Miquel Raynal
2018-02-14 9:14 ` 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=20180214101428.3ec6ae1d@bbrezillon \
--to=boris.brezillon@bootlin.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@bootlin.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;
as well as URLs for NNTP newsgroup(s).