]> git.baikalelectronics.ru Git - kernel.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)
commite72b400ae2efc8042653e97f08495a4365a52ddb
treea5e3b4d694674af5db6c705ef016738b680f73f4
parent457bb2edc161939b0139b53948d23c2a4027f326
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