MLK-11259-1: dmaengine: imx-sdma: support dual fifo for DEV_TO_DEV
As SSI has dual fifo, add src_dualfifo and dst_dualfifo in imx_dma_data to support dual fifo in DMA_DEV_TO_DEV. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit cfde1308f170166a0099ca39ee8733895f9626f0) (Vipul: Fixed merge conflicts) Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com> Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com> (cherry picked from commit 0ea90e5f83725fe5e4b8933cc546c1ff22156717) Signed-off-by: Robin Gong <yibin.gong@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
e977370b6d
commit
a89c75d447
|
@ -170,6 +170,8 @@
|
|||
#define SDMA_WATERMARK_LEVEL_SPDIF BIT(10)
|
||||
#define SDMA_WATERMARK_LEVEL_SP BIT(11)
|
||||
#define SDMA_WATERMARK_LEVEL_DP BIT(12)
|
||||
#define SDMA_WATERMARK_LEVEL_SD BIT(13)
|
||||
#define SDMA_WATERMARK_LEVEL_DD BIT(14)
|
||||
#define SDMA_WATERMARK_LEVEL_HWML (0xFF << 16)
|
||||
#define SDMA_WATERMARK_LEVEL_LWE BIT(28)
|
||||
#define SDMA_WATERMARK_LEVEL_HWE BIT(29)
|
||||
|
@ -382,6 +384,8 @@ struct sdma_channel {
|
|||
struct imx_dma_data data;
|
||||
struct work_struct terminate_worker;
|
||||
bool is_ram_script;
|
||||
bool src_dualfifo;
|
||||
bool dst_dualfifo;
|
||||
};
|
||||
|
||||
#define IMX_DMA_SG_LOOP BIT(0)
|
||||
|
@ -1239,6 +1243,11 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
|
|||
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DP;
|
||||
|
||||
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_CONT;
|
||||
|
||||
if (sdmac->src_dualfifo)
|
||||
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_SD;
|
||||
if (sdmac->dst_dualfifo)
|
||||
sdmac->watermark_level |= SDMA_WATERMARK_LEVEL_DD;
|
||||
}
|
||||
|
||||
static int sdma_config_channel(struct dma_chan *chan)
|
||||
|
@ -1421,6 +1430,8 @@ static int sdma_alloc_chan_resources(struct dma_chan *chan)
|
|||
sdmac->peripheral_type = data->peripheral_type;
|
||||
sdmac->event_id0 = data->dma_request;
|
||||
sdmac->event_id1 = data->dma_request2;
|
||||
sdmac->src_dualfifo = data->src_dualfifo;
|
||||
sdmac->dst_dualfifo = data->dst_dualfifo;
|
||||
|
||||
ret = clk_enable(sdmac->sdma->clk_ipg);
|
||||
if (ret)
|
||||
|
@ -2102,6 +2113,8 @@ static struct dma_chan *sdma_xlate(struct of_phandle_args *dma_spec,
|
|||
if (dma_spec->args_count != 3)
|
||||
return NULL;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
data.dma_request = dma_spec->args[0];
|
||||
data.peripheral_type = dma_spec->args[1];
|
||||
data.priority = dma_spec->args[2];
|
||||
|
|
Loading…
Reference in New Issue