android_kernel_xiaomi_sm8350/drivers/mtd
Sergei Shtylyov 35af68b53a 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>
2006-05-16 18:03:18 +01:00
..
chips [MTD] Fix legacy character sets throughout drivers/mtd, include/linux/mtd 2006-05-14 01:51:54 +01:00
devices drivers/mtd/devices/docprobe.c: correct #if's 2006-05-16 13:12:12 +01:00
maps [MTD] Remove gratuitous inclusion of ARM-only header from physmap.c 2006-05-14 11:59:20 +01:00
nand NAND: Fix NAND ECC errors on AMD Au1550 2006-05-16 18:03:18 +01:00
onenand OneNAND: fix block command typo 2006-05-12 15:35:51 +01:00
afs.c [MTD] core: Clean up trailing white spaces 2005-11-07 13:37:38 +01:00
cmdlinepart.c [PATCH] mtd cmdlinepart: allow zero offset value 2006-03-31 12:18:48 -08:00
ftl.c [MTD] Make functions static, include header files with prototypes 2005-11-29 19:54:58 +01:00
inftlcore.c [PATCH] Fix debug statement in inftlcore.c 2006-03-31 12:18:48 -08:00
inftlmount.c Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6 2005-11-07 10:24:08 -08:00
Kconfig Trivial typo fixes in Kconfig files (MTD). 2006-05-12 17:35:02 +01:00
Makefile [MTD] Add initial support for OneNAND flash chips 2005-11-06 21:17:24 +01:00
mtd_blkdevs.c [PATCH] sem2mutex: drivers/mtd/ 2006-03-31 12:18:48 -08:00
mtdblock_ro.c Make mtdblock_ro unconditionally readonly 2006-04-17 15:48:16 +01:00
mtdblock.c Simplify test for RAM devices 2006-04-17 15:48:16 +01:00
mtdchar.c OneNAND: One-Time Programmable (OTP) support 2006-05-12 15:35:50 +01:00
mtdconcat.c BUG_ON() Conversion in drivers/mtd/ 2006-03-26 18:15:12 +02:00
mtdcore.c [PATCH] Kill ifdefs in mtdcore.c 2006-03-31 12:18:49 -08:00
mtdpart.c [MTD] core: Clean up trailing white spaces 2005-11-07 13:37:38 +01:00
nftlcore.c Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6 2005-11-07 10:24:08 -08:00
nftlmount.c [MTD] core: Clean up trailing white spaces 2005-11-07 13:37:38 +01:00
redboot.c [MTD] Fix build warnings in RedBoot MTD partition parser. 2006-05-16 17:31:15 +01:00
rfd_ftl.c [PATCH] fix more missing includes 2006-01-08 20:13:45 -08:00