[MTD] slram driver cleanup

Add error checks to read/write functions and add an eraseblock size.
Makes slram a suitable device for JFFS2.

Signed-off-by: Josh Boyer <jdub@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] FTL Fix missing pointer assignment

For the case that mtd partitions are enabled it would cause a 0-pointer 
dereferencing in mtdpart.c:mtd_erase_callback()

Signed-off-by: Herbert Valerio Riedel <hvr@inso.tuwien.ac.at>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] NAND extended commands, badb block table autorefresh 

Added extended commands for AG-AND device and added 
option for BBT_AUTO_REFRESH.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] NAND workaround for AG-AND disturb issue. AG-AND recovery

Added workaround for Renesas AG-AND chips "disturb" issue 
for Bad Block Table. 
Added support for the device recovery command sequence 
for Renesas AG-AND chips.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] Renesas AG-AND device recovery

Add routine to perform device recovery (deplete) procedure.
Clean up some compiler warnings.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] bast-flash partitions fixup

Ensure the whole device is added if there are no partitions found on the
device, so that at least the flash can be read/written.

Replace some of the constants with their SZ_xxx counterparts

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] NAND replace yield

Replace yield by msleep. M.Wilcox stared at it and frowned

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[JFFS2] Avoid warning for empty filesystems

Avoid "Eep. No valid nodes for ino #1" message for just-created filesystem.

Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] NAND SharpSL fix default partition size

Correct Poodle default partition size

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] NAND use symbols instead of literals

Replace some literals with defined symbols.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] Platform RAM Driver

Driver for generic RAM blocks which are exported by an platform_device
from the device driver system.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] NAND Add optional ECC status check callback

Add optional hardware specific callback routine to perform extra error
status checks on erase and write failures for devices with hardware ECC.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] rtc_from4 error status check, disable virtual erase blocks

Added routine to perform extra error status checks on erase and write
failures to determine if errors are correctable.
Added option to prevent JFFS2 from using virtual erase blocks.
Performed minor cleanup on whitespace and comments.

Signed-off-by: David A. Marlin <dmarlin@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[JFFS2] Fix write buffer retry case

Correction of retry case to avoid silent failure of rmdir
when jffs2_wbuf_recover GCs the previous entry (+ corresponding
dnode case).

Signed-off-by: Estelle Hammache <estelle.hammache@st.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[JFFS2] Fix block refiling

- block refiling when writing directly to flash a buffer
which is bigger than wbuf
- retry cases for flushing wbuf

Signed-off-by: Estelle Hammache <estelle.hammache@st.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[JFFS2] Fix refile of blocks due to write failure. 

avoid segfault when nextblock was refiled because of a write failure
- avoid filing blocks on the clean list when they have wasted
space

Signed-off-by: Estelle Hammache <estelle.hammache@st.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] Fix MTD device probing

Try larger numbers of chips before smaller
numbers of chips across the bus width.

This means we'll avoid misdetecting a 2 x16 array as 1 x32 if the
high 16-bits happen to read as zeros in the QRY area.

Signed-off-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[JFFS2] Code cleanup 

Code beautification and block filing correction for optimization.

Signed-off-by: Estelle Hammache <estelle.hammache@st.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] DiskOnChip use CONFIG_ options instead of random symbols

Using the CONFIG_ options from KConfig seems to work better :8

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[MTD] DiskOnChip code cleanup

Remove commented ugliness

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>