Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fdcf684 authored by Vinod Koul's avatar Vinod Koul
Browse files

carma-fpga: use dmaengine_xxx() API



The drivers should use dmaengine_slave_config() and dmaengine_prep_dma_sg()
API instead of accessing the device_control which will be deprecated soon

Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 0a5642be
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -518,8 +518,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
	config.direction = DMA_MEM_TO_DEV;
	config.direction = DMA_MEM_TO_DEV;
	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
	config.dst_maxburst = fpga_fifo_size(priv->regs) / 2 / 4;
	config.dst_maxburst = fpga_fifo_size(priv->regs) / 2 / 4;
	ret = chan->device->device_control(chan, DMA_SLAVE_CONFIG,
	ret = dmaengine_slave_config(chan, &config);
					   (unsigned long)&config);
	if (ret) {
	if (ret) {
		dev_err(priv->dev, "DMA slave configuration failed\n");
		dev_err(priv->dev, "DMA slave configuration failed\n");
		goto out_dma_unmap;
		goto out_dma_unmap;
@@ -532,8 +531,8 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
	}
	}


	/* setup and submit the DMA transaction */
	/* setup and submit the DMA transaction */
	tx = chan->device->device_prep_dma_sg(chan,

					      table.sgl, num_pages,
	tx = dmaengine_prep_dma_sg(chan, table.sgl, num_pages,
			vb->sglist, vb->sglen, 0);
			vb->sglist, vb->sglen, 0);
	if (!tx) {
	if (!tx) {
		dev_err(priv->dev, "Unable to prep DMA transaction\n");
		dev_err(priv->dev, "Unable to prep DMA transaction\n");