From: Johan Rudholm <johan.rudholm@axis.com>
To: linux-mmc@vger.kernel.org, Chris Ball <chris@printf.net>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Adrian Hunter" <adrian.hunter@intel.com>,
"Guennadi Liakhovetski" <g.liakhovetski@gmx.de>,
"David Lanzendörfer" <david.lanzendoerfer@o2s.ch>,
"Jesper Nilsson" <jespern@axis.com>,
"Johan Rudholm" <johanru@axis.com>
Subject: [PATCH v2 1/4] mmc: core: use mmc_send_status to check hw_reset
Date: Tue, 4 Nov 2014 16:07:03 +0100 [thread overview]
Message-ID: <1415113626-30187-2-git-send-email-johanru@axis.com> (raw)
In-Reply-To: <1415113626-30187-1-git-send-email-johanru@axis.com>
Signed-off-by: Johan Rudholm <johanru@axis.com>
---
drivers/mmc/core/core.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 7dc0c85..5d215ee 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2265,15 +2265,9 @@ static int mmc_do_hw_reset(struct mmc_host *host, int check)
/* If the reset has happened, then a status command will fail */
if (check) {
- struct mmc_command cmd = {0};
- int err;
+ u32 status;
- cmd.opcode = MMC_SEND_STATUS;
- if (!mmc_host_is_spi(card->host))
- cmd.arg = card->rca << 16;
- cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC;
- err = mmc_wait_for_cmd(card->host, &cmd, 0);
- if (!err) {
+ if (!mmc_send_status(card, &status)) {
mmc_host_clk_release(host);
return -ENOSYS;
}
--
1.7.2.5
next prev parent reply other threads:[~2014-11-04 15:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 15:07 [PATCH v2 0/4] mmc: core: hw_reset changes Johan Rudholm
2014-11-04 15:07 ` Johan Rudholm [this message]
2014-11-05 9:44 ` [PATCH v2 1/4] mmc: core: use mmc_send_status to check hw_reset Ulf Hansson
2014-11-04 15:07 ` [PATCH v2 2/4] mmc: core: group default initial state Johan Rudholm
2014-11-05 10:13 ` Ulf Hansson
2014-11-05 12:22 ` Johan Rudholm
2014-11-06 9:38 ` Ulf Hansson
2014-11-06 10:43 ` Johan Rudholm
2014-11-04 15:07 ` [PATCH v2 3/4] mmc: core: turn hw_reset into a bus_ops Johan Rudholm
2014-11-05 12:10 ` Adrian Hunter
2014-11-05 14:40 ` Johan Rudholm
2014-11-04 15:07 ` [PATCH v2 4/4] mmc: sd: add hw_reset callback Johan Rudholm
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=1415113626-30187-2-git-send-email-johanru@axis.com \
--to=johan.rudholm@axis.com \
--cc=adrian.hunter@intel.com \
--cc=chris@printf.net \
--cc=david.lanzendoerfer@o2s.ch \
--cc=g.liakhovetski@gmx.de \
--cc=jespern@axis.com \
--cc=johanru@axis.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