From: Wolfram Sang <wsa@the-dreams.de>
To: linux-mmc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
linux-renesas-soc@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH 4/5] mmc: tmio/sdhi: distinguish between SCLKDIVEN and ILL_FUNC
Date: Thu, 14 Apr 2016 18:16:48 +0200 [thread overview]
Message-ID: <1460650609-2105-5-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1460650609-2105-1-git-send-email-wsa@the-dreams.de>
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
This bit has a different meaning in SDHI and original TMIO. Document
that and use the proper naming.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/mmc/host/sh_mobile_sdhi.c | 3 ++-
drivers/mmc/host/tmio_mmc.h | 3 ++-
drivers/mmc/host/tmio_mmc_pio.c | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index b85b87eb55009f..5923ce7e0fccb3 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -244,7 +244,8 @@ static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host)
{
int timeout = 1000;
- while (--timeout && !(sd_ctrl_read16(host, CTL_STATUS2) & (1 << 13)))
+ while (--timeout && !(sd_ctrl_read16_and_16_as_32(host, CTL_STATUS)
+ & TMIO_STAT_SCLKDIVEN))
udelay(1);
if (!timeout) {
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 55f251fdb78623..8dd5ea4be0a371 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -70,7 +70,8 @@
#define TMIO_STAT_DAT0 BIT(23) /* only known on R-Car so far */
#define TMIO_STAT_RXRDY BIT(24)
#define TMIO_STAT_TXRQ BIT(25)
-#define TMIO_STAT_ILL_FUNC BIT(29)
+#define TMIO_STAT_ILL_FUNC BIT(29) /* only when !TMIO_MMC_HAS_IDLE_WAIT */
+#define TMIO_STAT_SCLKDIVEN BIT(29) /* only when TMIO_MMC_HAS_IDLE_WAIT */
#define TMIO_STAT_CMD_BUSY BIT(30)
#define TMIO_STAT_ILL_ACCESS BIT(31)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index f4d8b5a741a875..e9b0271a81742a 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -548,7 +548,7 @@ static void tmio_mmc_data_irq(struct tmio_mmc_host *host)
* waiting for one more interrupt fixes the problem.
*/
if (host->pdata->flags & TMIO_MMC_HAS_IDLE_WAIT) {
- if (status & TMIO_STAT_ILL_FUNC)
+ if (status & TMIO_STAT_SCLKDIVEN)
done = true;
} else {
if (!(status & TMIO_STAT_CMD_BUSY))
--
2.7.0
next prev parent reply other threads:[~2016-04-14 16:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 16:16 [PATCH 0/5] mmc: tmio: make CTL_STATUS handling consistent Wolfram Sang
2016-04-14 16:16 ` [PATCH 1/5] mmc: tmio: give read32/write32 functions more descriptive names Wolfram Sang
2016-04-14 16:16 ` [PATCH 2/5] mmc: tmio: use BIT() within defines Wolfram Sang
2016-04-14 16:16 ` [PATCH 3/5] mmc: tmio: use CTL_STATUS consistently Wolfram Sang
2016-04-14 16:16 ` Wolfram Sang [this message]
2016-04-14 16:16 ` [PATCH 5/5] mmc: tmio: document CTL_STATUS handling Wolfram Sang
2016-04-15 0:51 ` [PATCH 0/5] mmc: tmio: make CTL_STATUS handling consistent Simon Horman
2016-04-15 9:11 ` Wolfram Sang
2016-04-26 16:25 ` Ulf Hansson
2016-04-26 16:46 ` Wolfram Sang
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=1460650609-2105-5-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@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;
as well as URLs for NNTP newsgroup(s).