diff options
| -rw-r--r-- | drivers/mtd/nand/nand_base.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index a3c7473dd409..a22ed7b281ce 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
| @@ -2934,14 +2934,10 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, | |||
| 2934 | chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 32 - 1; | 2934 | chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 32 - 1; |
| 2935 | 2935 | ||
| 2936 | /* Set the bad block position */ | 2936 | /* Set the bad block position */ |
| 2937 | if (!(busw & NAND_BUSWIDTH_16) && (*maf_id == NAND_MFR_STMICRO || | 2937 | if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16)) |
| 2938 | (*maf_id == NAND_MFR_SAMSUNG && | ||
| 2939 | mtd->writesize == 512) || | ||
| 2940 | *maf_id == NAND_MFR_AMD)) | ||
| 2941 | chip->badblockpos = NAND_SMALL_BADBLOCK_POS; | ||
| 2942 | else | ||
| 2943 | chip->badblockpos = NAND_LARGE_BADBLOCK_POS; | 2938 | chip->badblockpos = NAND_LARGE_BADBLOCK_POS; |
| 2944 | 2939 | else | |
| 2940 | chip->badblockpos = NAND_SMALL_BADBLOCK_POS; | ||
| 2945 | 2941 | ||
| 2946 | /* Get chip options, preserve non chip based options */ | 2942 | /* Get chip options, preserve non chip based options */ |
| 2947 | chip->options &= ~NAND_CHIPOPTIONS_MSK; | 2943 | chip->options &= ~NAND_CHIPOPTIONS_MSK; |
