aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-05-31 16:31:21 -0700
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 15:01:56 +0300
commit5fb1549dfc40f3b589dae560ea21535cdc5f64e0 (patch)
tree8449037cb13d3453201950ffaadd65de60cf9399 /include/linux/mtd
parenta0dc552951dcbb2b28a8a2ffb5fa966613e8c025 (diff)
downloadkernel_samsung_smdk4412-5fb1549dfc40f3b589dae560ea21535cdc5f64e0.zip
kernel_samsung_smdk4412-5fb1549dfc40f3b589dae560ea21535cdc5f64e0.tar.gz
kernel_samsung_smdk4412-5fb1549dfc40f3b589dae560ea21535cdc5f64e0.tar.bz2
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>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/nand.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index c2b9ac4..42f70e2 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -449,6 +449,9 @@ struct nand_buffers {
* @options: [BOARDSPECIFIC] various chip options. They can partly
* be set to inform nand_scan about special functionality.
* See the defines for further explanation.
+ * @bbt_options: [INTERN] bad block specific options. All options used
+ * here must come from bbm.h. By default, these options
+ * will be copied to the appropriate nand_bbt_descr's.
* @badblockpos: [INTERN] position of the bad block marker in the oob
* area.
* @badblockbits: [INTERN] number of bits to left-shift the bad block
@@ -509,6 +512,7 @@ struct nand_chip {
int chip_delay;
unsigned int options;
+ unsigned int bbt_options;
int page_shift;
int phys_erase_shift;