diff options
author | Huang Shijie <b32955@freescale.com> | 2012-07-03 16:24:32 +0800 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-07-16 21:46:46 +0100 |
commit | c50c69402ac24641da38c146796c199387b97f8d (patch) | |
tree | 2334c8e4d61beaebc746d48f2976f020b71e4784 /drivers/mtd/nand/gpmi-nand | |
parent | 44ed0ffdbc0e7ce2bd8954b79626df45d679d189 (diff) | |
download | blackbird-obmc-linux-c50c69402ac24641da38c146796c199387b97f8d.tar.gz blackbird-obmc-linux-c50c69402ac24641da38c146796c199387b97f8d.zip |
mtd: gpmi: add on-flash BBT support for gpmi nand
add the on flash bbt support for gpmi nand driver.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/gpmi-nand')
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index d6fa8f4779ce..5d9796acc49a 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -27,6 +27,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/of_mtd.h> #include "gpmi-nand.h" /* add our owner bbt descriptor */ @@ -1502,6 +1503,8 @@ static int __devinit gpmi_nfc_init(struct gpmi_nand_data *this) chip->ecc.size = 1; chip->ecc.strength = 8; chip->ecc.layout = &gpmi_hw_ecclayout; + if (of_get_nand_on_flash_bbt(this->dev->of_node)) + chip->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB; /* Allocate a temporary DMA buffer for reading ID in the nand_scan() */ this->bch_geometry.payload_size = 1024; |