Allow writing ecc parity region in raw mode. This makes sure the
nand write.raw command can write the flash data as-is.

Change-Id: Ibed3bdf13c9cf81e54041c5ac7a78192b97dcedc
Signed-off-by: Weijie Gao <weijie....@mediatek.com>
CR-Id: WCNCR00180092
---
 drivers/mtd/nand/raw/mt7621_nand.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/raw/mt7621_nand.c 
b/drivers/mtd/nand/raw/mt7621_nand.c
index f6eddb84a9..341ef0bf2d 100644
--- a/drivers/mtd/nand/raw/mt7621_nand.c
+++ b/drivers/mtd/nand/raw/mt7621_nand.c
@@ -1003,9 +1003,9 @@ static int mt7621_nfc_write_page_raw(struct mtd_info *mtd,
                mt7621_nfc_write_data(nfc, oob_fdm_ptr(nand, i),
                                      NFI_FDM_SIZE);
 
-               /* Write dummy ECC parity data */
-               mt7621_nfc_write_data_empty(nfc, nfc->spare_per_sector -
-                                           NFI_FDM_SIZE);
+               /* Write ECC parity data */
+               mt7621_nfc_write_data(nfc, oob_ecc_ptr(nfc, i),
+                                     nfc->spare_per_sector - NFI_FDM_SIZE);
        }
 
        mt7621_nfc_wait_write_completion(nfc, nand);
-- 
2.34.1

Reply via email to