From: ebiederman@lnxi.com (Eric W. Biederman)
To: Joshua Wise <joshua@joshuawise.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: jedec_probe.c
Date: 05 Jul 2003 07:38:22 -0600 [thread overview]
Message-ID: <m3wuexksa9.fsf@maxwell.lnxi.com> (raw)
In-Reply-To: <200307050103.58666.joshua@joshuawise.com>
Joshua Wise <joshua@joshuawise.com> writes:
> On Friday 04 July 2003 10:32 pm, Joshua Wise wrote:
> > tracked this down to jedec_probe_chip's cfi->addr_unlock* garbage - it does
> > look like that function will need to be rewritten. Has anyone already
> > started this, or should I just go ahead?
Why? What is your problem. All the pieces do is validate what
was detected.
> I stand corrected. It seems like it's also possible that jedec_probe() could
> be rewritten to just probe all the chips that we know about. Methinks I'll
> try that.
It already does test for all of the chips we know about.
> (Addendum a few minutes later)
> Sigh.. This just exposes fscking LAYERS of cruft that MTD was built on,
> including the idea that every flash chip would be CFI, and this horrible
> probing cruft. Someone please shoot me.
???
Flash chips are almost ISA devices so there is no 100% reliable
way of detecting which type of flash device you have plugged in.
But there are major trends that help quite a lot.
NOR flash devices have two different JEDEC specified methods of detecting
exactly which flash chip you have plugged in. Either the older
jedec_probe, or the more recent cfi_probe. Using the basic method
in jedec_probe we can only get the manufacturer and device id of the
flash chip, the rest of the information we need comes from a table.
Flash devices tend to be a lot more common than that so the newer
Common Flash Interface probe also reports the number of erase regions
and the like, so the flash drive does not need to have knowledge of
a specific kind of flash device.
Most NOR flash devices implement either the Intel or the AMD command
set. The probe method does not matter so the command set code
is reused by both methods.
There is no requirement to reuse the mtd infrastructure. It is
there simply because it does a good job of factoring out the common
pieces.
So what kind of flash device do you have? And why does the
existing infrastructure not work for you?
Eric
next prev parent reply other threads:[~2003-07-05 13:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-05 2:32 jedec_probe.c Joshua Wise
2003-07-05 5:03 ` jedec_probe.c Joshua Wise
2003-07-05 13:38 ` Eric W. Biederman [this message]
2003-07-05 18:20 ` jedec_probe.c Joshua Wise
[not found] ` <200307051406.08109.joshua@joshuawise.com>
2003-07-05 23:19 ` jedec_probe.c Eric W. Biederman
2003-07-06 1:57 ` jedec_probe.c Joshua Wise
2003-07-06 2:11 ` jedec_probe.c Eric W. Biederman
2003-07-06 2:15 ` jedec_probe.c Joshua Wise
2003-07-06 2:50 ` jedec_probe.c Eric W. Biederman
2003-07-06 3:13 ` jedec_probe.c Joshua Wise
2003-07-06 3:29 ` jedec_probe.c Eric W. Biederman
2003-07-07 14:52 ` jedec_probe.c Thayne Harbaugh
2003-07-08 8:21 ` jedec_probe.c David Woodhouse
2003-07-08 15:08 ` jedec_probe.c Thayne Harbaugh
2003-07-08 7:48 ` jedec_probe.c David Woodhouse
2003-07-07 15:38 ` jedec_probe.c Thayne Harbaugh
2003-07-07 14:51 ` jedec_probe.c Thayne Harbaugh
-- strict thread matches above, loose matches on Subject: below --
2002-11-11 8:18 jedec_probe.c Holger Speck
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=m3wuexksa9.fsf@maxwell.lnxi.com \
--to=ebiederman@lnxi.com \
--cc=joshua@joshuawise.com \
--cc=linux-mtd@lists.infradead.org \
/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