From: mingming lee <mingming.lee@mediatek.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 7/8] mmc: mtk-sd: fix hang when data read quickly
Date: Tue, 31 Dec 2019 11:29:25 +0800 [thread overview]
Message-ID: <20191231032926.2194-8-mingming.lee@mediatek.com> (raw)
In-Reply-To: <20191231032926.2194-1-mingming.lee@mediatek.com>
For CMD21 tuning data, the 128/64 bytes data may coming in very
short time, before msdc_start_data(), the read data has already
come, in this case, clear MSDC_INT will cause the interrupt disappear
and lead to the thread hang.
the solution is just clear all interrupts before command was sent.
Signed-off-by: mingming lee <mingming.lee@mediatek.com>
---
drivers/mmc/mtk-sd.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index 23413731dc..b0365877d7 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -14,7 +14,6 @@
#include <malloc.h>
#include <mapmem.h>
#include <stdbool.h>
-#include <watchdog.h>
#include <asm/gpio.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
@@ -531,6 +530,7 @@ static int msdc_start_command(struct msdc_host *host, struct mmc_cmd *cmd,
blocks = data->blocks;
writel(CMD_INTS_MASK, &host->base->msdc_int);
+ writel(DATA_INTS_MASK, &host->base->msdc_int);
writel(blocks, &host->base->sdc_blk_num);
writel(cmd->cmdarg, &host->base->sdc_arg);
writel(rawcmd, &host->base->sdc_cmd);
@@ -677,13 +677,9 @@ static int msdc_start_data(struct msdc_host *host, struct mmc_data *data)
u32 size;
int ret;
- WATCHDOG_RESET();
-
if (data->flags == MMC_DATA_WRITE)
host->last_data_write = 1;
- writel(DATA_INTS_MASK, &host->base->msdc_int);
-
size = data->blocks * data->blocksize;
if (data->flags == MMC_DATA_WRITE)
--
2.24.1
next prev parent reply other threads:[~2019-12-31 3:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 3:29 [PATCH v2 0/8] Add support for MediaTek MT8512 Soc mingming lee
2019-12-31 3:29 ` [PATCH v2 1/8] ARM: MediaTek: Add support for MediaTek MT8512 SoC mingming lee
2020-01-16 14:41 ` Tom Rini
2019-12-31 3:29 ` [PATCH v2 2/8] clk: mediatek: add driver support for MT8512 mingming lee
2020-01-16 14:41 ` Tom Rini
2019-12-31 3:29 ` [PATCH v2 3/8] clk: mediatek: add set_clr_upd mux type flow mingming lee
2020-01-16 14:41 ` Tom Rini
2019-12-31 3:29 ` [PATCH v2 4/8] clk: mediatek: add configurable pcw_chg_reg/ibits/fmin to mtk_pll mingming lee
2020-01-16 14:41 ` Tom Rini
2020-01-16 14:41 ` Tom Rini
2019-12-31 3:29 ` [PATCH v2 5/8] pinctrl: mediatek: add driver for MT8512 mingming lee
2020-01-16 14:41 ` Tom Rini
2019-12-31 3:29 ` [PATCH v2 6/8] mmc: mtk-sd: add support for MediaTek MT8512/MT8110 SoCs mingming lee
2020-01-16 14:41 ` Tom Rini
2019-12-31 3:29 ` mingming lee [this message]
2020-01-16 14:41 ` [PATCH v2 7/8] mmc: mtk-sd: fix hang when data read quickly Tom Rini
2019-12-31 3:29 ` [PATCH v2 8/8] ARM: MediaTek: add basic support for MT8512 boards mingming lee
2020-01-16 14:41 ` Tom Rini
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=20191231032926.2194-8-mingming.lee@mediatek.com \
--to=mingming.lee@mediatek.com \
--cc=u-boot@lists.denx.de \
/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