summaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-03-26 20:41:32 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:41:52 +0200
commit6335d68349a85382cc55a5260d5bfda85f8e24a8 (patch)
tree5ac3f7c624e1b3ae0d78733989b210d56c58f30c /include/linux/mmc
parente5e4a3eb131f79af49f48a741807318c32f29427 (diff)
downloadop-kernel-dev-6335d68349a85382cc55a5260d5bfda85f8e24a8.zip
op-kernel-dev-6335d68349a85382cc55a5260d5bfda85f8e24a8.tar.gz
mmc: core: add mmc_get_dma_dir
Add function for determining DMA direction to core. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 83f1c4a..21385ac 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -17,6 +17,7 @@
#include <linux/mmc/core.h>
#include <linux/mmc/card.h>
#include <linux/mmc/pm.h>
+#include <linux/dma-direction.h>
struct mmc_ios {
unsigned int clock; /* clock rate */
@@ -499,6 +500,11 @@ static inline bool mmc_can_retune(struct mmc_host *host)
return host->can_retune == 1;
}
+static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
+{
+ return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
+}
+
int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error);
int mmc_abort_tuning(struct mmc_host *host, u32 opcode);
OpenPOWER on IntegriCloud