android_kernel_xiaomi_sm8350/drivers/mtd/nand
Kevin Cernekee b60b08b02c mtd: nand: support alternate BB marker locations on MLC
This is a slightly modified version of a patch submitted last year by
Reuben Dowle <reuben.dowle@navico.com>.  His original comments follow:

This patch adds support for some MLC NAND flashes that place the BB
marker in the LAST page of the bad block rather than the FIRST page used
for SLC NAND and other types of MLC nand.

Lifted from Samsung datasheet for K9LG8G08U0A (1Gbyte MLC NAND):
"
Identifying Initial Invalid Block(s)
All device locations are erased(FFh) except locations where the initial
invalid block(s) information is written prior to shipping. The initial
invalid block(s) status is defined by the 1st byte in the spare area.
Samsung makes sure that the last page of every initial invalid block has
non-FFh data at the column address of 2,048.
...
"

As far as I can tell, this is the same for all Samsung MLC nand, and in
fact the samsung bsp for the processor used in our project (s3c6410)
actually contained a hack similar to this patch but less portable to
enable use of their NAND parts. I discovered this problem when trying to
use a Micron NAND which does not used this layout - I wish samsung would
put their stuff in main-line to avoid this type of problem.

Currently this patch causes all MLC nand with manufacturer codes from
Samsung and ST(Numonyx) to use this alternative location, since these
are the manufactures that I know of that use this layout.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-05-14 01:56:12 +01:00
..
alauda.c mtd: nand: make USB device id constant 2010-02-25 11:26:31 +00:00
ams-delta.c
atmel_nand_ecc.h
atmel_nand.c mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident() 2010-02-26 18:32:56 +00:00
au1550nd.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-03-26 14:55:59 +00:00
autcpu12.c
bcm_umi_bch.c
bcm_umi_nand.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
bf5xx_nand.c mtd: Blackfin NFC: localize MMR bit masks 2010-05-10 14:16:43 +01:00
cafe_nand.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
cmx270_nand.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cs553x_nand.c
davinci_nand.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
denali.c mtd/nand: Fix denali build on ppc64 2010-05-13 16:12:45 +01:00
denali.h mtd/nand: Add Intel Moorestown/Denali NAND support 2010-05-13 16:12:16 +01:00
diskonchip.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
edb7312.c
fsl_elbc_nand.c mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident() 2010-02-26 18:32:56 +00:00
fsl_upm.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
gpio.c
h1910.c
Kconfig mtd/nand: Add Intel Moorestown/Denali NAND support 2010-05-13 16:12:16 +01:00
Makefile mtd/nand: Add Intel Moorestown/Denali NAND support 2010-05-13 16:12:16 +01:00
mpc5121_nfc.c mtd: mpc5121_nfc: Changed SVR check to allow MPC5123. 2010-05-10 14:27:16 +01:00
mxc_nand.c mtd: mxc_nand: support i.MX21 2010-05-14 01:02:53 +01:00
nand_base.c mtd: nand: support alternate BB marker locations on MLC 2010-05-14 01:56:12 +01:00
nand_bbt.c mtd: nand: support alternate BB marker locations on MLC 2010-05-14 01:56:12 +01:00
nand_bcm_umi.c
nand_bcm_umi.h mtd: nand_bcm: fix hot spin and code duplication 2010-02-26 16:56:35 +00:00
nand_ecc.c
nand_ids.c
nandsim.c mtd: nandsim: make some structures anonymous 2010-05-10 14:12:06 +01:00
ndfc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nomadik_nand.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
nuc900_nand.c
omap2.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
orion_nand.c mtd: orion/kirkwood: add RnB line support to orion mtd driver 2010-05-14 01:04:19 +01:00
pasemi_nand.c mtd: nand: make Open Firmware device id constant 2010-02-25 11:26:36 +00:00
plat_nand.c
ppchameleonevb.c
pxa3xx_nand.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
r852.c mtd: sm_common: split smartmedia and xD table 2010-05-14 01:03:46 +01:00
r852.h mtd: nand: Add driver for Ricoh xD/SmartMedia reader 2010-02-26 19:22:38 +00:00
rtc_from4.c
s3c2410.c drivers/mtd/nand: Use kzalloc 2010-05-13 21:21:38 +01:00
sh_flctl.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
sharpsl.c
sm_common.c mtd: sm_common: split smartmedia and xD table 2010-05-14 01:03:46 +01:00
sm_common.h mtd: sm_common: split smartmedia and xD table 2010-05-14 01:03:46 +01:00
socrates_nand.c mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident() 2010-02-26 18:32:56 +00:00
spia.c
tmio_nand.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-10 14:32:46 +01:00
txx9ndfmc.c mtd: nand: Allow caller to pass alternative ID table to nand_scan_ident() 2010-02-26 18:32:56 +00:00