aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/nand_base.c7
-rw-r--r--include/linux/mtd/nand.h3
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index ead301a455ee..996cc4836885 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2909,8 +2909,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
2909 if (le16_to_cpu(p->features) & 1) 2909 if (le16_to_cpu(p->features) & 1)
2910 *busw = NAND_BUSWIDTH_16; 2910 *busw = NAND_BUSWIDTH_16;
2911 2911
2912 chip->options &= ~NAND_CHIPOPTIONS_MSK;
2913
2914 pr_info("ONFI flash detected\n"); 2912 pr_info("ONFI flash detected\n");
2915 return 1; 2913 return 1;
2916} 2914}
@@ -3074,9 +3072,8 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
3074 mtd->erasesize <<= ((id_data[3] & 0x03) << 1); 3072 mtd->erasesize <<= ((id_data[3] & 0x03) << 1);
3075 } 3073 }
3076 } 3074 }
3077 /* Get chip options, preserve non chip based options */ 3075 /* Get chip options */
3078 chip->options &= ~NAND_CHIPOPTIONS_MSK; 3076 chip->options |= type->options;
3079 chip->options |= type->options & NAND_CHIPOPTIONS_MSK;
3080 3077
3081 /* 3078 /*
3082 * Check if chip is not a Samsung device. Do not clear the 3079 * Check if chip is not a Samsung device. Do not clear the
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 6dce5a7154bb..eeb70153b646 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -206,9 +206,6 @@ typedef enum {
206#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \ 206#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \
207 && (chip->page_shift > 9)) 207 && (chip->page_shift > 9))
208 208
209/* Mask to zero out the chip options, which come from the id table */
210#define NAND_CHIPOPTIONS_MSK 0x0000ffff
211
212/* Non chip related options */ 209/* Non chip related options */
213/* This option skips the bbt scan during initialization. */ 210/* This option skips the bbt scan during initialization. */
214#define NAND_SKIP_BBTSCAN 0x00010000 211#define NAND_SKIP_BBTSCAN 0x00010000