Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,16 @@ static int __maybe_unused axi_dma_runtime_resume(struct device *dev)
return axi_dma_resume(chip);
}

static void dw_axi_dma_device_caps(struct dma_chan *dchan,
struct dma_slave_caps *caps)
{
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
struct dw_axi_dma *dw = chan->chip->dw;

if (dw->hdata->restrict_axi_burst_len)
caps->max_burst = dw->hdata->axi_rw_burst_len[chan->id];
}

static bool dw_axi_dma_filter_fn(struct dma_chan *dchan, void *filter_param)
{
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
Expand Down Expand Up @@ -1720,7 +1730,7 @@ static int dw_probe(struct platform_device *pdev)
dma_cap_set(DMA_CYCLIC, dw->dma.cap_mask);

/* DMA capabilities */
dw->dma.max_burst = hdata->axi_rw_burst_len[0];
dw->dma.device_caps = dw_axi_dma_device_caps;
dw->dma.src_addr_widths = AXI_DMA_BUSWIDTHS;
dw->dma.dst_addr_widths = AXI_DMA_BUSWIDTHS;
dw->dma.directions = BIT(DMA_MEM_TO_MEM);
Expand Down