]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: nand: qcom: support for passing flags in DMA helper functions
authorAbhishek Sahu <absahu@codeaurora.org>
Thu, 17 Aug 2017 12:07:42 +0000 (17:37 +0530)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 14:49:27 +0000 (16:49 +0200)
commite3235a45124aff13db653ac43b62f52956835ad4
tree2e97c81766468b3e5a5cfe725a7fee311d69907b
parente6a6ffc4a05db62efe0a1b5b5feee3fc40e1dd65
mtd: nand: qcom: support for passing flags in DMA helper functions

The QPIC NAND BAM has multiple flags to control the transfer. This
patch adds flags parameter in register and data transfer DMA helper
functions and modifies all these functions call with appropriate
flags using following rule

1. Read and write can’t go in single command descriptor so
   separate SGL should be used.
2. For some of the requests, NWD flag should be set in BAM
   DMA descriptor.
3. For Data write, the BAM has internal buffer for each codeword.
   All write request will modify the data in internal buffer and
   this buffer will be flushed to NAND device once EOT flag is set.
   So for all the write requests in single codeword, the EOT should
   be cleared for all tx data descriptors except the last one.

Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/qcom_nandc.c