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>
This commit is contained in:
Родитель
e5e4a3eb13
Коммит
6335d68349
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче