From 7691634e4a7a39c6a3b3c4bf03af86e371ba3040 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 29 Jul 2010 00:14:06 +0200 Subject: [PATCH 1/2] DMAENGINE: add a slave buffer prep call This makes it possible for engines to implement slave transfers to be done to/from a simple kmalloc():ed memory buffer and not just from scatterlists. Signed-off-by: Linus Walleij --- include/linux/dmaengine.h | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 5204f01..3caff1c 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -350,7 +350,10 @@ struct dma_tx_state { * @device_prep_dma_pq_val: prepares a pqzero_sum operation * @device_prep_dma_memset: prepares a memset operation * @device_prep_dma_interrupt: prepares an end of chain interrupt operation - * @device_prep_slave_sg: prepares a slave dma operation + * @device_prep_slave_buffer: prepares a slave DMA operation to/from a + * buffer + * @device_prep_slave_sg: prepares a slave dma operation to/from a + * scatterlist * @device_control: manipulate all pending operations on a channel, returns * zero or error code * @device_tx_status: poll for transaction completion, the optional @@ -403,6 +406,10 @@ struct dma_device { struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( struct dma_chan *chan, unsigned long flags); + struct dma_async_tx_descriptor *(*device_prep_slave_buffer)( + struct dma_chan *chan, char *buffer, + enum dma_data_direction direction, + unsigned long flags); struct dma_async_tx_descriptor *(*device_prep_slave_sg)( struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, enum dma_data_direction direction, -- 1.7.2