diff options
| author | Heiner Kallweit <hkallweit1@gmail.com> | 2017-03-26 14:41:32 -0400 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-04-24 15:41:52 -0400 |
| commit | 6335d68349a85382cc55a5260d5bfda85f8e24a8 (patch) | |
| tree | 5ac3f7c624e1b3ae0d78733989b210d56c58f30c /include/linux/mmc | |
| parent | e5e4a3eb131f79af49f48a741807318c32f29427 (diff) | |
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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 83f1c4a9f03b..21385ac0c9b1 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/mmc/core.h> | 17 | #include <linux/mmc/core.h> |
| 18 | #include <linux/mmc/card.h> | 18 | #include <linux/mmc/card.h> |
| 19 | #include <linux/mmc/pm.h> | 19 | #include <linux/mmc/pm.h> |
| 20 | #include <linux/dma-direction.h> | ||
| 20 | 21 | ||
| 21 | struct mmc_ios { | 22 | struct mmc_ios { |
| 22 | unsigned int clock; /* clock rate */ | 23 | unsigned int clock; /* clock rate */ |
| @@ -499,6 +500,11 @@ static inline bool mmc_can_retune(struct mmc_host *host) | |||
| 499 | return host->can_retune == 1; | 500 | return host->can_retune == 1; |
| 500 | } | 501 | } |
| 501 | 502 | ||
| 503 | static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data) | ||
| 504 | { | ||
| 505 | return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE; | ||
| 506 | } | ||
| 507 | |||
| 502 | int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); | 508 | int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); |
| 503 | int mmc_abort_tuning(struct mmc_host *host, u32 opcode); | 509 | int mmc_abort_tuning(struct mmc_host *host, u32 opcode); |
| 504 | 510 | ||
