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

Commit d8a5cb32 authored by Sahitya Tummala's avatar Sahitya Tummala
Browse files

mtd: msm_qpic_nand: fix issue with page read in MTD_OPS_RAW mode



When only last codeword is read from a page using MTD_OPS_RAW
mode, the QPIC_NAND_DEV0_CFG0 register is getting incorrectly
programmed for cw_per_page[8:6] field. This will result in
the incorrect CW sequence for the subsequent page reads and
thus read will return incorrect data.

Change-Id: Ic97c275ae6305af9280b4faa94a6be5fed20c6d6
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent be05b187
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1056,7 +1056,10 @@ static void msm_nand_update_rw_reg_data(struct msm_nand_chip *chip,
			data->ecc_bch_cfg = chip->ecc_bch_cfg;
		} else {
			data->cmd = MSM_NAND_CMD_PAGE_READ_ALL;
			data->cfg0 = chip->cfg0_raw;
			data->cfg0 =
			(chip->cfg0_raw & ~(7U << CW_PER_PAGE)) |
			(((args->cwperpage-1) - args->start_sector)
			 << CW_PER_PAGE);
			data->cfg1 = chip->cfg1_raw;
			data->ecc_bch_cfg = chip->ecc_cfg_raw;
		}