Merge branch 'next/topic-dma-samsung' into next-samsung-devel
This commit is contained in:
@@ -47,6 +47,9 @@ enum {
|
||||
* @muxval: a number usually used to poke into some mux regiser to
|
||||
* mux in the signal to this channel
|
||||
* @cctl_opt: default options for the channel control register
|
||||
* @device_fc: Flow Controller Settings for ccfg register. Only valid for slave
|
||||
* channels. Fill with 'true' if peripheral should be flow controller. Direction
|
||||
* will be selected at Runtime.
|
||||
* @addr: source/target address in physical memory for this DMA channel,
|
||||
* can be the address of a FIFO register for burst requests for example.
|
||||
* This can be left undefined if the PrimeCell API is used for configuring
|
||||
@@ -65,6 +68,7 @@ struct pl08x_channel_data {
|
||||
int max_signal;
|
||||
u32 muxval;
|
||||
u32 cctl;
|
||||
bool device_fc;
|
||||
dma_addr_t addr;
|
||||
bool circular_buffer;
|
||||
bool single;
|
||||
@@ -77,13 +81,11 @@ struct pl08x_channel_data {
|
||||
* @addr: current address
|
||||
* @maxwidth: the maximum width of a transfer on this bus
|
||||
* @buswidth: the width of this bus in bytes: 1, 2 or 4
|
||||
* @fill_bytes: bytes required to fill to the next bus memory boundary
|
||||
*/
|
||||
struct pl08x_bus_data {
|
||||
dma_addr_t addr;
|
||||
u8 maxwidth;
|
||||
u8 buswidth;
|
||||
size_t fill_bytes;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -105,8 +107,16 @@ struct pl08x_phy_chan {
|
||||
|
||||
/**
|
||||
* struct pl08x_txd - wrapper for struct dma_async_tx_descriptor
|
||||
* @tx: async tx descriptor
|
||||
* @node: node for txd list for channels
|
||||
* @src_addr: src address of txd
|
||||
* @dst_addr: dst address of txd
|
||||
* @len: transfer len in bytes
|
||||
* @direction: direction of transfer
|
||||
* @llis_bus: DMA memory address (physical) start for the LLIs
|
||||
* @llis_va: virtual memory address start for the LLIs
|
||||
* @cctl: control reg values for current txd
|
||||
* @ccfg: config reg values for current txd
|
||||
*/
|
||||
struct pl08x_txd {
|
||||
struct dma_async_tx_descriptor tx;
|
||||
|
||||
@@ -19,12 +19,8 @@ struct dma_pl330_peri {
|
||||
* Peri_Req i/f of the DMAC that is
|
||||
* peripheral could be reached from.
|
||||
*/
|
||||
u8 peri_id; /* {0, 31} */
|
||||
u8 peri_id; /* specific dma id */
|
||||
enum pl330_reqtype rqtype;
|
||||
|
||||
/* For M->D and D->M Channels */
|
||||
int burst_sz; /* in power of 2 */
|
||||
dma_addr_t fifo_addr;
|
||||
};
|
||||
|
||||
struct dma_pl330_platdata {
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/uio.h>
|
||||
#include <linux/dma-direction.h>
|
||||
|
||||
struct scatterlist;
|
||||
#include <linux/scatterlist.h>
|
||||
|
||||
/**
|
||||
* typedef dma_cookie_t - an opaque DMA cookie
|
||||
@@ -519,6 +518,16 @@ static inline int dmaengine_slave_config(struct dma_chan *chan,
|
||||
(unsigned long)config);
|
||||
}
|
||||
|
||||
static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
|
||||
struct dma_chan *chan, void *buf, size_t len,
|
||||
enum dma_data_direction dir, unsigned long flags)
|
||||
{
|
||||
struct scatterlist sg;
|
||||
sg_init_one(&sg, buf, len);
|
||||
|
||||
return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
|
||||
}
|
||||
|
||||
static inline int dmaengine_terminate_all(struct dma_chan *chan)
|
||||
{
|
||||
return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0);
|
||||
|
||||
Reference in New Issue
Block a user