linux/drivers/dma
Andy Shevchenko 1b2e98bc1e dma: acpi-dma: introduce ACPI DMA helpers
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-04-15 22:04:10 +05:30
..
bestcomm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-02-23 17:09:55 -08:00
ioat ioatdma: skip silicon bug workaround for pq_align for cb3.3 2013-04-15 09:51:20 +05:30
ipu dma: ipu: ipu_idmac: Fix section mismatch 2013-04-15 09:51:18 +05:30
ppc4xx
sh Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
acpi-dma.c dma: acpi-dma: introduce ACPI DMA helpers 2013-04-15 22:04:10 +05:30
amba-pl08x.c
at_hdmac_regs.h
at_hdmac.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
coh901318_lli.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
coh901318.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
coh901318.h
dmaengine.c dma: Make the 'mask' parameter of __dma_request_channel const 2013-04-15 09:51:18 +05:30
dmaengine.h
dmatest.c dmatest: append verify result to results 2013-04-15 09:51:18 +05:30
dw_dmac_regs.h dmaengine: dw_dmac: simplify master selection 2013-04-15 09:51:19 +05:30
dw_dmac.c dw_dmac: remove unnecessary ENODEV check 2013-04-15 09:51:19 +05:30
edma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
ep93xx_dma.c
fsldma.c
fsldma.h
imx-dma.c dma: imx-dma: Remove redundant NULL check before kfree 2013-04-15 09:51:18 +05:30
imx-sdma.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
intel_mid_dma_regs.h
intel_mid_dma.c
iop-adma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
iovlock.c
Kconfig dma: acpi-dma: introduce ACPI DMA helpers 2013-04-15 22:04:10 +05:30
Makefile dma: acpi-dma: introduce ACPI DMA helpers 2013-04-15 22:04:10 +05:30
mmp_pdma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
mmp_tdma.c dma: Convert to devm_ioremap_resource() 2013-01-25 12:21:46 -08:00
mpc512x_dma.c
mv_xor.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
mv_xor.h
mxs-dma.c
of-dma.c dma: of-dma: protect list write operation by spin_lock 2013-02-14 20:00:53 +05:30
omap-dma.c dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver 2013-04-15 09:51:19 +05:30
pch_dma.c pch_dma: Use GFP_ATOMIC because called from interrupt context 2013-04-15 09:51:16 +05:30
pl330.c dma: pl330: Convert to devm_ioremap_resource() 2013-04-15 09:51:18 +05:30
sa11x0-dma.c
sirf-dma.c dmaengine:sirf:take clock and enable it while probing 2013-04-15 09:51:18 +05:30
ste_dma40_ll.c dmaengine: ste_dma40: minor cosmetic fixes 2013-01-14 10:51:01 +01:00
ste_dma40_ll.h dmaengine: ste_dma40: support more than 128 event lines 2013-01-14 10:50:48 +01:00
ste_dma40.c dmaengine: ste_dma40: do not remove descriptors for cyclic transfers 2013-02-14 19:54:31 +05:30
tegra20-apb-dma.c dma: tegra: assume CONFIG_OF 2013-04-15 09:51:18 +05:30
timb_dma.c dma: timb_dma: Fix compiler warning 2013-04-15 09:51:16 +05:30
TODO
txx9dmac.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
txx9dmac.h
virt-dma.c
virt-dma.h