diff options
author | mokopatches <mokopatches@openmoko.org> | 2008-11-19 17:03:09 +0000 |
---|---|---|
committer | warmcat <andy@warmcat.com> | 2008-11-19 17:03:09 +0000 |
commit | 6c6a2b5bb5badea6648bed6bf0dc1033419f5397 (patch) | |
tree | 49af62bb725eac655680bea0ea72b936cbe01ce7 /drivers/mtd | |
parent | 3e243335eb2060abcf984f6ec9b7272914d56671 (diff) |
s3c2410-bbt.patch
[PATCH] Add Kconfig option to enable NAND bad-block-table support for s3c2410
This patch adds a new CONFIG_MTD_NAND_S3C2410_BBT which, if enabled,
asks the mtd NAND core to use a bad-block table.
Signed-off-by: Harald Welte <laforge@openmoko.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 1858a10c4ea..404960d342a 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -698,9 +698,13 @@ static void s3c2410_nand_init_chip(struct s3c2410_nand_info *info, chip->select_chip = s3c2410_nand_select_chip; chip->chip_delay = 50; chip->priv = nmtd; - chip->options = 0; chip->controller = &info->controller; + if (set->flags & S3C2410_NAND_BBT) + chip->options = NAND_USE_FLASH_BBT; + else + chip->options = 0; + switch (info->cpu_type) { case TYPE_S3C2410: chip->IO_ADDR_W = regs + S3C2410_NFDATA; |