]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand/fsmc: Initialize the badblockbits to 7
authorVipin Kumar <vipin.kumar@st.com>
Wed, 14 Mar 2012 06:17:12 +0000 (11:47 +0530)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:59:02 +0000 (00:59 +0100)
commit4f9c95683c6fb1b38cd1291c29fa870774fad647
treedbb1b570db775fcc35b76e7c010fd0e267aec26b
parent9a3b0e5bf4c44357b6aa2d5e3ce50695f097b5cf
mtd: nand/fsmc: Initialize the badblockbits to 7

Ideally, the block should have 0xff written on the bad block position. Any value
other than 0xff implies a bad block. In practical situations, there can be
bit flips in the oob area as well which means that a block with 0x7f being read
at bad block position may imply a bad block but it is infact only a bit flip in
the bad block byte.

To resolve this problem, the block is marked as good if number of high bits is
greater than or equal to badblockbits (initialized to 7)

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/fsmc_nand.c