]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
NAND: Fix NAND ECC errors on AMD Au1550
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Tue, 16 May 2006 16:52:06 +0000 (20:52 +0400)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 16 May 2006 17:03:18 +0000 (18:03 +0100)
commit35af68b53a62c98bf551aaae7be179bde248eb34
treea5e3b4d694674af5db6c705ef016738b680f73f4
parentb020bb7d3b3a8e3568a16eaf98c033bb9ee474eb
NAND: Fix NAND ECC errors on AMD Au1550

    On AMD Au1550 the static bus controller fails to keep -CE asserted during
chip ready delay on read commands and the NAND chip being used requires this.
So, the current driver allows nand_base.c to drive -CE manually during the
entire sector read. When the PCMCIA driver is enabled however, occasionally
the ECC errors occur on NAND reads. This happens because the PCMCIA driver
polls sockets periodically and reads one of the board's control/status regs
(BCSRs) which are on the same static bus as the NAND flash, and just use
another chip select (and the NOR flash also resides on that bus), so as the
NAND driver forces NAND chip select asserted and the -RE signal is shared, a
contention occurs on the static bus when BCSR or NOR flash is read while we're
reading from NAND.
    So, we either can't keep interrupts enabled during the whole NAND sector
read (which is hardly acceptable), or have to implement some interlocking
scheme between multiple drivers (which is painful, and makes me shudder :-).
    There's a third way which has proven to work: to force -CE asserted only
while we're waiting for a NAND chip to become ready after a read command,
disabling interrupts for a maximum of 25 microseconds (according to Toshiba
TC58DVM92A1FT00 datasheet -- this chip is mentioned in the board schematics);
for Samsung NAND chip which seems to be actually used this delay is even less,
12 us.

Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/au1550nd.c