From: Huang Shijie <b32955@freescale.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, Huang Shijie <shijie8@gmail.com>,
dedekind1@gmail.com
Subject: Re: [PATCH] mtd : add parsing code for one kind of Hynix's nand chip
Date: Thu, 12 Apr 2012 10:43:55 +0800 [thread overview]
Message-ID: <4F86416B.4090501@freescale.com> (raw)
In-Reply-To: <CAN8TOE8xz+t1X-JVC1sOy70k64_gRDU-6DkrnqtDkvdbELHQLQ@mail.gmail.com>
Hi Brian:
> Hi Huang,
>
> On Mon, Apr 9, 2012 at 7:56 PM, Huang Shijie<b32955@freescale.com> wrote:
>> drivers/mtd/nand/nand_base.c | 43 ++++++++++++++++++++++++++++++++++++++++++
>> 1 files changed, 43 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> index 6315b94..8997023 100644
>> --- a/drivers/mtd/nand/nand_base.c
>> +++ b/drivers/mtd/nand/nand_base.c
>> @@ -3028,6 +3028,49 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
>> mtd->erasesize = (128 * 1024)<<
>> (((extid>> 1)& 0x04) | (extid& 0x03));
>> busw = 0;
>> + } else if (id_data[0] == NAND_MFR_HYNIX&& id_data[1] == 0xd7) {
>> + /* Calc pagesize */
> I'm not sure this is the beset heuristic. Hynix could easily make a
> larger chip that has the same decoding table, so we probably shouldn't
> compare dev_id == 0xD7. It actually seems like the decoding table
> might be intended for all Hynix MLC. What do you think about the
> following condition?
>
> + } else if ((chip->cellinfo& NAND_CI_CELLTYPE_MSK)&&
> id_data[0] == NAND_MFR_HYNIX) {
I am afraid this can not solve the problem.
The HY27UT088G2M whose id_data[2] is 0x14 DOES not follow your code.
Please check the datasheet of HY27UT088G2M. ( I ever emailed to you.)
The same issue exits in H627UW08CGFM too.
>> + /* Calc oobsize */
>> + switch (extid& 0x03) {
> The table actually includes a third column (bit 6) that corresponds
> with the OOB field that, in future revs could have an expanded OOB
> size. Personally, I wrote this condition as:
>
> + switch (((extid>> 2)& 0x04) | (extid& 0x03)) {
yes, we can add this.
> That way, we can catch the "default" case as an unknown OOB size.
>
>> + default:
>> + pr_info("Cannot parse out the oobsize.\n");
>> + break;
>> + }
> I'm not sure if we should just print a message for the default case;
> the warning message could easily be missed, and the uninitialized
> oobsize would cause problems. Either we should throw an error somehow
> or just default to the highest known OOB for this chip type (448
> bytes). Personally, I just chose the latter...
ok. I can use the 448 as the default.
> BTW, I actually have some patches queued up that I need to complete
> properly, where I'm trying to clean up and update NAND detection a
> little. So I basically have this same patch, but rebased on top of
> some other changes I have ready... I don't mind taking a revised
> version of yours, or I can try to clean up my series and send it out
> soon.
>
I hope you send it out as soon as possible. :)
> Either way, please remember to copy me on these type of NAND detection
> patches! I've been studying this for a while and have a lot of stuff
> queued up to work on sometime, so it's nice to know when others are
> touching these areas.
ok, no problem.
thanks
Huang Shijie
next prev parent reply other threads:[~2012-04-12 2:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 2:56 [PATCH] mtd : add parsing code for one kind of Hynix's nand chip Huang Shijie
2012-04-11 16:52 ` Brian Norris
2012-04-12 2:43 ` Huang Shijie [this message]
2012-04-18 5:00 ` Brian Norris
2012-04-18 7:52 ` Huang Shijie
2012-09-15 5:27 ` Brian Norris
2012-04-18 5:00 ` Brian Norris
2012-08-17 8:43 ` Huang Shijie
2012-08-18 2:51 ` Brian Norris
2012-08-20 6:01 ` Huang Shijie
2012-09-15 4:39 ` Brian Norris
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=4F86416B.4090501@freescale.com \
--to=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=shijie8@gmail.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.