mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant
Subsystems (2)
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.
Signed-off-by Akinobu Mita <[email protected]>
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
@@ -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
Quoted 7 lines · Akinobu Mita
Use
NAND_CI_CELLTYPE_MSKto extract the cell type from nand_chip.cellinfo instead of hardcoded constant.Signed-off-by Akinobu Mita <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc David Woodhouse <[email protected]>
Acked-by Brian Norris <[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
Brian Norris
AppliedQuoted 7 lines · Akinobu Mita
Use
NAND_CI_CELLTYPE_MSKto extract the cell type from nand_chip.cellinfo instead of hardcoded constant.Signed-off-by Akinobu Mita <[email protected]>Cc Artem Bityutskiy <[email protected]>Cc David Woodhouse <[email protected]>
Applied to l2-mtd.git. Thanks!
Brian