diff options
author | Huang Shijie <b32955@freescale.com> | 2013-09-25 02:58:10 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2013-10-27 19:27:04 -0400 |
commit | 1d0ed69ddd714b6e2a974f42896463366923ded6 (patch) | |
tree | 958946ae1a2823cea55b6a1a4d4e4417faa6896b /drivers/mtd/nand/denali.c | |
parent | 4ae7d228d6048d25a16bee209ebea24c5ecde825 (diff) |
mtd: nand: add a helper to check the SLC/MLC nand chip
Add a helper to check if a nand chip is SLC or MLC.
This helper makes the code more readable.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/denali.c')
-rw-r--r-- | drivers/mtd/nand/denali.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 154b033b4e8e..370b9dd7a278 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
@@ -1520,7 +1520,7 @@ int denali_init(struct denali_nand_info *denali) | |||
1520 | * so just let controller do 15bit ECC for MLC and 8bit ECC for | 1520 | * so just let controller do 15bit ECC for MLC and 8bit ECC for |
1521 | * SLC if possible. | 1521 | * SLC if possible. |
1522 | * */ | 1522 | * */ |
1523 | if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK && | 1523 | if (!nand_is_slc(&denali->nand) && |
1524 | (denali->mtd.oobsize > (denali->bbtskipbytes + | 1524 | (denali->mtd.oobsize > (denali->bbtskipbytes + |
1525 | ECC_15BITS * (denali->mtd.writesize / | 1525 | ECC_15BITS * (denali->mtd.writesize / |
1526 | ECC_SECTOR_SIZE)))) { | 1526 | ECC_SECTOR_SIZE)))) { |