linux/include
Haavard Skinnemoen dc0ee6435c dmaengine: Add slave DMA interface
This patch adds the necessary interfaces to the DMA Engine framework
to use functionality found on most embedded DMA controllers: DMA from
and to I/O registers with hardware handshaking.

In this context, hardware hanshaking means that the peripheral that
owns the I/O registers in question is able to tell the DMA controller
when more data is available for reading, or when there is room for
more data to be written. This usually happens internally on the chip,
but these signals may also be exported outside the chip for things
like IDE DMA, etc.

A new struct dma_slave is introduced. This contains information that
the DMA engine driver needs to set up slave transfers to and from a
slave device. Most engines supporting DMA slave transfers will want to
extend this structure with controller-specific parameters.  This
additional information is usually passed from the platform/board code
through the client driver.

A "slave" pointer is added to the dma_client struct. This must point
to a valid dma_slave structure iff the DMA_SLAVE capability is
requested.  The DMA engine driver may use this information in its
device_alloc_chan_resources hook to configure the DMA controller for
slave transfers from and to the given slave device.

A new operation for preparing slave DMA transfers is added to struct
dma_device. This takes a scatterlist and returns a single descriptor
representing the whole transfer.

Another new operation for terminating all pending transfers is added as
well. The latter is needed because there may be errors outside the scope
of the DMA Engine framework that may require DMA operations to be
terminated prematurely.

DMA Engine drivers may extend the dma_device, dma_chan and/or
dma_slave_descriptor structures to allow controller-specific
operations. The client driver can detect such extensions by looking at
the DMA Engine's struct device, or it can request a specific DMA
Engine device by setting the dma_dev field in struct dma_slave.

dmaslave interface changes since v4:
  * Fix checkpatch errors
  * Fix changelog (there are no slave descriptors anymore)

dmaslave interface changes since v3:
  * Use dma_data_direction instead of a new enum
  * Submit slave transfers as scatterlists
  * Remove the DMA slave descriptor struct

dmaslave interface changes since v2:
  * Add a dma_dev field to struct dma_slave. If set, the client can
    only be bound to the DMA controller that corresponds to this
    device.  This allows controller-specific extensions of the
    dma_slave structure; if the device matches, the controller may
    safely assume its extensions are present.
  * Move reg_width into struct dma_slave as there are currently no
    users that need to be able to set the width on a per-transfer
    basis.

dmaslave interface changes since v1:
  * Drop the set_direction and set_width descriptor hooks. Pass the
    direction and width to the prep function instead.
  * Declare a dma_slave struct with fixed information about a slave,
    i.e. register addresses, handshake interfaces and such.
  * Add pointer to a dma_slave struct to dma_client. Can be NULL if
    the DMA_SLAVE capability isn't requested.
  * Drop the set_slave device hook since the alloc_chan_resources hook
    now has enough information to set up the channel for slave
    transfers.

Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2008-07-08 11:59:35 -07:00
..
acpi
asm-alpha asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-arm dmaengine: DMA engine driver for Marvell XOR engine 2008-07-08 11:58:36 -07:00
asm-avr32 avr32: types: use <asm-generic/int-*.h> for the avr32 architecture 2008-05-02 16:18:20 -07:00
asm-blackfin Blackfin serial driver: add extra IRQ flag for 8250 serial driver 2008-05-17 18:21:57 +08:00
asm-cris cris: types: use <asm-generic/int-*.h> for the cris architecture 2008-05-02 16:18:20 -07:00
asm-frv Fix FRV minimum slab/kmalloc alignment 2008-05-28 09:05:28 -07:00
asm-generic gpio: build fixes 2008-05-24 09:56:13 -07:00
asm-h8300 asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-ia64 KVM: ia64: Set KVM_IOAPIC_NUM_PINS to 48 2008-05-18 14:34:16 +03:00
asm-m32r m32r: types: use <asm-generic/int-*.h> for the m32r architecture 2008-05-02 16:18:21 -07:00
asm-m68k m68k: Prefix ISA type with ISA_TYPE_ 2008-05-18 13:28:50 -07:00
asm-m68knommu m68knommu: rework definition of HZ 2008-05-01 08:08:36 -07:00
asm-mips fix parenthesis in include/asm-mips/mach-au1x00/au1000.h 2008-05-24 09:56:08 -07:00
asm-mn10300 MN10300: Fix typo in header guard 2008-05-28 07:59:06 -07:00
asm-parisc parisc: use conditional macro for 64-bit wide ops 2008-05-15 11:03:43 -04:00
asm-powerpc [POWERPC] mpic: Fix use of uninitialized variable 2008-05-23 16:15:37 +10:00
asm-ppc [POWERPC] ppc: More compile fixes 2008-05-12 22:57:51 +10:00
asm-s390 [S390] s390dbf: Use const char * for dbf name. 2008-05-15 16:52:39 +02:00
asm-sh sh: use the common ascii hex helpers 2008-05-16 15:09:08 +09:00
asm-sparc sparc: remove CVS keywords 2008-05-20 00:33:44 -07:00
asm-sparc64 sparc64: global_reg_snapshot is not for userspace 2008-05-25 22:50:16 -07:00
asm-um asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-v850 asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
asm-x86 x86: prevent PGE flush from interruption/preemption 2008-05-23 18:16:15 +02:00
asm-xtensa asm-{alpha,h8300,um,v850,xtensa}/param.h: unbreak HZ for userspace 2008-05-14 19:11:14 -07:00
crypto [CRYPTO] api: Fix scatterwalk_sg_chain 2008-05-01 18:22:28 +08:00
keys
linux dmaengine: Add slave DMA interface 2008-07-08 11:59:35 -07:00
math-emu
media Fix a deadlock in the bttv driver 2008-05-20 10:12:26 -07:00
mtd
net netlink: Fix nla_parse_nested_compat() to call nla_parse() directly 2008-05-22 10:48:59 -07:00
pcmcia
rdma IB: expand ib_umem_get() prototype 2008-04-29 08:06:12 -07:00
rxrpc
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
sound [ALSA] ASoC: build fix for snd_soc_info_bool_ext 2008-05-13 14:47:44 +02:00
video
xen
Kbuild