From: Artem Bityutskiy <dedekind1@gmail.com>
To: Kyungmin Park <kmpark@infradead.org>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org,
roman.tereshonkov@nokia.com, m.szyprowski@samsung.com
Subject: Re: [PATCH] mtd: OneNAND: Detect the correct NOP when 4KiB pagesize
Date: Wed, 08 Jun 2011 14:03:14 +0300 [thread overview]
Message-ID: <1307530994.31223.46.camel@localhost> (raw)
In-Reply-To: <20110608015625.GA27537@july>
On Wed, 2011-06-08 at 10:56 +0900, Kyungmin Park wrote:
> From: Kyungmin Park <kyungmin.park@samsung.com>
>
> There are two different 4KiB pagesize chips
> KFM4G16Q4M series have NOP 4 with version ID 0x0131
> But KFM4G16Q5M has NOP 1 with versoin ID 0x013e
>
> Note that Q5M means that it has NOP 1.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> index ac9e959..2adca63 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -3429,6 +3429,13 @@ static void onenand_check_features(struct mtd_info *mtd)
> else if (numbufs == 1) {
> this->options |= ONENAND_HAS_4KB_PAGE;
> this->options |= ONENAND_HAS_CACHE_PROGRAM;
> + /*
> + * There are two different 4KiB pagesize chips
> + * KFM4G16Q4M has NOP 4 with version ID 0x0131
> + * KFM4G16Q5M has NOP 1 with versoin ID 0x013e
> + */
If you confirm that it is impossible to detect NOP and distinguish
between KFM4G16Q4M and KFM4G16Q5M, then can we take the following steps:
1. Add a comment that this is a hacky quirk to work around HW
identification flaw, to make it clear for the people who read the
code.
2. Make sure the default is NOP4 (you already do).
3. Compare _both_ device ID and version ID. This means that we'll end up
with NOP1 only for your device, all the other will be NOP4. If then
someone has issues, they'll have to reporte about them and add their
device ID to this hack.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2011-06-08 11:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 1:56 [PATCH] mtd: OneNAND: Detect the correct NOP when 4KiB pagesize Kyungmin Park
2011-06-08 11:03 ` Artem Bityutskiy [this message]
2011-06-08 13:21 ` Kyungmin Park
2011-06-08 13:19 ` Artem Bityutskiy
2011-06-09 6:12 ` Kyungmin Park
2011-06-09 8:16 ` Artem Bityutskiy
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=1307530994.31223.46.camel@localhost \
--to=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=kmpark@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=roman.tereshonkov@nokia.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;
as well as URLs for NNTP newsgroup(s).