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

Commit 4007e2d1 authored by Ron Lee's avatar Ron Lee Committed by Brian Norris
Browse files

NAND_ECC_SOFT_BCH can support subpage reads too

parent 96ba9dd6
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -4047,8 +4047,16 @@ int nand_scan_tail(struct mtd_info *mtd)
	chip->pagebuf = -1;

	/* Large page NAND with SOFT_ECC should support subpage reads */
	if ((ecc->mode == NAND_ECC_SOFT) && (chip->page_shift > 9))
	switch (ecc->mode) {
	case NAND_ECC_SOFT:
	case NAND_ECC_SOFT_BCH:
		if (chip->page_shift > 9)
			chip->options |= NAND_SUBPAGE_READ;
		break;

	default:
		break;
	}

	/* Fill in remaining MTD driver data */
	mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH;