From patchwork Fri Jul 19 03:04:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?V2VpamllIEdhbyAo6auY5oOf5p2wKQ==?= X-Patchwork-Id: 1133888 X-Patchwork-Delegate: van.freenix@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45qbTj0mDbz9s4Y for ; Fri, 19 Jul 2019 13:05:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DA831C22091; Fri, 19 Jul 2019 03:05:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=RDNS_NONE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EBB66C21F02; Fri, 19 Jul 2019 03:04:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9E5E4C21F02; Fri, 19 Jul 2019 03:04:57 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [1.203.163.78]) by lists.denx.de (Postfix) with ESMTP id 2335AC21EC2 for ; Fri, 19 Jul 2019 03:04:54 +0000 (UTC) X-UUID: e18a805ca5ca4dbe8cdf601d1dd22a06-20190719 X-UUID: e18a805ca5ca4dbe8cdf601d1dd22a06-20190719 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1105847203; Fri, 19 Jul 2019 11:04:52 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 19 Jul 2019 11:04:49 +0800 Received: from mcddlt001.mediatek.inc (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 19 Jul 2019 11:04:49 +0800 From: Weijie Gao To: Date: Fri, 19 Jul 2019 11:04:47 +0800 Message-ID: <1563505487-14005-1-git-send-email-weijie.gao@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-TM-SNTS-SMTP: 9BC843FBF2466D62282436C0CC1EBB01E37CB0DEE94AD9B32D6B2EAA3618D3DF2000:8 X-MTK: N Cc: GSS_MTK_Uboot_upstream Subject: [U-Boot] [PATCH] mmc: mtk-sd: add WATCHDOG_RESET() to prevent watchdog timeout X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- drivers/mmc/mtk-sd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index e0ac3e9d69..49085090c8 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -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;