aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWeijie Gao <weijie.gao@mediatek.com>2019-07-19 11:04:47 +0800
committerPeng Fan <peng.fan@nxp.com>2019-07-31 15:31:36 +0800
commitcaa332336d6b2b2109894ac12e839bdc79a678b1 (patch)
tree85128d94db937919995fea576fa682090673416e /drivers/mmc
parent58d65d5082b6adb97f6420125aefa876d45b8870 (diff)
downloadu-boot-caa332336d6b2b2109894ac12e839bdc79a678b1.zip
u-boot-caa332336d6b2b2109894ac12e839bdc79a678b1.tar.gz
u-boot-caa332336d6b2b2109894ac12e839bdc79a678b1.tar.bz2
mmc: mtk-sd: add WATCHDOG_RESET() to prevent watchdog timeout
When reading large data in once (reading 512MiB is tested on MT7623), a watchdog timeout is triggered due to watchdog not being fed. This patch adds WATCHDOG_RESET() to msdc_start_data() so the watchdog will be fed every 1024 blocks are read/written. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mtk-sd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index e0ac3e9..4908509 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <malloc.h>
#include <stdbool.h>
+#include <watchdog.h>
#include <asm/gpio.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
@@ -623,6 +624,8 @@ 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;