public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Flash driver probe/commandset separation.
@ 2001-04-29 18:38 David Woodhouse
  2001-04-30 15:17 ` AW: " Florian Schirmer / TayTron
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: David Woodhouse @ 2001-04-29 18:38 UTC (permalink / raw)
  To: mtd; +Cc: ahennessy, ds, jonas.holmberg, cwryu, eauth, nico


We seem to have an unnecessary amount of duplication of flash chip driver 
code. We have three drivers for AMD/Fujitsu compatible chips - 
cfi_cmdset_0002.c, amd_flash.c and jedec.c. We have two drivers for Intel/
Sharp compatible chips - cfi_cmdset_0001.c and sharp.c.

Erwin noticed this and wrote code to fall back to an AMD-compatible probe
for JEDEC ID if the CFI probe failed, and then use cfi_cmdset_0002.c if 
appropriate. I think that was the right approach, but I don't like merging
the probes together like that. I think the mfr-specific probes for JEDEC ID 
should be kept separate. The map driver can always call them in order if 
the CFI probe fails, if it wants to.

What I'd like to do is provide core drivers for each of the different 
command sets, and separate probe functions which set up the necessary 
parameters and invoke the core drivers.

The current cfi_cmdset_000x drivers are the most generic, so I'd like to use
those as the basis of the core drivers, and ensure that they can fully
replace the functionality of the other individual drivers. 

We end up with:
	cmdset_intel (and sharp, etc.)
	cmdset_amd (and fujitsu, macronix, etc.)
	cfi_probe
	intel_jedec_probe
	amd_jedec_probe
	
Comments?

Even assuming people agree (or disagree unconvincingly :), I'm not sure
whether I should hold off on this until after I've sync'd up with Linus, or 
whether I should get this all done first and worry about feeding the new 
code to Linus later on. Probably the latter.

--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-05-03 21:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-29 18:38 Flash driver probe/commandset separation David Woodhouse
2001-04-30 15:17 ` AW: " Florian Schirmer / TayTron
2001-04-30 15:56   ` David Woodhouse
2001-04-30 15:56 ` Eric W. Biederman
2001-05-01 14:26   ` David Woodhouse
2001-04-30 17:56 ` Alice Hennessy
2001-05-02 15:33 ` Nicolas Pitre
2001-05-02 15:39   ` David Woodhouse
2001-05-03 17:32     ` Eric W. Biederman
2001-05-03 21:40       ` David Woodhouse
2001-05-03 21:45         ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox