Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1549618 > unrolled thread

[PATCH v2] Fix CMD6 timeout issue

Started byYong Mao <yong.mao@mediatek.com>
First post2017-01-03 10:00 +0100
Last post2017-01-03 10:00 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] Fix CMD6 timeout issue  Yong Mao <yong.mao@mediatek.com> - 2017-01-03 10:00 +0100
    [PATCH v2 2/2] mmc: mediatek: correct the implementation of msdc_card_busy Yong Mao <yong.mao@mediatek.com> - 2017-01-03 10:00 +0100

#1549618 — [PATCH v2] Fix CMD6 timeout issue

FromYong Mao <yong.mao@mediatek.com>
Date2017-01-03 10:00 +0100
Subject[PATCH v2] Fix CMD6 timeout issue
Message-ID<sVt6O-3AE-13@gated-at.bofh.it>
yong mao (2):
  mmc: core: Fix CMD6 timeout issue
  mmc: mediatek: correct the implementation of msdc_card_busy

 drivers/mmc/core/core.c   | 19 +++++++++++++++++++
 drivers/mmc/host/mtk-sd.c |  7 ++-----
 2 files changed, 21 insertions(+), 5 deletions(-)

-- 
1.8.1.1.dirty

[toc] | [next] | [standalone]


#1549619 — [PATCH v2 2/2] mmc: mediatek: correct the implementation of msdc_card_busy

FromYong Mao <yong.mao@mediatek.com>
Date2017-01-03 10:00 +0100
Subject[PATCH v2 2/2] mmc: mediatek: correct the implementation of msdc_card_busy
Message-ID<sVt6O-3AE-11@gated-at.bofh.it>
In reply to#1549618
From: yong mao <yong.mao@mediatek.com>

msdc_card_busy only need check if the data0 is low.
In sdio data1 irq mode, data1 may be low because of interruption.

Signed-off-by: Yong Mao <yong.mao@mediatek.com>
Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
---
 drivers/mmc/host/mtk-sd.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 10ef2ae..80ba034 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -1074,11 +1074,8 @@ static int msdc_card_busy(struct mmc_host *mmc)
 	struct msdc_host *host = mmc_priv(mmc);
 	u32 status = readl(host->base + MSDC_PS);
 
-	/* check if any pin between dat[0:3] is low */
-	if (((status >> 16) & 0xf) != 0xf)
-		return 1;
-
-	return 0;
+	/* only check if data0 is low */
+	return !(status & BIT(16));
 }
 
 static void msdc_request_timeout(struct work_struct *work)
-- 
1.7.9.5

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web