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>