aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmc/dw_mmc.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 134c57422740..f67b2ec18e6d 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -16,6 +16,7 @@
16 16
17#include <linux/scatterlist.h> 17#include <linux/scatterlist.h>
18#include <linux/mmc/core.h> 18#include <linux/mmc/core.h>
19#include <linux/dmaengine.h>
19 20
20#define MAX_MCI_SLOTS 2 21#define MAX_MCI_SLOTS 2
21 22
@@ -40,6 +41,17 @@ enum {
40 41
41struct mmc_data; 42struct mmc_data;
42 43
44enum {
45 TRANS_MODE_PIO = 0,
46 TRANS_MODE_IDMAC,
47 TRANS_MODE_EDMAC
48};
49
50struct dw_mci_dma_slave {
51 struct dma_chan *ch;
52 enum dma_transfer_direction direction;
53};
54
43/** 55/**
44 * struct dw_mci - MMC controller state shared between all slots 56 * struct dw_mci - MMC controller state shared between all slots
45 * @lock: Spinlock protecting the queue and associated data. 57 * @lock: Spinlock protecting the queue and associated data.
@@ -154,7 +166,14 @@ struct dw_mci {
154 dma_addr_t sg_dma; 166 dma_addr_t sg_dma;
155 void *sg_cpu; 167 void *sg_cpu;
156 const struct dw_mci_dma_ops *dma_ops; 168 const struct dw_mci_dma_ops *dma_ops;
169 /* For idmac */
157 unsigned int ring_size; 170 unsigned int ring_size;
171
172 /* For edmac */
173 struct dw_mci_dma_slave *dms;
174 /* Registers's physical base address */
175 void *phy_regs;
176
158 u32 cmd_status; 177 u32 cmd_status;
159 u32 data_status; 178 u32 data_status;
160 u32 stop_cmdr; 179 u32 stop_cmdr;
@@ -208,8 +227,8 @@ struct dw_mci {
208struct dw_mci_dma_ops { 227struct dw_mci_dma_ops {
209 /* DMA Ops */ 228 /* DMA Ops */
210 int (*init)(struct dw_mci *host); 229 int (*init)(struct dw_mci *host);
211 void (*start)(struct dw_mci *host, unsigned int sg_len); 230 int (*start)(struct dw_mci *host, unsigned int sg_len);
212 void (*complete)(struct dw_mci *host); 231 void (*complete)(void *host);
213 void (*stop)(struct dw_mci *host); 232 void (*stop)(struct dw_mci *host);
214 void (*cleanup)(struct dw_mci *host); 233 void (*cleanup)(struct dw_mci *host);
215 void (*exit)(struct dw_mci *host); 234 void (*exit)(struct dw_mci *host);