summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/mmci.h
diff options
context:
space:
mode:
authorLudovic Barre <ludovic.barre@st.com>2018-10-08 14:08:34 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2018-10-09 09:13:03 +0200
commita813f2a2bccedb2c07fca66f4a67fc0093d35366 (patch)
treec2d09176eca4a4f15690eac6679bcb4ac24a8f58 /drivers/mmc/host/mmci.h
parentc3647fdc6a5a48699a1248a7f3d9a0429369e939 (diff)
mmc: mmci: introduce dma_priv pointer to mmci_host
-Introduces dma_priv pointer to define specific needs for each dma engine. This patch is needed to prepare sdmmc variant with internal dma which not use dmaengine API. -Moves next cookie to mmci host structure to share same cookie management between all variants. Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mmci.h')
-rw-r--r--drivers/mmc/host/mmci.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h
index 34bb5e6a738b..1d5ba4e53341 100644
--- a/drivers/mmc/host/mmci.h
+++ b/drivers/mmc/host/mmci.h
@@ -277,12 +277,6 @@ struct mmci_host_ops {
void (*dma_release)(struct mmci_host *host);
};
-struct mmci_host_next {
- struct dma_async_tx_descriptor *dma_desc;
- struct dma_chan *dma_chan;
- s32 cookie;
-};
-
struct mmci_host {
phys_addr_t phybase;
void __iomem *base;
@@ -325,19 +319,14 @@ struct mmci_host {
int (*get_rx_fifocnt)(struct mmci_host *h, u32 status, int remain);
u8 use_dma:1;
-#ifdef CONFIG_DMA_ENGINE
- /* DMA stuff */
- struct dma_chan *dma_current;
- struct dma_chan *dma_rx_channel;
- struct dma_chan *dma_tx_channel;
- struct dma_async_tx_descriptor *dma_desc_current;
- struct mmci_host_next next_data;
u8 dma_in_progress:1;
+ void *dma_priv;
-#define dma_inprogress(host) ((host)->dma_in_progress)
-#endif
+ s32 next_cookie;
};
+#define dma_inprogress(host) ((host)->dma_in_progress)
+
int mmci_dmae_setup(struct mmci_host *host);
void mmci_dmae_release(struct mmci_host *host);