diff options
author | yong mao | 2017-01-03 16:49:57 +0800 |
---|---|---|
committer | Ulf Hansson | 2017-02-13 13:20:05 +0100 |
commit | 3bc702ed211f1a384aa1ca1ad852ef40c5757ded (patch) | |
tree | a53d8e3961645bf9014003fe43440d7374232881 | |
parent | e9acc77dd046b22c7ebf70e35f68968978445f8b (diff) |
mmc: mediatek: correct the implementation of msdc_card_busy
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>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/mtk-sd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index d33828efc253..8e32580c12b5 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -1075,11 +1075,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) |