1. 11 Sep, 2011 3 commits
    • Brian Norris's avatar
      mtd: nand: consolidate redundant flash-based BBT flags · a40f7341
      Brian Norris authored
      This patch works with the following three flags from two headers (nand.h
      and bbm.h):
        (1) NAND_USE_FLASH_BBT (nand.h)
        (2) NAND_USE_FLASH_BBT_NO_OOB (nand.h)
        (3) NAND_BBT_NO_OOB (bbm.h)
      
      These flags are all related and interdependent, yet they were in
      different headers. Flag (2) is simply the combination of (1) and (3) and
      can be eliminated.
      
      This patch accomplishes the following:
        * eliminate NAND_USE_FLASH_BBT_NO_OOB (i.e., flag (2))
        * move NAND_USE_FLASH_BBT (i.e., flag (1)) to bbm.h
      
      It's important to note that because (1) and (3) are now both found in
      bbm.h, they should NOT be used in the "nand_chip.options" field.
      
      I removed a small section from the mtdnand DocBook because it referes to
      NAND_USE_FLASH_BBT in nand.h, which has been moved to bbm.h.
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      a40f7341
    • Brian Norris's avatar
      mtd: nand: separate chip options / bbt_options · 5fb1549d
      Brian Norris authored
      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: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      5fb1549d
    • Brian Norris's avatar
      mtd: nand: remove NAND_BBT_SCANBYTE1AND6 option · a0dc5529
      Brian Norris authored
      This patch reverts most of:
          commit 58373ff0
          mtd: nand: more BB Detection refactoring and dynamic scan options
      
      According to the discussion at:
          http://lists.infradead.org/pipermail/linux-mtd/2011-May/035696.html
      the NAND_BBT_SCANBYTE1AND6 flag, although technically valid, can break
      some existing ECC layouts that use the 6th byte in the OOB for ECC data.
      Furthermore, we apparently do not need to scan both bytes 1 and 6 in
      the OOB region of the devices under consideration; instead, we only need
      to scan one or the other.
      
      Thus, the NAND_BBT_SCANBYTE1AND6 flag is at best unnecessary and at
      worst a regression.
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      a0dc5529
  2. 15 Aug, 2011 2 commits
  3. 14 Aug, 2011 13 commits
  4. 13 Aug, 2011 22 commits