From: Artem Bityutskiy <dedekind1@gmail.com>
To: Brian Norris <norris@broadcom.com>
Cc: gernot.hoyler@spansion.com, David Woodhouse <dwmw2@infradead.org>,
Kevin Cernekee <cernekee@gmail.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2] mtd/nand: Spansion S30MLxxxP support
Date: Mon, 30 Aug 2010 10:56:24 +0300 [thread overview]
Message-ID: <1283154984.12995.12.camel@brekeke> (raw)
In-Reply-To: <1282230662-25388-1-git-send-email-norris@broadcom.com>
Hi,
On Thu, 2010-08-19 at 08:11 -0700, Brian Norris wrote:
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index a3c7473..8bdcf64 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -2899,6 +2899,18 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
> mtd->writesize = type->pagesize;
> mtd->oobsize = mtd->writesize / 32;
> busw = type->options & NAND_BUSWIDTH_16;
> +
> + /*
> + * Check for Spansion/AMD ID + repeating 5th, 6th byte since
> + * some Spansion chips have erasesize that conflicts with size
> + * listed in nand_ids table
> + * Data sheet (5 byte ID): Spansion S30ML-P ORNAND (p.39)
> + */
> + if (*maf_id == NAND_MFR_AMD && id_data[4] != 0x00 &&
> + id_data[5] == 0x00 && id_data[6] == 0x00 &&
> + id_data[7] == 0x00 && mtd->writesize == 512)
> + mtd->erasesize = (128 * 1024) << ((id_data[3] & 0x03)
> + << 1);
IMO, it is untidy to move just this little << 1 piece to another line.
I've amended this part and made it look like:
mtd->erasesize = (128 * 1024);
mtd->erasesize <<= ((id_data[3] & 0x03) << 1);
instead, if you do not mind, and pushed to l2-mtd-2.6.git / master,
thanks!
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
prev parent reply other threads:[~2010-08-30 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 22:42 [PATCH] mtd/nand: Spansion S30MLxxxP support Brian Norris
2010-08-18 13:03 ` Gernot Hoyler
2010-08-19 15:11 ` [PATCH v2] " Brian Norris
2010-08-30 7:56 ` Artem Bityutskiy [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=1283154984.12995.12.camel@brekeke \
--to=dedekind1@gmail.com \
--cc=cernekee@gmail.com \
--cc=dwmw2@infradead.org \
--cc=gernot.hoyler@spansion.com \
--cc=linux-mtd@lists.infradead.org \
--cc=norris@broadcom.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