Skip to contentSkip to conversation

mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant

PATCH Applied Akinobu Mita 2 participants 3 messages Jul 27, 2013 – Aug 7, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant

Use NAND_CI_CELLTYPE_MSK to extract the cell type from nand_chip.cellinfo instead of hardcoded constant.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>
---
 drivers/mtd/nand/denali.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/denali.c +1 -1
index 0c8bb6b..2ed2bb3 100644
@@ -1520,7 +1520,7 @@ int denali_init(struct denali_nand_info *denali)
 	 * so just let controller do 15bit ECC for MLC and 8bit ECC for
 	 * SLC if possible.
 	 * */
-	if (denali->nand.cellinfo & 0xc &&
+	if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK &&
 			(denali->mtd.oobsize > (denali->bbtskipbytes +
 			ECC_15BITS * (denali->mtd.writesize /
 			ECC_SECTOR_SIZE)))) {
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Akinobu Mita

Use NAND_CI_CELLTYPE_MSK to extract the cell type from nand_chip.cellinfo instead of hardcoded constant.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>

A comment not necessarily pertinent to this change: we don't set the 'cellinfo' field for ONFI chips, so this test for MLC won't be correct for ONFI NAND.

Brian