]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: refactor BB marker detection
authorBrian Norris <norris@broadcom.com>
Tue, 13 Jul 2010 22:13:00 +0000 (15:13 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 2 Aug 2010 08:08:52 +0000 (09:08 +0100)
commit02b42482aaa34adfc4f5aae7e2f95d40b58cc1ec
treee51adab05413609c059daa827b454c66f1a207b7
parentbb773f645425645e9e92c0c56dafdc428d6f2cf8
mtd: nand: refactor BB marker detection

Some level of support for various scanning locations was already built in,
but this required clean-up. First, BB marker location cannot be determined
_only_ by the page size. Instead, I implemented some heuristic detection
based on data sheets from various manufacturers (all found in
nand_base.c:nand_get_flash_type()).

Second, once these options were identified, they were not handled properly
by nand_bbt.c:nand_default_bbt(). I updated the static nand_bbt_desc structs
to reflect the need for more combinations of detection. The memory allocation
here probably needs to be done dynamically in the very near future (see next
patches).

Signed-off-by: Brian Norris <norris@broadcom.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c