[RFC] refactoring MTD cmdset ops, jedec_probe, and cfi_probe

Eric W. Biederman ebiederman at lnxi.com
Thu Aug 12 03:13:46 EDT 2004


Josh Boyer <jdub at us.ibm.com> writes:

> On Tue, 2004-07-13 at 10:25, Eric W. Biederman wrote:
> > Ok recording what the reason for this that I got on irc.
> > 
> > cfi_cmdset_0020 is just a variant on cfi_cmdset_0001 that shares most of
> > the code.
> 
> Thinking about this more, I wouldn't worry too much about
> cfi_cmdset_0020.c.  It's old, fairly unmaintained, and only has a single
> user as far as I know.
> 
> If your changes break it, then it'll give someone and excuse to update
> the code.  Eventually it should be merged with cfi_cmdset_0001.c anyway,
> since M58LW128A reports command set 01, but really needs the
> functionality of command set 20.  The exception list you talked about in
> IRC might help with that.
> 
> But don't let me stop you from making it work if you want to :).

So far I have been busy with other things so I have been taking the slow route
to refactoring.  I have just reported the cfi_fixup function from cfi_util
and have gotten nearly all of the variation in cfi_cmdset_0001 and cfi_cmdset_0002
under control.  

It is probably enough infrastructure so that cfi_cmdset_0001 and 0020 could be
merged.

For the deeper pieces of command set common code moving their helper functions
into cfi_util is probably a good place to start.

I'm hoping I have accomplished enough I don't need to touch the code again for quite a while but...

Eric




More information about the linux-mtd mailing list