diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-06-15 05:22:12 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-07-11 02:39:59 -0400 |
commit | 252173c69eec6998ecf1be7b11d31cd39ce92c9c (patch) | |
tree | 49abcd1e9b6a50d759254e9fe52d781d0c61d638 /drivers/mtd | |
parent | 1d6b1e4649500c170fb6e243c0b92f40bb8a0185 (diff) |
mtd: nand: sunxi: Fix OOB bytes retrieval in read_chunks_dma()
The column address passed to the RNDOUT operation was missing the page
size offset.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 614049a8d904 ("mtd: nand: sunxi: add support for DMA assisted operations")
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/sunxi_nand.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index 653cb3a06cbe..b9a2e5d28754 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c | |||
@@ -1094,7 +1094,8 @@ static int sunxi_nfc_hw_ecc_read_chunks_dma(struct mtd_info *mtd, uint8_t *buf, | |||
1094 | 1094 | ||
1095 | if (oob_required && !erased) { | 1095 | if (oob_required && !erased) { |
1096 | /* TODO: use DMA to retrieve OOB */ | 1096 | /* TODO: use DMA to retrieve OOB */ |
1097 | nand->cmdfunc(mtd, NAND_CMD_RNDOUT, oob_off, -1); | 1097 | nand->cmdfunc(mtd, NAND_CMD_RNDOUT, |
1098 | mtd->writesize + oob_off, -1); | ||
1098 | nand->read_buf(mtd, oob, ecc->bytes + 4); | 1099 | nand->read_buf(mtd, oob, ecc->bytes + 4); |
1099 | 1100 | ||
1100 | sunxi_nfc_hw_ecc_get_prot_oob_bytes(mtd, oob, i, | 1101 | sunxi_nfc_hw_ecc_get_prot_oob_bytes(mtd, oob, i, |
@@ -1129,7 +1130,8 @@ static int sunxi_nfc_hw_ecc_read_chunks_dma(struct mtd_info *mtd, uint8_t *buf, | |||
1129 | } | 1130 | } |
1130 | 1131 | ||
1131 | /* TODO: use DMA to retrieve OOB */ | 1132 | /* TODO: use DMA to retrieve OOB */ |
1132 | nand->cmdfunc(mtd, NAND_CMD_RNDOUT, oob_off, -1); | 1133 | nand->cmdfunc(mtd, NAND_CMD_RNDOUT, |
1134 | mtd->writesize + oob_off, -1); | ||
1133 | nand->read_buf(mtd, oob, ecc->bytes + 4); | 1135 | nand->read_buf(mtd, oob, ecc->bytes + 4); |
1134 | 1136 | ||
1135 | ret = nand_check_erased_ecc_chunk(data, ecc->size, | 1137 | ret = nand_check_erased_ecc_chunk(data, ecc->size, |