[PATCH] Add driver for M-sys / Sandisk diskonchip G4 nand flash

Mike Dunn mikedunn at newsguy.com
Wed Oct 12 22:25:51 EDT 2011


On 10/12/2011 05:26 PM, Marek Vasut wrote:
> On Wednesday, October 12, 2011 11:28:34 PM Robert Jarzmik wrote:
>> Mike Dunn <mikedunn at newsguy.com> writes:
>>> This is a driver for the diskonchip G4 in my Palm Treo680.  I've tested
>>> it fairly well; it passes the nandtest utility, and I've been able to
>>> create a ubifs using it.
> Hi Robert,
> I had a look at your driver, to see how close it was to the docg3 I
>>
>>  - docg4 doesn't need to write to an "address register" before reading some
>>  random register (ie. between io+0x1000 and io+0x1800), docg3 needs it
> This can be done on both ...

Is that right?  I haven't tried writing it on the G4.  The TrueFFS library never
writes it on the G4, so I didn't.  I called it the "read-enable" register on the
P3.  "Address register" is probably more accurate.

> See above ... you can determine if it's G3 or G4 by version register iirc ?

Correct.  They both have ID registers.
>>  - some read/write sequences are different, with different registers, and
>> with additionnal reads in your case (ie. the MYSTERY register for
>> example).
> This can be done on G3 too?

Sequences are very different.  And G4 has quirks like registers that have to be
written twice in succession with the same value.  And the number of nops between
reads may be important.

>
> Definitelly looking forward to this too. I can try on PalmT5 if you like, it 
> SHOULD have a G3.

According to the link to the old hh.org page you sent me, it does.

As far as combining drivers goes, basically all the low-level stuff will be
different.  There would have to be separate functions for the register
interactions; e.g., what I called read_page_prologue() and Robert called
read_page_prepare().  What could (and probably should) be similiar is the
integration with the mtd nand infrastructure code.  This is messy, due to the
fact that all the DOC devices have a proprietary controller that does not
comport to the standard nand commands that the mtd code expects.  That may be a
good reason to try to combine them.  My feeling is that we should develop in
tandem, and strive to converge structurally.  Then we can maybe take a look at
combining if it makes sense.  Right now we're at different points of
development, with original work done in isolation, and I think we'd only be
getting in each others' way and confusing things.

Mike




More information about the linux-mtd mailing list