Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp124541pxt; Thu, 5 Aug 2021 20:21:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaQ5dlp04Vb0bKcwjKxebZRuQkYbV+7gcwdQAHNMzThDKfdLa3VmWx+2m9oTo4fsz4LwrQ X-Received: by 2002:a92:d987:: with SMTP id r7mr3227iln.303.1628220119380; Thu, 05 Aug 2021 20:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628220119; cv=none; d=google.com; s=arc-20160816; b=SPedis+NEYoO19ur7TruUClCGXqYtQkX58MZKuQn50tPTWz2IdMyfykraIWyXTEvuI LopgpS2z/4DMk8UGVAzlKfXB00D0spg06vMofw+7sRwnrISZogaBPKglh/4bbLqX/BHm zaVIbJaZ82hUss057sOPlU9J0bY0d+Ijzep1sHzxKGvGGW4ZmfLu64ydLg2Ki8ZSopFr ulFgPEaaiDGnqRaodcHUFt1IiQlp8oqe/InM1CW2mXMCCK0PXPJteMPAqCGQ564bCThO aT9pNs2IgsmZ5UuxGLIbWmIGGjl980X/rjxyfSekz5LDOiK0cgO04hEIR5IX5YkQEN0x EYIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=h3Z228HtzGFxyqk/g5xvYLKTiN6ds9YNdUrRr66/gQo=; b=tfAfkbtG+QBcUR6YBWZQWt5DEsoY0Xg6VG+Fv5SGehOx1Y1C/BOqjqE50DQe8LU6+6 sQMeZCdJBxaXnqiEN3U5O03m9Jynhk9l7UX36w1dFaO3BKU5YjC80aVNHb8KTWmP4gyy 1etTVInA1ijlyWDM8Oz3Rj4/LB0XS9eG4r9hxTLBdLNqfqQDhv5Kd1b3RZ8JIPcmMnkr SHtieENG3cIoV5oqAjL7YfxuC5xRKvRvr1t67Ss/e2EnkGEr+9B02VkpBEJ/h8gH2z+Y vZl66zCen4wEfVR8O+NNn3+1gnZ27Z/s5daTNaWZqdI08ozHEd0Xohp2gjb2rrMM2RSS IZMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si8204264jat.115.2021.08.05.20.21.47; Thu, 05 Aug 2021 20:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238988AbhHFCcv (ORCPT + 99 others); Thu, 5 Aug 2021 22:32:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:47220 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230247AbhHFCct (ORCPT ); Thu, 5 Aug 2021 22:32:49 -0400 X-UUID: 09e01316fb6c4820b29f97c1ac351a03-20210806 X-UUID: 09e01316fb6c4820b29f97c1ac351a03-20210806 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1892728303; Fri, 06 Aug 2021 10:32:32 +0800 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 6 Aug 2021 10:32:30 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Fri, 6 Aug 2021 10:32:30 +0800 Received: from localhost.localdomain (10.15.20.246) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 6 Aug 2021 10:32:29 +0800 From: Derong Liu To: Chaotian Jing , Ulf Hansson , Matthias Brugger CC: , , , , , Peng Zhou , Derong Liu Subject: [PATCH] mmc: mediatek: add wait dma stop done flow Date: Fri, 6 Aug 2021 10:30:55 +0800 Message-ID: <20210806023055.29524-1-derong.liu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: mtk13858 it needs to wait for dma stop done after set dma stop. Signed-off-by: mtk13858 --- drivers/mmc/host/mtk-sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 4dfc246c5f95..1dfd2842471b 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2339,6 +2339,8 @@ static void msdc_cqe_disable(struct mmc_host *mmc, bool recovery) if (recovery) { sdr_set_field(host->base + MSDC_DMA_CTRL, MSDC_DMA_CTRL_STOP, 1); + while (readl(host->base + MSDC_DMA_CFG) & MSDC_DMA_CFG_STS) + cpu_relax(); msdc_reset_hw(host); } } -- 2.18.0