Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07cc0fba authored by Akinobu Mita's avatar Akinobu Mita Committed by David Woodhouse
Browse files

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 52a073bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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
	 * so just let controller do 15bit ECC for MLC and 8bit ECC for
	 * SLC if possible.
	 * SLC if possible.
	 * */
	 * */
	if (denali->nand.cellinfo & 0xc &&
	if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK &&
			(denali->mtd.oobsize > (denali->bbtskipbytes +
			(denali->mtd.oobsize > (denali->bbtskipbytes +
			ECC_15BITS * (denali->mtd.writesize /
			ECC_15BITS * (denali->mtd.writesize /
			ECC_SECTOR_SIZE)))) {
			ECC_SECTOR_SIZE)))) {