1. 11 Sep, 2011 6 commits
    • Brian Norris's avatar
      mtd: nand: rename CREATE_EMPTY bbt flag with proper prefix · 53d5d888
      Brian Norris authored
      According to our new prefix rules, we should rename NAND_CREATE_EMPTY_BBT
      with a NAND_BBT prefix, i.e., NAND_BBT_CREATE_EMPTY.
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      53d5d888
    • Brian Norris's avatar
      mtd: nand: move NAND_CREATE_EMPTY_BBT flag · b8f80684
      Brian Norris authored
      The NAND_CREATE_EMPTY_BBT flag was added by commit:
        453281a9
        mtd: nand: introduce NAND_CREATE_EMPTY_BBT
      This flag is not used within the kernel and not explained well, so I
      took the liberty to edit its comments.
      
      Also, this is a BBT-related flag (and closely tied with NAND_BBT_CREATE)
      so I'm moving it to bbm.h next to NAND_BBT_CREATE, thus requiring that
      we use the flag in nand_chip.bbt_options, *not* in nand_chip.options.
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      b8f80684
    • Brian Norris's avatar
      mtd: nand: rename NAND_USE_FLASH_BBT · bb9ebd4e
      Brian Norris authored
      Recall the recently added prefix requirements:
       * "NAND_" for flags in nand.h, used in nand_chip.options
       * "NAND_BBT_" for flags in bbm.h, used in nand_chip.bbt_options
              or in nand_bbt_descr.options
      
      Thus, I am changing NAND_USE_FLASH_BBT to NAND_BBT_USE_FLASH.
      
      Again, this flag is found in bbm.h and so should NOT be used in the
      "nand_chip.options" field.
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      bb9ebd4e
    • 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 19 commits