From: Brian Norris <computersforpeace@gmail.com>
To: Marek Vasut <marex@denx.de>
Cc: linux-mtd@lists.infradead.org,
Michel Stempin <michel.stempin@wanadoo.fr>
Subject: Re: [RESEND][PATCH] mtd: chips: Add support for PMC SPI Flash chips in m25p80.c
Date: Wed, 21 Aug 2013 00:59:03 -0700 [thread overview]
Message-ID: <20130821075903.GC31788@brian-ubuntu> (raw)
In-Reply-To: <201308210941.38483.marex@denx.de>
On Wed, Aug 21, 2013 at 09:41:38AM +0200, Marek Vasut wrote:
> Dear Brian Norris,
>
> > + Marek, since he's been reviewing (with dismay?) the increase in macro
> > flags in this driver. If there are any objections, I can amend/drop the
> > patch.
>
> Hmmm ... this SECT_4K_PMC seems too combined to me. Why don't we use the SECT_4K
> flag and another flag to indicate it's a PMC part? Even better, I recall you can
Separating manufacturer from SECT_4K sounds good, but it really doesn't
buy us much. See my next comments.
> just read the chip jedec ID and determine if it's a PMC part according to that.
> Then if it is PMC AND the SECT_4K flag is set, there is no need to add another
> flag at all, no?
IIUC, Michel's comment applies:
"They do not support JEDEC RDID (0x9f), and so they can only be
detected by matching their name string with pre-configured platform
data."
So we cannot use RDID to identify by manufacturer. In fact, this same
point screws up any attempt at manufacturer-based property detection for
non-JEDEC devices. I guess we just can't expect much from such devices.
So we would have to introduce two flags to the table: one to flag the
manufacturer and one to flag the opcode. Not necessary, IMO.
> > On Mon, Jul 15, 2013 at 12:13:56PM +0200, Michel Stempin wrote:
[...]
> > > @@ -762,6 +764,11 @@ static const struct spi_device_id m25p_ids[] = {
> > >
> > > { "n25q128a13", INFO(0x20ba18, 0, 64 * 1024, 256, 0) },
> > > { "n25q256a", INFO(0x20ba19, 0, 64 * 1024, 512, SECT_4K) },
> > >
> > > + /* PMC */
> > > + { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) },
> > > + { "pm25lv010", INFO(0, 0, 32 * 1024, 4, SECT_4K_PMC) },
Note that only the non-JEDEC chips needed the old commands.
> > > + { "pm25lq032", INFO(0x7f9d46, 0, 64 * 1024, 64, SECT_4K) },
> > > +
> > >
> > > /* Spansion -- single (large) sector size only, at least
> > >
> > > * for the chips listed here (without boot sectors).
> > > */
> > >
Brian
next prev parent reply other threads:[~2013-08-21 7:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 10:13 [RESEND][PATCH] mtd: chips: Add support for PMC SPI Flash chips in m25p80.c Michel Stempin
2013-08-21 7:27 ` Brian Norris
2013-08-21 7:41 ` Marek Vasut
2013-08-21 7:59 ` Brian Norris [this message]
2013-08-21 8:07 ` Marek Vasut
2013-08-21 8:30 ` Brian Norris
2013-08-21 13:10 ` Marek Vasut
2013-08-21 19:47 ` 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=20130821075903.GC31788@brian-ubuntu \
--to=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
--cc=michel.stempin@wanadoo.fr \
/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