]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: nand: separate chip options / bbt_options
authorBrian Norris <computersforpeace@gmail.com>
Tue, 31 May 2011 23:31:21 +0000 (16:31 -0700)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 15 Aug 2011 10:26:39 +0000 (13:26 +0300)
commit474de54f6211c4d22b2d02625836709b2a4acdb7
treed96a550c6d0d6827349978d2a4517468651823f8
parentf2f4772692cf3f31eb73d46337c7f10bd031bc26
mtd: nand: separate chip options / bbt_options

This patch handles the problems we've been having with using conflicting
flags from nand.h and bbm.h in the same nand_chip.options field. We
should try to separate these two spaces a little more clearly, and so I
have added a bbt_options field to nand_chip.

Important notes about nand_chip fields:
* bbt_options field should contain ONLY flags from bbm.h. They should be
  able to pass safely to a nand_bbt_descr data structure.
    - BBT option flags start with the "NAND_BBT_" prefix.
* options field should contian ONLY flags from nand.h. Ideally, they
  should not be involved in any BBT related options.
    - NAND chip option flags start with the "NAND_" prefix.
* Every flag should have a nice comment explaining what the flag is. While
  this is not yet the case on all existing flags, please be sure to write
  one for new flags. Even better, you can help document the code better
  yourself!

Please try to follow these conventions to make everyone's lives easier.

Among the flags that are being moved to the new bbt_options field
throughout various drivers, etc. are:
 * NAND_BBT_SCANLASTPAGE
 * NAND_BBT_SCAN2NDPAGE
and there will be more to come.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
include/linux/mtd/nand.h