From: Heiner Kallweit <hkallweit1@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: [PATCH v2 1/2] mmc: core: add mmc_get_dma_dir
Date: Fri, 24 Mar 2017 21:02:52 +0100 [thread overview]
Message-ID: <d7faad3e-7ce6-fb7b-32cb-d8fa77ad11ff@gmail.com> (raw)
In-Reply-To: <7f8a382e-ff2f-db2f-ef24-25cdee9d2f68@gmail.com>
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>
---
v2:
- no changes
---
include/linux/mmc/host.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 83f1c4a9..21385ac0 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);
--
2.12.0
next prev parent reply other threads:[~2017-03-24 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 20:01 [PATCH v2 0/2] mmc: factor out getting dma direction from host drivers Heiner Kallweit
2017-03-24 20:02 ` Heiner Kallweit [this message]
2017-03-24 20:07 ` [PATCH v2 2/2] mmc: use new core function mmc_get_dma_dir Heiner Kallweit
2017-03-26 15:37 ` kbuild test robot
2017-03-26 18:37 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7faad3e-7ce6-fb7b-32cb-d8fa77ad11ff@gmail.com \
--to=hkallweit1@gmail.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox