remarkable-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 Drivers: dma: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
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 pl080.h: moved from arm/include/asm/hardware to include/linux/amba/ 2013-01-13 05:19:45 -08:00
at_hdmac.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
at_hdmac_regs.h dma: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2013-01-07 22:04:56 -08:00
coh901318.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
coh901318.h dma: coh901318: merge header files 2013-01-07 17:36:37 +01:00
coh901318_lli.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-02-26 09:24:48 -08:00
dmaengine.c dma: Make the 'mask' parameter of __dma_request_channel const 2013-04-15 09:51:18 +05:30
dmaengine.h dmaengine: consolidate initialization of cookies 2012-03-13 11:37:22 +05:30
dmatest.c dmatest: append verify result to results 2013-04-15 09:51:18 +05:30
dw_dmac.c dw_dmac: remove unnecessary ENODEV check 2013-04-15 09:51:19 +05:30
dw_dmac_regs.h dmaengine: dw_dmac: simplify master selection 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 dma: ep93xx_dma: reuse is_slave_direction helper 2013-01-12 05:07:22 -08:00
fsldma.c dma: remove use of __devinit 2012-11-28 12:42:36 -08:00
fsldma.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
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.c Drivers: dma: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
intel_mid_dma_regs.h dma: fix comments 2012-09-01 08:57:12 -07:00
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 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
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 Drivers: dma: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
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 dma: mv_xor: clear the window override control registers 2012-11-22 18:16:37 +01:00
mxs-dma.c dma: mxs-dma: Fix build warnings with W=1 2013-01-08 07:35:27 -08:00
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 Drivers: dma: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
sirf-dma.c dmaengine:sirf:take clock and enable it while probing 2013-04-15 09:51:18 +05:30
ste_dma40.c dmaengine: ste_dma40: do not remove descriptors for cyclic transfers 2013-02-14 19:54:31 +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
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 dmaengine: remove ste_dma40 from issue_pending TODO 2011-07-14 04:02:08 +05:30
txx9dmac.c dma: Remove erroneous __exit and __exit_p() references 2013-04-15 09:51:16 +05:30
txx9dmac.h dmaengine: move last completed cookie into generic dma_chan structure 2012-03-13 11:36:06 +05:30
virt-dma.c dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00
virt-dma.h dmaengine: virt-dma: add support for cyclic DMA periodic callbacks 2012-07-01 14:15:23 +01:00