MLK-14482-2: dma: imx-sdma: add virt-dma support
authorRobin Gong <yibin.gong@nxp.com>
Fri, 17 Mar 2017 09:31:11 +0000 (17:31 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:37 +0000 (15:21 -0500)
commitab908e0cf68e3c65c377ccd1d8cc07b33657594d
tree0ba2b329753fa50b906a3d058b8768f42483fe2b
parent796a419f54774b211b31c4376f4d8938ee343001
MLK-14482-2: dma: imx-sdma: add virt-dma support

This patch cherry-pick the blow patch from v4.1.y, and resove
conflicts.

commit 70805e9da3fd25eebf0e141a5cda48fba310c5f5
Author: Robin Gong <b38343@freescale.com>
Date:   Mon Aug 17 16:04:48 2015 +0800

    MLK-11358-3: dma: imx-sdma: add virt-dma support

    Old sdma can't support multi instances, because next transfer will return
    error if the last transfer not done(sdmac->status == DMA_IN_PROGRESS). virt
    dma is a common framework for versus dma drivers, and it's support multi
    instances, driver can dynamicly alloc description and add it to list which
    will be handled in the last sdma transfer done later.

    Another advantage of this patch is to clean up the constrain of max bd numer:
    --#define NUM_BD (int)(PAGE_SIZE / sizeof(struct sdma_buffer_descriptor))
    in other words, now sdma driver can support any length data now.

    Meanwhile, remove sdma_load_context() in prep_* everytime, since it can do
    only once in config channel.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
drivers/dma/Kconfig
drivers/dma/imx-sdma.c