1. 30 4月, 2013 1 次提交
  2. 16 4月, 2013 1 次提交
    • A
      dma: acpi-dma: introduce ACPI DMA helpers · 1b2e98bc
      Andy Shevchenko 提交于
      There is a new generic API to get a DMA channel for a slave device (commit
      9a6cecc8 "dmaengine: add helper function to request a slave DMA channel"). In
      similar fashion to the DT case (commit aa3da644 "of: Add generic device tree
      DMA helpers") we introduce helpers to the DMAC drivers which are enumerated by
      ACPI.
      
      The proposed extension provides the following API calls:
      	acpi_dma_controller_register(), devm_acpi_dma_controller_register()
      	acpi_dma_controller_free(), devm_acpi_dma_controller_free()
      	acpi_dma_simple_xlate()
      	acpi_dma_request_slave_chan_by_index()
      	acpi_dma_request_slave_chan_by_name()
      
      The first two should be used, for example, at probe() and remove() of the
      corresponding DMAC driver. At the register stage the DMAC driver supplies a
      custom xlate() function to translate a struct dma_spec into struct dma_chan.
      
      Accordingly to the ACPI Fixed DMA resource specification the only two pieces of
      information the slave device has are the channel id and the request line (slave
      id). Those two are represented by struct dma_spec. The
      acpi_dma_request_slave_chan_by_index() provides access to the specifix FixedDMA
      resource by its index. Whereas dma_request_slave_channel() takes a string
      parameter to identify the DMA resources required by the slave device. To make a
      slave device driver work with both DeviceTree and ACPI enumeration a simple
      convention is established: "tx" corresponds to the index 0 and "rx" to the
      index 1. In case of robust configuration the slave device driver unfortunately
      needs to call acpi_dma_request_slave_chan_by_index() directly.
      
      Additionally the patch provides "managed" version of the register/free pair
      i.e. devm_acpi_dma_controller_register() and devm_acpi_dma_controller_free().
      Usually, the driver uses only devm_acpi_dma_controller_register().
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      1b2e98bc
  3. 14 2月, 2013 1 次提交
  4. 03 1月, 2013 1 次提交
  5. 14 9月, 2012 1 次提交
    • Z
      dmaengine: mmp-pdma support · c8acd6aa
      Zhangfei Gao 提交于
      1. virtual channel vs. physical channel
      Virtual channel is managed by dmaengine
      Physical channel handling resource, such as irq
      Physical channel is alloced dynamically as descending priority,
      freed immediately when irq done.
      The availble highest priority physically channel will alwayes be alloced
      
      Issue pending list -> alloc highest dma physically channel available -> dma done -> free physically channel
      
      2. list: running list & pending list
      submit: desc list -> pending list
      issue_pending_list: if (IDLE) pending list -> running list; free pending list (RUN)
      irq: free running list (IDLE)
           check pendlist -> pending list -> running list; free pending list (RUN)
      
      3. irq:
      Each list generate one irq, calling callback
      One list may contain several desc chain, in such case, make sure only the last desc list generate irq.
      
      4. async
      Submit will add desc chain to pending list, which can be multi-called
      If multi desc chain is submitted, only the last desc would generate irq -> call back
      If IDLE, issue_pending_list start pending_list, transforming pendlist to running list
      If RUN, irq will start pending list
      
      5. test
      5.1 pxa3xx_nand on pxa910
      5.2 insmod dmatest.ko (threads_per_chan=y)
      By default drivers/dma/dmatest.c test every channel and test memcpy with 1 threads per channel
      Signed-off-by: NZhangfei Gao <zhangfei.gao@marvell.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      c8acd6aa
  6. 01 9月, 2012 1 次提交
  7. 31 7月, 2012 1 次提交
  8. 13 7月, 2012 1 次提交
  9. 01 7月, 2012 1 次提交
  10. 20 6月, 2012 1 次提交
  11. 08 6月, 2012 1 次提交
  12. 07 3月, 2012 1 次提交
    • R
      DMA: sa11x0: add SA-11x0 DMA driver · 6365bead
      Russell King 提交于
      Add support for the SA-11x0 DMA driver, which replaces the private
      API version in arch/arm/mach-sa1100/dma.c.
      
      We model this as a set of virtual DMA channels, one for each request
      signal, and assign the virtual DMA channel to a physical DMA channel
      when there is work to be done.  This allows DMA users to claim their
      channels, and hold them while not in use, without affecting the
      availability of the physical channels.
      
      Another advantage over this approach, compared to the private version,
      is that a channel can be reconfigured on the fly without having to
      release and re-request it - which for the IrDA driver, allows us to
      use DMA for SIR mode transmit without eating up three physical
      channels.  As IrDA is half-duplex, we actually only need one physical
      channel, and this architecture allows us to achieve that.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6365bead
  13. 18 11月, 2011 1 次提交
  14. 09 6月, 2011 1 次提交
  15. 06 6月, 2011 1 次提交
  16. 17 3月, 2011 1 次提交
  17. 02 3月, 2011 1 次提交
    • S
      dmaengine: mxs-dma: add dma support for i.MX23/28 · a580b8c5
      Shawn Guo 提交于
      This patch adds dma support for Freescale MXS-based SoC i.MX23/28,
      including apbh-dma and apbx-dma.
      
      * apbh-dma and apbx-dma are supported in the driver as two mxs-dma
        instances.
      
      * apbh-dma is different between mx23 and mx28, hardware version
        register is used to differentiate.
      
      * mxs-dma supports pio function besides data transfer.  The driver
        uses dma_data_direction DMA_NONE to identify the pio mode, and
        steals sgl and sg_len to get pio words and numbers from clients.
      
      * mxs dmaengine has some very specific features, like sense function
        and the special NAND support (nand_lock, nand_wait4ready).  These
        are too specific to implemented in generic dmaengine driver.
      
      * The driver refers to imx-sdma and only a single descriptor is
        statically assigned to each channel.
      Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      a580b8c5
  18. 03 12月, 2010 1 次提交
  19. 08 10月, 2010 1 次提交
  20. 06 10月, 2010 1 次提交
    • S
      dmaengine: Add Freescale i.MX SDMA support · 1ec1e82f
      Sascha Hauer 提交于
      This patch adds support for the Freescale i.MX SDMA engine.
      
      The SDMA engine is a scatter/gather DMA engine which is implemented
      as a seperate coprocessor. SDMA needs its own firmware which is
      requested using the standard request_firmware mechanism. The firmware
      has different entry points for each peripheral type, so drivers
      have to pass the peripheral type to the DMA engine which in turn
      picks the correct firmware entry point from a table contained in
      the firmware image itself.
      The original Freescale code also supports support for transfering
      data to the internal SRAM which needs different entry points to
      the firmware. Support for this is currently not implemented. Also,
      support for the ASRC (asymmetric sample rate converter) is skipped.
      
      I took a very simple approach to implement dmaengine support. Only
      a single descriptor is statically assigned to a each channel. This
      means that transfers can't be queued up but only a single transfer
      is in progress. This simplifies implementation a lot and is sufficient
      for the usual device/memory transfers.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Reviewed-by: NLinus Walleij <linus.ml.walleij@gmail.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      1ec1e82f
  21. 30 9月, 2010 1 次提交
    • L
      dmaengine: driver for the ARM PL080/PL081 PrimeCells v5 · e8689e63
      Linus Walleij 提交于
      This creates a DMAengine driver for the ARM PL080/PL081 PrimeCells
      based on the implementation earlier submitted by Peter Pearse.
      This is working like a charm for memcpy and slave DMA to the PL011
      PrimeCell on the PB11MPCore.
      
      This DMA controller is used in mostly unmodified form in the ARM
      RealView and Versatile platforms, in the ST-Ericsson Nomadik, and
      in the ST SPEAr platform.
      
      It has been converted to use the header from the Samsung PL080
      derivate instead of its own defintions. The Samsungs have a custom
      driver in their mach-* folders though, atleast we can share the
      register definitions.
      
      Cc: Peter Pearse <peter.pearse@arm.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Alessandro Rubini <rubini@unipv.it>
      Acked-by: NViresh Kumar <viresh.kumar@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
      [GFP_KERNEL to GFP_NOWAIT in pl08x_prep_dma_memcpy]
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e8689e63
  22. 05 8月, 2010 1 次提交
  23. 28 7月, 2010 1 次提交
    • V
      intel_mid: Add Mrst & Mfld DMA Drivers · b3c567e4
      Vinod Koul 提交于
      This patch add DMA drivers for DMA controllers in Langwell chipset
      of Intel(R) Moorestown platform and DMA controllers in Penwell of
      Intel(R) Medfield platfrom
      
      This patch adds support for Moorestown DMAC1 and DMAC2 controllers.
      It also add support for Medfiled GP DMA and DMAC1 controllers.
      These controllers supports memory to peripheral and peripheral to
      memory transfers. It support only single block transfers.
      
      This driver is based on Kernel DMA engine
      Anyone who wishes to use this controller should use DMA engine APIs
      
      This controller exposes DMA_SLAVE capabilities and notifies the client drivers
      of DMA transaction completion
      
      Config option required to be enabled CONFIG_INTEL_MID_DMAC=y
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      b3c567e4
  24. 24 5月, 2010 1 次提交
  25. 15 4月, 2010 1 次提交
  26. 26 3月, 2010 1 次提交
  27. 02 3月, 2010 2 次提交
  28. 12 12月, 2009 1 次提交
  29. 20 11月, 2009 1 次提交
  30. 09 9月, 2009 1 次提交
  31. 29 7月, 2009 1 次提交
  32. 23 7月, 2009 1 次提交
  33. 17 6月, 2009 1 次提交
  34. 20 1月, 2009 1 次提交
    • G
      i.MX31: Image Processing Unit DMA and IRQ drivers · 5296b56d
      Guennadi Liakhovetski 提交于
      i.MX3x SoCs contain an Image Processing Unit, consisting of a Control
      Module (CM), Display Interface (DI), Synchronous Display Controller (SDC),
      Asynchronous Display Controller (ADC), Image Converter (IC), Post-Filter
      (PF), Camera Sensor Interface (CSI), and an Image DMA Controller (IDMAC).
      CM contains, among other blocks, an Interrupt Generator (IG) and a Clock
      and Reset Control Unit (CRCU). This driver serves IDMAC and IG. They are
      supported over dmaengine and irq-chip APIs respectively.
      
      IDMAC is a specialised DMA controller, its DMA channels cannot be used for
      general-purpose operations, even though it might be possible to configure
      a memory-to-memory channel for memcpy operation. This driver will not work
      with generic dmaengine clients, clients, wishing to use it must use
      respective wrapper structures, they also must specify which channels they
      require, as channels are hard-wired to specific IPU functions.
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NGuennadi Liakhovetski <lg@denx.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      5296b56d
  35. 09 7月, 2008 3 次提交
    • H
      dmaengine: Driver for the Synopsys DesignWare DMA controller · 3bfb1d20
      Haavard Skinnemoen 提交于
      This adds a driver for the Synopsys DesignWare DMA controller (aka
      DMACA on AVR32 systems.) This DMA controller can be found integrated
      on the AT32AP7000 chip and is primarily meant for peripheral DMA
      transfer, but can also be used for memory-to-memory transfers.
      
      This patch is based on a driver from David Brownell which was based on
      an older version of the DMA Engine framework. It also implements the
      proposed extensions to the DMA Engine API for slave DMA operations.
      
      The dmatest client shows no problems, but there may still be room for
      improvement performance-wise. DMA slave transfer performance is
      definitely "good enough"; reading 100 MiB from an SD card running at ~20
      MHz yields ~7.2 MiB/s average transfer rate.
      
      Full documentation for this controller can be found in the Synopsys
      DW AHB DMAC Databook:
      
      http://www.synopsys.com/designware/docs/iip/DW_ahb_dmac/latest/doc/dw_ahb_dmac_db.pdf
      
      The controller has lots of implementation options, so it's usually a
      good idea to check the data sheet of the chip it's intergrated on as
      well. The AT32AP7000 data sheet can be found here:
      
      http://www.atmel.com/dyn/products/datasheets.asp?family_id=682
      
      
      Changes since v4:
        * Use client_count instead of dma_chan_is_in_use()
        * Add missing include
        * Unmap buffers unless client told us not to
      
      Changes since v3:
        * Update to latest DMA engine and DMA slave APIs
        * Embed the hw descriptor into the sw descriptor
        * Clean up and update MODULE_DESCRIPTION, copyright date, etc.
      
      Changes since v2:
        * Dequeue all pending transfers in terminate_all()
        * Rename dw_dmac.h -> dw_dmac_regs.h
        * Define and use controller-specific dma_slave data
        * Fix up a few outdated comments
        * Define hardware registers as structs (doesn't generate better
          code, unfortunately, but it looks nicer.)
        * Get number of channels from platform_data instead of hardcoding it
          based on CONFIG_WHATEVER_CPU.
        * Give slave clients exclusive access to the channel
      
      Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>,
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      3bfb1d20
    • H
      dmatest: Simple DMA memcpy test client · 4a776f0a
      Haavard Skinnemoen 提交于
      This client tests DMA memcpy using various lengths and various offsets
      into the source and destination buffers. It will initialize both
      buffers with a repeatable pattern and verify that the DMA engine copies
      the requested region and nothing more. It will also verify that the
      bytes aren't swapped around, and that the source buffer isn't modified.
      
      The dmatest module can be configured to test a specific device, a
      specific channel. It can also test multiple channels at the same time,
      and it can start multiple threads competing for the same channel.
      
      Changes since v2:
        * Support testing multiple channels at the same time
        * Support testing with multiple threads competing for the same channel
        * Use counting test patterns in order to catch byte ordering issues
      
      Changes since v1:
        * Remove extra dashes around "help"
        * Remove "default n" from Kconfig
        * Turn TEST_BUF_SIZE into a module parameter
        * Return DMA_NAK instead of DMA_DUP
        * Print unhandled events
        * Support testing specific channels and devices
        * Move to the end of the Makefile
      Acked-by: NMaciej Sosnowski <maciej.sosnowski@intel.com>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      4a776f0a
    • S
      dmaengine: DMA engine driver for Marvell XOR engine · ff7b0479
      Saeed Bishara 提交于
      The XOR engine found in Marvell's SoCs and system controllers
      provides XOR and DMA operation, iSCSI CRC32C calculation, memory
      initialization, and memory ECC error cleanup operation support.
      
      This driver implements the DMA engine API and supports the following
      capabilities:
      - memcpy
      - xor
      - memset
      
      The XOR engine can be used by DMA engine clients implemented in the
      kernel, one of those clients is the RAID module.  In that case, I
      observed 20% improvement in the raid5 write throughput, and 40%
      decrease in the CPU utilization when doing array construction, those
      results obtained on an 5182 running at 500Mhz.
      
      When enabling the NET DMA client, the performance decreased, so
      meanwhile it is recommended to keep this client off.
      Signed-off-by: NSaeed Bishara <saeed@marvell.com>
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NNicolas Pitre <nico@marvell.com>
      Acked-by: NMaciej Sosnowski <maciej.sosnowski@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      ff7b0479
  36. 05 3月, 2008 1 次提交
  37. 17 10月, 2007 1 次提交