Merge tag 'dmaengine-5.1-rc1' of git://git.infradead.org/users/vkoul/slave-dma
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Mar 2019 16:11:54 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Mar 2019 16:11:54 +0000 (09:11 -0700)
Pull dmaengine updates from Vinod Koul:

 - dmatest updates for modularizing common struct and code

 - remove SG support for VDMA xilinx IP and updates to driver

 - Update to dw driver to support Intel iDMA controllers multi-block
   support

 - tegra updates for proper reporting of residue

 - Add Snow Ridge ioatdma device id and support for IOATDMA v3.4

 - struct_size() usage and useless LIST_HEAD cleanups in subsystem.

 - qDMA controller driver for Layerscape SoCs

 - stm32-dma PM Runtime support

 - And usual updates to imx-sdma, sprd, Documentation, fsl-edma,
   bcm2835, qcom_hidma etc

* tag 'dmaengine-5.1-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (81 commits)
  dmaengine: imx-sdma: fix consistent dma test failures
  dmaengine: imx-sdma: add a test for imx8mq multi sdma devices
  dmaengine: imx-sdma: add clock ratio 1:1 check
  dmaengine: dmatest: move test data alloc & free into functions
  dmaengine: dmatest: add short-hand `buf_size` var in dmatest_func()
  dmaengine: dmatest: wrap src & dst data into a struct
  dmaengine: ioatdma: support latency tolerance report (LTR) for v3.4
  dmaengine: ioatdma: add descriptor pre-fetch support for v3.4
  dmaengine: ioatdma: disable DCA enabling on IOATDMA v3.4
  dmaengine: ioatdma: Add Snow Ridge ioatdma device id
  dmaengine: sprd: Change channel id to slave id for DMA cell specifier
  dt-bindings: dmaengine: sprd: Change channel id to slave id for DMA cell specifier
  dmaengine: mv_xor: Use correct device for DMA API
  Documentation :dmaengine: clarify DMA desc. pointer after submission
  Documentation: dmaengine: fix dmatest.rst warning
  dmaengine: k3dma: Add support for dma-channel-mask
  dmaengine: k3dma: Delete axi_config
  dmaengine: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware
  Documentation: bindings: dma: Add binding for dma-channel-mask
  Documentation: bindings: k3dma: Extend the k3dma driver binding to support hisi-asp
  ...

1  2 
drivers/dma/dmatest.c
drivers/dma/imx-dma.c
drivers/dma/imx-sdma.c
drivers/dma/xilinx/xilinx_dma.c

