From a813f2a2bccedb2c07fca66f4a67fc0093d35366 Mon Sep 17 00:00:00 2001 From: Ludovic Barre Date: Mon, 8 Oct 2018 14:08:34 +0200 Subject: 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 Signed-off-by: Ulf Hansson --- drivers/mmc/host/mmci.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'drivers/mmc/host/mmci.h') 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); -- cgit v1.2.3