[RFC PATCH v2 1/6] mtd: nand: provide several helpers to do common NAND operations
Boris Brezillon
boris.brezillon at free-electrons.com
Wed Nov 8 02:48:03 PST 2017
On Tue, 7 Nov 2017 15:54:14 +0100
Miquel Raynal <miquel.raynal at free-electrons.com> wrote:
> From: Boris Brezillon <boris.brezillon at free-electrons.com>
>
> This is part of the process of removing direct calls to ->cmdfunc()
> outside of the core in order to introduce a better interface to execute
> NAND operations.
I found a few more call-sites that should be patched (see this diff
[1]).
>
> Here we provide several helpers and make use of them to remove all
> direct calls to ->cmdfunc(). This way, we can easily modify those
> helpers to make use of the new ->exec_op() interface when available.
>
> Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
> [miquel.raynal at free-electrons.com: rebased and fixed some conflicts]
> Signed-off-by: Miquel Raynal <miquel.raynal at free-electrons.com>
> ---
> @@ -1143,18 +1143,17 @@ static int sunxi_nfc_hw_ecc_read_chunks_dma(struct mtd_info *mtd, uint8_t *buf,
> /*
> * Re-read the data with the randomizer disabled to
> * identify bitflips in erased pages.
> + * TODO: use DMA to read page in raw mode
> */
> - if (randomized) {
> - /* TODO: use DMA to read page in raw mode */
> - nand->cmdfunc(mtd, NAND_CMD_RNDOUT,
> - data_off, -1);
> - nand->read_buf(mtd, data, ecc->size);
> - }
> + if (randomized)
> + nand_change_read_column_op(nand, data_off,
> + data, ecc->size
Missing comma at the end of this line.
> + false);
>
[1]http://code.bulix.org/orw2mr-224038
More information about the linux-mtd
mailing list