index 6511928b4cdfe11c944223a8c7e3e8b0f8b9cc96,50221d467d86e39201579165f955b135a3d74b95..b96814a7dceb1916d793155b1dd0d0eed8d32a34
@@@ -708,12 -726,14 +726,12 @@@ static int dmatest_func(void *data
  
                        um->addr[i] = dma_map_page(dev->dev, pg, pg_off,
                                                   um->len, DMA_TO_DEVICE);
-                       srcs[i] = um->addr[i] + src_off;
+                       srcs[i] = um->addr[i] + src->off;
                        ret = dma_mapping_error(dev->dev, um->addr[i]);
                        if (ret) {
 -                              dmaengine_unmap_put(um);
                                result("src mapping error", total_tests,
-                                      src_off, dst_off, len, ret);
+                                      src->off, dst->off, len, ret);
 -                              failed_tests++;
 -                              continue;
 +                              goto error_unmap_continue;
                        }
                        um->to_cnt++;
                }
                                               DMA_BIDIRECTIONAL);
                        ret = dma_mapping_error(dev->dev, dsts[i]);
                        if (ret) {
 -                              dmaengine_unmap_put(um);
                                result("dst mapping error", total_tests,
-                                      src_off, dst_off, len, ret);
+                                      src->off, dst->off, len, ret);
 -                              failed_tests++;
 -                              continue;
 +                              goto error_unmap_continue;
                        }
                        um->bidi_cnt++;
                }
                }
  
                if (!tx) {
-                       result("prep error", total_tests, src_off,
-                              dst_off, len, ret);
 -                      dmaengine_unmap_put(um);
+                       result("prep error", total_tests, src->off,
+                              dst->off, len, ret);
                        msleep(100);
 -                      failed_tests++;
 -                      continue;
 +                      goto error_unmap_continue;
                }
  
                done->done = false;
                cookie = tx->tx_submit(tx);
  
                if (dma_submit_error(cookie)) {
-                       result("submit error", total_tests, src_off,
-                              dst_off, len, ret);
 -                      dmaengine_unmap_put(um);
+                       result("submit error", total_tests, src->off,
+                              dst->off, len, ret);
                        msleep(100);
 -                      failed_tests++;
 -                      continue;
 +                      goto error_unmap_continue;
                }
                dma_async_issue_pending(chan);
  
  
                status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
  
 -              dmaengine_unmap_put(um);
 -
                if (!done->done) {
-                       result("test timed out", total_tests, src_off, dst_off,
+                       result("test timed out", total_tests, src->off, dst->off,
                               len, 0);
 -                      failed_tests++;
 -                      continue;
 +                      goto error_unmap_continue;
                } else if (status != DMA_COMPLETE) {
                        result(status == DMA_ERROR ?
                               "completion error status" :
-                              "completion busy status", total_tests, src_off,
-                              dst_off, len, ret);
+                              "completion busy status", total_tests, src->off,
+                              dst->off, len, ret);
 -                      failed_tests++;
 -                      continue;
 +                      goto error_unmap_continue;
                }
  
 +              dmaengine_unmap_put(um);
 +
                if (params->noverify) {
-                       verbose_result("test passed", total_tests, src_off,
-                                      dst_off, len, 0);
+                       verbose_result("test passed", total_tests, src->off,
+                                      dst->off, len, 0);
                        continue;
                }
  
                               len, error_count);
                        failed_tests++;
                } else {
-                       verbose_result("test passed", total_tests, src_off,
-                                      dst_off, len, 0);
+                       verbose_result("test passed", total_tests, src->off,
+                                      dst->off, len, 0);
                }
 +
 +              continue;
 +
 +error_unmap_continue:
 +              dmaengine_unmap_put(um);
 +              failed_tests++;
        }
        ktime = ktime_sub(ktime_get(), ktime);
        ktime = ktime_sub(ktime, comparetime);
Simple merge
index 86708fb9bda1f6d082cd02a47c9a95ad1bb9643a,88197d5ac3b97cb3463cd681d2c8b8d756df4741..5f3c1378b90ebf242334cee0130630e32af037e3
@@@ -1182,8 -1194,8 +1194,8 @@@ static int sdma_request_channel0(struc
  {
        int ret = -EBUSY;
  
-       sdma->bd0 = dma_alloc_coherent(NULL, PAGE_SIZE, &sdma->bd0_phys,
-                                      GFP_NOWAIT);
 -      sdma->bd0 = dma_zalloc_coherent(sdma->dev, PAGE_SIZE, &sdma->bd0_phys,
++      sdma->bd0 = dma_alloc_coherent(sdma->dev, PAGE_SIZE, &sdma->bd0_phys,
+                                       GFP_NOWAIT);
        if (!sdma->bd0) {
                ret = -ENOMEM;
                goto out;
@@@ -1205,8 -1217,8 +1217,8 @@@ static int sdma_alloc_bd(struct sdma_de
        u32 bd_size = desc->num_bd * sizeof(struct sdma_buffer_descriptor);
        int ret = 0;
  
-       desc->bd = dma_alloc_coherent(NULL, bd_size, &desc->bd_phys,
-                                     GFP_NOWAIT);
 -      desc->bd = dma_zalloc_coherent(desc->sdmac->sdma->dev, bd_size,
++      desc->bd = dma_alloc_coherent(desc->sdmac->sdma->dev, bd_size,
+                                      &desc->bd_phys, GFP_NOWAIT);
        if (!desc->bd) {
                ret = -ENOMEM;
                goto out;
Simple merge