summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/dw_mmc.h
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2015-09-16 14:41:23 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2015-10-26 16:00:16 +0100
commit3fc7eaef44dbcbcd602b6bcd0ac6efba7a30b108 (patch)
treea3e33791bb0ed5bd2fd328f7e5204584cbb47eaf /drivers/mmc/host/dw_mmc.h
parent9e4703df3aa9829a84d6ccf19c6062ba19a8de71 (diff)
mmc: dw_mmc: Add external dma interface support
DesignWare MMC Controller can supports two types of DMA mode: external dma and internal dma. We get a RK312x platform integrated dw_mmc and ARM pl330 dma controller. This patch add edmac ops to support these platforms. I've tested it on RK31xx platform with edmac mode and RK3288 platform with idmac mode. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.h')
-rw-r--r--drivers/mmc/host/dw_mmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index 8ce4674730a6..811d4673a1c5 100644
--- a/drivers/mmc/host/dw_mmc.h
+++ b/drivers/mmc/host/dw_mmc.h
@@ -148,6 +148,12 @@
#define SDMMC_SET_FIFOTH(m, r, t) (((m) & 0x7) << 28 | \
((r) & 0xFFF) << 16 | \
((t) & 0xFFF))
+/* HCON register defines */
+#define DMA_INTERFACE_IDMA (0x0)
+#define DMA_INTERFACE_DWDMA (0x1)
+#define DMA_INTERFACE_GDMA (0x2)
+#define DMA_INTERFACE_NODMA (0x3)
+#define SDMMC_GET_TRANS_MODE(x) (((x)>>16) & 0x3)
/* Internal DMAC interrupt defines */
#define SDMMC_IDMAC_INT_AI BIT(9)
#define SDMMC_IDMAC_INT_NI BIT(8)