Commit 80cc07af authored by Dan Williams's avatar Dan Williams

Merge branch 'dma40' into dmaengine

parents e19d1d49 0c842b55
...@@ -104,6 +104,8 @@ struct stedma40_half_channel_info { ...@@ -104,6 +104,8 @@ struct stedma40_half_channel_info {
* *
* @dir: MEM 2 MEM, PERIPH 2 MEM , MEM 2 PERIPH, PERIPH 2 PERIPH * @dir: MEM 2 MEM, PERIPH 2 MEM , MEM 2 PERIPH, PERIPH 2 PERIPH
* @high_priority: true if high-priority * @high_priority: true if high-priority
* @realtime: true if realtime mode is to be enabled. Only available on DMA40
* version 3+, i.e DB8500v2+
* @mode: channel mode: physical, logical, or operation * @mode: channel mode: physical, logical, or operation
* @mode_opt: options for the chosen channel mode * @mode_opt: options for the chosen channel mode
* @src_dev_type: Src device type * @src_dev_type: Src device type
...@@ -119,6 +121,7 @@ struct stedma40_half_channel_info { ...@@ -119,6 +121,7 @@ struct stedma40_half_channel_info {
struct stedma40_chan_cfg { struct stedma40_chan_cfg {
enum stedma40_xfer_dir dir; enum stedma40_xfer_dir dir;
bool high_priority; bool high_priority;
bool realtime;
enum stedma40_mode mode; enum stedma40_mode mode;
enum stedma40_mode_opt mode_opt; enum stedma40_mode_opt mode_opt;
int src_dev_type; int src_dev_type;
...@@ -168,25 +171,6 @@ struct stedma40_platform_data { ...@@ -168,25 +171,6 @@ struct stedma40_platform_data {
bool stedma40_filter(struct dma_chan *chan, void *data); bool stedma40_filter(struct dma_chan *chan, void *data);
/**
* stedma40_memcpy_sg() - extension of the dma framework, memcpy to/from
* scattergatter lists.
*
* @chan: dmaengine handle
* @sgl_dst: Destination scatter list
* @sgl_src: Source scatter list
* @sgl_len: The length of each scatterlist. Both lists must be of equal length
* and each element must match the corresponding element in the other scatter
* list.
* @flags: is actually enum dma_ctrl_flags. See dmaengine.h
*/
struct dma_async_tx_descriptor *stedma40_memcpy_sg(struct dma_chan *chan,
struct scatterlist *sgl_dst,
struct scatterlist *sgl_src,
unsigned int sgl_len,
unsigned long flags);
/** /**
* stedma40_slave_mem() - Transfers a raw data buffer to or from a slave * stedma40_slave_mem() - Transfers a raw data buffer to or from a slave
* (=device) * (=device)
......
This diff is collapsed.
This diff is collapsed.
...@@ -163,6 +163,22 @@ ...@@ -163,6 +163,22 @@
#define D40_DREG_LCEIS1 0x0B4 #define D40_DREG_LCEIS1 0x0B4
#define D40_DREG_LCEIS2 0x0B8 #define D40_DREG_LCEIS2 0x0B8
#define D40_DREG_LCEIS3 0x0BC #define D40_DREG_LCEIS3 0x0BC
#define D40_DREG_PSEG1 0x110
#define D40_DREG_PSEG2 0x114
#define D40_DREG_PSEG3 0x118
#define D40_DREG_PSEG4 0x11C
#define D40_DREG_PCEG1 0x120
#define D40_DREG_PCEG2 0x124
#define D40_DREG_PCEG3 0x128
#define D40_DREG_PCEG4 0x12C
#define D40_DREG_RSEG1 0x130
#define D40_DREG_RSEG2 0x134
#define D40_DREG_RSEG3 0x138
#define D40_DREG_RSEG4 0x13C
#define D40_DREG_RCEG1 0x140
#define D40_DREG_RCEG2 0x144
#define D40_DREG_RCEG3 0x148
#define D40_DREG_RCEG4 0x14C
#define D40_DREG_STFU 0xFC8 #define D40_DREG_STFU 0xFC8
#define D40_DREG_ICFG 0xFCC #define D40_DREG_ICFG 0xFCC
#define D40_DREG_PERIPHID0 0xFE0 #define D40_DREG_PERIPHID0 0xFE0
...@@ -277,6 +293,13 @@ struct d40_def_lcsp { ...@@ -277,6 +293,13 @@ struct d40_def_lcsp {
/* Physical channels */ /* Physical channels */
enum d40_lli_flags {
LLI_ADDR_INC = 1 << 0,
LLI_TERM_INT = 1 << 1,
LLI_CYCLIC = 1 << 2,
LLI_LAST_LINK = 1 << 3,
};
void d40_phy_cfg(struct stedma40_chan_cfg *cfg, void d40_phy_cfg(struct stedma40_chan_cfg *cfg,
u32 *src_cfg, u32 *src_cfg,
u32 *dst_cfg, u32 *dst_cfg,
...@@ -292,46 +315,15 @@ int d40_phy_sg_to_lli(struct scatterlist *sg, ...@@ -292,46 +315,15 @@ int d40_phy_sg_to_lli(struct scatterlist *sg,
struct d40_phy_lli *lli, struct d40_phy_lli *lli,
dma_addr_t lli_phys, dma_addr_t lli_phys,
u32 reg_cfg, u32 reg_cfg,
u32 data_width1, struct stedma40_half_channel_info *info,
u32 data_width2, struct stedma40_half_channel_info *otherinfo,
int psize); unsigned long flags);
struct d40_phy_lli *d40_phy_buf_to_lli(struct d40_phy_lli *lli,
dma_addr_t data,
u32 data_size,
int psize,
dma_addr_t next_lli,
u32 reg_cfg,
bool term_int,
u32 data_width1,
u32 data_width2,
bool is_device);
void d40_phy_lli_write(void __iomem *virtbase,
u32 phy_chan_num,
struct d40_phy_lli *lli_dst,
struct d40_phy_lli *lli_src);
/* Logical channels */ /* Logical channels */
struct d40_log_lli *d40_log_buf_to_lli(struct d40_log_lli *lli_sg,
dma_addr_t addr,
int size,
u32 lcsp13, /* src or dst*/
u32 data_width1, u32 data_width2,
bool addr_inc);
int d40_log_sg_to_dev(struct scatterlist *sg,
int sg_len,
struct d40_log_lli_bidir *lli,
struct d40_def_lcsp *lcsp,
u32 src_data_width,
u32 dst_data_width,
enum dma_data_direction direction,
dma_addr_t dev_addr);
int d40_log_sg_to_lli(struct scatterlist *sg, int d40_log_sg_to_lli(struct scatterlist *sg,
int sg_len, int sg_len,
dma_addr_t dev_addr,
struct d40_log_lli *lli_sg, struct d40_log_lli *lli_sg,
u32 lcsp13, /* src or dst*/ u32 lcsp13, /* src or dst*/
u32 data_width1, u32 data_width2); u32 data_width1, u32 data_width2);
...@@ -339,11 +331,11 @@ int d40_log_sg_to_lli(struct scatterlist *sg, ...@@ -339,11 +331,11 @@ int d40_log_sg_to_lli(struct scatterlist *sg,
void d40_log_lli_lcpa_write(struct d40_log_lli_full *lcpa, void d40_log_lli_lcpa_write(struct d40_log_lli_full *lcpa,
struct d40_log_lli *lli_dst, struct d40_log_lli *lli_dst,
struct d40_log_lli *lli_src, struct d40_log_lli *lli_src,
int next); int next, unsigned int flags);
void d40_log_lli_lcla_write(struct d40_log_lli *lcla, void d40_log_lli_lcla_write(struct d40_log_lli *lcla,
struct d40_log_lli *lli_dst, struct d40_log_lli *lli_dst,
struct d40_log_lli *lli_src, struct d40_log_lli *lli_src,
int next); int next, unsigned int flags);
#endif /* STE_DMA40_LLI_H */ #endif /* STE_DMA40_LLI_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment