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

Artem Bityutskiy dedekind1 at gmail.com
Thu Oct 20 12:31:04 EDT 2011


On Mon, 2011-10-17 at 14:45 -0700, Mike Dunn wrote:
> Not sure.  I'm currently not too knowlegeable on timers, and I'm not using this
> config option in my kernel.  Will look into this.  Meantime, suggestions,
> pointers to reference docs, etc greatly appreciated!

Jiffies do work fine in NO_HZ.

> 
> 
> > Why not use a loop of mdelay() or msleep() or doc_nops() bellow ?
> > I would prefer doc nops, as the time of these is controlled by the chip itself,
> > and thus less dependant on the CPU frequency.
> 
> 
> I'm not simply delaying, I'm polling register 0x1038 (I'm calling it
> DOCG4_CONTROL_STATUS).  The diskonchip P3 uses this same register in exactly the
> same way, so it's likely the G3 does as well.  With regard to the diskonchip nop
> register, I was careful to preserve the same number of reads of that register in
> the same places as was observed during reverse engineering, to prevent
> timing-related failures.

But use cpu_relax() in the polling loop.


-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20111020/9c16544b/attachment.sig>


More information about the linux-mtd mailing list