diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-02-14 16:40:25 +0900 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-02-20 15:09:56 +0800 |
commit | a7b2b6cc0aa9294b570a3161a05c6ccf4c0b6e40 (patch) | |
tree | 49dc70e1e4a25b29f304cda0804f8f259eec631c /include/mmc.h | |
parent | fdd84c8be40b8f31445d8f4b2e907c7e24e2e3f9 (diff) | |
download | u-boot-a7b2b6cc0aa9294b570a3161a05c6ccf4c0b6e40.zip u-boot-a7b2b6cc0aa9294b570a3161a05c6ccf4c0b6e40.tar.gz u-boot-a7b2b6cc0aa9294b570a3161a05c6ccf4c0b6e40.tar.bz2 |
mmc: add mmc_get_dma_dir() helper
Copied from Linux kernel.
include/linux/mmc/host.h
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r-- | include/mmc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h index b5cb514..71e2e17 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -12,6 +12,7 @@ #include <linux/list.h> #include <linux/sizes.h> #include <linux/compiler.h> +#include <linux/dma-direction.h> #include <part.h> #if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) @@ -880,4 +881,9 @@ int mmc_get_env_dev(void); */ struct blk_desc *mmc_get_blk_desc(struct mmc *mmc); +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; +} + #endif /* _MMC_H_ */ |