From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] mmc: Add mmc_is_io_op helper function
Date: Tue, 22 Sep 2015 17:30:24 +0200 [thread overview]
Message-ID: <1442935826-16758-2-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1442935826-16758-1-git-send-email-hdegoede@redhat.com>
Add a helper function to check if an opcode is a sd-io-rw-* opcode.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/mmc/core/sdio_ops.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mmc/core/sdio_ops.h b/drivers/mmc/core/sdio_ops.h
index 12a4d3a..5660c7f 100644
--- a/drivers/mmc/core/sdio_ops.h
+++ b/drivers/mmc/core/sdio_ops.h
@@ -12,6 +12,8 @@
#ifndef _MMC_SDIO_OPS_H
#define _MMC_SDIO_OPS_H
+#include <linux/mmc/sdio.h>
+
int mmc_send_io_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr);
int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn,
unsigned addr, u8 in, u8* out);
@@ -19,5 +21,10 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
unsigned addr, int incr_addr, u8 *buf, unsigned blocks, unsigned blksz);
int sdio_reset(struct mmc_host *host);
+static inline bool mmc_is_io_op(u32 opcode)
+{
+ return opcode == SD_IO_RW_DIRECT || opcode == SD_IO_RW_EXTENDED;
+}
+
#endif
--
2.4.3
next prev parent reply other threads:[~2015-09-22 15:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 15:30 [PATCH 0/3] mmc: Wait for card_busy before starting sdio requests Hans de Goede
2015-09-22 15:30 ` Hans de Goede [this message]
2015-09-22 15:30 ` [PATCH 2/3] " Hans de Goede
2015-09-22 15:30 ` [PATCH 3/3] mmc: sunxi: Add card busy detection Hans de Goede
2015-09-23 21:43 ` [PATCH 0/3] mmc: Wait for card_busy before starting sdio requests Ulf Hansson
2015-09-24 9:19 ` Hans de Goede
2015-09-24 11:18 ` Arend van Spriel
2015-09-24 16:04 ` Doug Anderson
2015-09-25 5:35 ` Jaehoon Chung
2015-09-25 7:53 ` Hans de Goede
2015-09-25 9:37 ` Jaehoon Chung
2015-09-25 9:41 ` Hans de Goede
2015-09-25 9:58 ` Jaehoon Chung
2015-09-25 10:06 ` Hans de Goede
2015-09-25 10:23 ` Jaehoon Chung
2015-09-25 16:14 ` Doug Anderson
2015-09-29 12:58 ` Hans de Goede
2015-09-29 17:38 ` Doug Anderson
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=1442935826-16758-2-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).