]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Aug 2012 23:41:07 +0000 (16:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Aug 2012 23:41:07 +0000 (16:41 -0700)
Pull ARM DMA engine updates from Russell King:
 "This looks scary at first glance, but what it is is:
   - a rework of the sa11x0 DMA engine driver merged during the previous
     cycle, to extract a common set of helper functions for DMA engine
     implementations.
   - conversion of amba-pl08x.c to use these helper functions.
   - addition of OMAP DMA engine driver (using these helper functions),
     and conversion of some of the OMAP DMA users to use DMA engine.

  Nothing in the helper functions is ARM specific, so I hope that other
  implementations can consolidate some of their code by making use of
  these helpers.

  This has been sitting in linux-next most of the merge cycle, and has
  been tested by several OMAP folk.  I've tested it on sa11x0 platforms,
  and given it my best shot on my broken platforms which have the
  amba-pl08x controller.

  The last point is the addition to feature-removal-schedule.txt, which
  will have a merge conflict.  Between myself and TI, we're planning to
  remove the old TI DMA implementation next year."

Fix up trivial add/add conflicts in Documentation/feature-removal-schedule.txt
and drivers/dma/{Kconfig,Makefile}

* 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm: (53 commits)
  ARM: 7481/1: OMAP2+: omap2plus_defconfig: enable OMAP DMA engine
  ARM: 7464/1: mmc: omap_hsmmc: ensure probe returns error if DMA channel request fails
  Add feature removal of old OMAP private DMA implementation
  mtd: omap2: remove private DMA API implementation
  mtd: omap2: add DMA engine support
  spi: omap2-mcspi: remove private DMA API implementation
  spi: omap2-mcspi: add DMA engine support
  ARM: omap: remove mmc platform data dma_mask and initialization
  mmc: omap: remove private DMA API implementation
  mmc: omap: add DMA engine support
  mmc: omap_hsmmc: remove private DMA API implementation
  mmc: omap_hsmmc: add DMA engine support
  dmaengine: omap: add support for cyclic DMA
  dmaengine: omap: add support for setting fi
  dmaengine: omap: add support for returning residue in tx_state method
  dmaengine: add OMAP DMA engine driver
  dmaengine: sa11x0-dma: add cyclic DMA support
  dmaengine: sa11x0-dma: fix DMA residue support
  dmaengine: PL08x: ensure all descriptors are freed when channel is released
  dmaengine: PL08x: get rid of write only pool_ctr and free_txd locking
  ...

1  2 
Documentation/feature-removal-schedule.txt
arch/arm/configs/omap2plus_defconfig
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-spear3xx/spear3xx.c
arch/arm/mach-spear6xx/spear6xx.c
drivers/dma/Kconfig
drivers/dma/Makefile
drivers/mmc/host/omap_hsmmc.c
drivers/spi/spi-omap2-mcspi.c

index 72ed15075f79d8de0eed70971adbe2345aa252fa,1f7ba3537a8557d2f61fe91a73862b5cb8b077f9..afaff312bf415acb59449aeb9bee4c848c197ff2
@@@ -595,34 -613,13 +595,45 @@@ Why:    Unsupported/unmaintained/unused si
  
  ----------------------------
  
 +What: V4L2 selections API target rectangle and flags unification, the
 +      following definitions will be removed: V4L2_SEL_TGT_CROP_ACTIVE,
 +      V4L2_SEL_TGT_COMPOSE_ACTIVE, V4L2_SUBDEV_SEL_*, V4L2_SUBDEV_SEL_FLAG_*
 +      in favor of common V4L2_SEL_TGT_* and V4L2_SEL_FLAG_* definitions.
 +      For more details see include/linux/v4l2-common.h.
 +When: 3.8
 +Why:  The regular V4L2 selections and the subdev selection API originally
 +      defined distinct names for the target rectangles and flags - V4L2_SEL_*
 +      and V4L2_SUBDEV_SEL_*. Although, it turned out that the meaning of these
 +      target rectangles is virtually identical and the APIs were consolidated
 +      to use single set of names - V4L2_SEL_*. This didn't involve any ABI
 +      changes. Alias definitions were created for the original ones to avoid
 +      any instabilities in the user space interface. After few cycles these
 +      backward compatibility definitions will be removed.
 +Who:  Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
 +
 +----------------------------
 +
 +What: Using V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags
 +      to indicate a V4L2 memory-to-memory device capability
 +When: 3.8
 +Why:  New drivers should use new V4L2_CAP_VIDEO_M2M capability flag
 +      to indicate a V4L2 video memory-to-memory (M2M) device and
 +      applications can now identify a M2M video device by checking
 +      for V4L2_CAP_VIDEO_M2M, with VIDIOC_QUERYCAP ioctl. Using ORed
 +      V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags for M2M
 +      devices is ambiguous and may lead, for example, to identifying
 +      a M2M device as a video capture or output device.
 +Who:  Sylwester Nawrocki <s.nawrocki@samsung.com>
 +
 +----------------------------
++
+ What: OMAP private DMA implementation
+ When: 2013
+ Why:  We have a DMA engine implementation; all users should be updated
+       to use this rather than persisting with the old APIs.  The old APIs
+       block merging the old DMA engine implementation into the DMA
+       engine driver.
+ Who:  Russell King <linux@arm.linux.org.uk>,
+       Santosh Shilimkar <santosh.shilimkar@ti.com>
+ ----------------------------
Simple merge
Simple merge
Simple merge
Simple merge
index d45cf1bcbde5f6b096d5cf38bf13b9c9ddf23a86,6f93365d9d04727f33c80109058ed892b3ead51c..d06ea2950dd9ffb9ad266bcedbb2db934e020376
@@@ -274,16 -262,12 +276,22 @@@ config DMA_SA11X
          SA-1110 SoCs.  This DMA engine can only be used with on-chip
          devices.
  
 +config MMP_TDMA
 +      bool "MMP Two-Channel DMA support"
 +      depends on ARCH_MMP
 +      select DMA_ENGINE
 +      help
 +        Support the MMP Two-Channel DMA engine.
 +        This engine used for MMP Audio DMA and pxa910 SQU.
 +
 +        Say Y here if you enabled MMP ADMA, otherwise say N.
 +
+ config DMA_OMAP
+       tristate "OMAP DMA support"
+       depends on ARCH_OMAP
+       select DMA_ENGINE
+       select DMA_VIRTUAL_CHANNELS
  config DMA_ENGINE
        bool
  
index 640356add0a31f0bea96cc0568a2f290e41b0494,ddc291a2116a575fbfc29844d19dac6ab6580d2d..4cf6b128ab9a466b8f4c2c5237064f0f8e80846f
@@@ -29,4 -29,4 +30,5 @@@ obj-$(CONFIG_PCH_DMA) += pch_dma.
  obj-$(CONFIG_AMBA_PL08X) += amba-pl08x.o
  obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o
  obj-$(CONFIG_DMA_SA11X0) += sa11x0-dma.o
 +obj-$(CONFIG_MMP_TDMA) += mmp_tdma.o
+ obj-$(CONFIG_DMA_OMAP) += omap-dma.o
index bc28627af66b961372f0f38cc0bbe61d621cc99a,823d21cb87c01cf9673d90f682479fd234470cb3..3a09f93cc3b6f846a2b4cd327a7fd2a4524e31bc
@@@ -1931,18 -1907,33 +1907,35 @@@ static int __devinit omap_hsmmc_probe(s
        res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
        if (!res) {
                dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
 +              ret = -ENXIO;
                goto err_irq;
        }
-       host->dma_line_tx = res->start;
+       tx_req = res->start;
  
        res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
        if (!res) {
                dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
 +              ret = -ENXIO;
                goto err_irq;
        }
-       host->dma_line_rx = res->start;
+       rx_req = res->start;
+       dma_cap_zero(mask);
+       dma_cap_set(DMA_SLAVE, mask);
+       host->rx_chan = dma_request_channel(mask, omap_dma_filter_fn, &rx_req);
+       if (!host->rx_chan) {
+               dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
+               ret = -ENXIO;
+               goto err_irq;
+       }
+       host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &tx_req);
+       if (!host->tx_chan) {
+               dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
+               ret = -ENXIO;
+               goto err_irq;
+       }
  
        /* Request IRQ for MMC operations */
        ret = request_irq(host->irq, omap_hsmmc_irq, 0,
index 7d46b15e1520d0613b02cca28a5206f5123db4db,26a99ae9a599e7befaba86cde359c2eb997d731b..bc4778175e343c6a9ebeceac09b0cc543c935bc2
@@@ -404,11 -454,13 +455,14 @@@ omap2_mcspi_txrx_dma(struct spi_device 
  
        if (rx != NULL) {
                wait_for_completion(&mcspi_dma->dma_rx_completion);
 -              dma_unmap_single(&spi->dev, xfer->rx_dma, count, DMA_FROM_DEVICE);
 +              dma_unmap_single(mcspi->dev, xfer->rx_dma, count,
 +                               DMA_FROM_DEVICE);
                omap2_mcspi_set_enable(spi, 0);
  
+               elements = element_count - 1;
                if (l & OMAP2_MCSPI_CHCONF_TURBO) {
+                       elements--;
  
                        if (likely(mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHSTAT0)
                                   & OMAP2_MCSPI_CHSTAT_RXS)) {