From patchwork Wed Nov 1 01:37:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 10035825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B507A603B5 for ; Wed, 1 Nov 2017 01:39:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A711A28AD2 for ; Wed, 1 Nov 2017 01:39:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BE3628B2B; Wed, 1 Nov 2017 01:39:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=2.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_HI, RCVD_IN_SBL_CSS, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E2BD28AD2 for ; Wed, 1 Nov 2017 01:39:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062AbdKABjT (ORCPT ); Tue, 31 Oct 2017 21:39:19 -0400 Received: from lucky1.263xmail.com ([211.157.147.134]:54251 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753486AbdKABjT (ORCPT ); Tue, 31 Oct 2017 21:39:19 -0400 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.29]) by lucky1.263xmail.com (Postfix) with ESMTP id 1FB258AF9; Wed, 1 Nov 2017 09:39:17 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 168943DC; Wed, 1 Nov 2017 09:39:14 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: ulf.hansson@linaro.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from unknown (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith SMTP id 319827H6F01; Wed, 01 Nov 2017 09:39:16 +0800 (CST) From: Shawn Lin To: Ulf Hansson Cc: Jaehoon Chung , linux-mmc@vger.kernel.org, Adrian Hunter , Jan Glauber , Shawn Lin Subject: [PATCH v2 3/3] mmc: cavium: Add ACMD23 support for dma's multiple mode Date: Wed, 1 Nov 2017 09:37:13 +0800 Message-Id: <1509500233-133821-3-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509500233-133821-1-git-send-email-shawn.lin@rock-chips.com> References: <1509500233-133821-1-git-send-email-shawn.lin@rock-chips.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Still need prepare for dma's multiple mode if it's a preceding ACMD23 since it indicates a multiple block write is coming. Signed-off-by: Shawn Lin Tested-by: Jan Glauber --- Changes in v2: None drivers/mmc/host/cavium.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c index fbd29f0..56bf0e0 100644 --- a/drivers/mmc/host/cavium.c +++ b/drivers/mmc/host/cavium.c @@ -637,7 +637,8 @@ static u64 prepare_ext_dma(struct mmc_host *mmc, struct mmc_request *mrq) set_bus_id(&emm_dma, slot->bus_id); if (mmc_card_mmc(mmc->card) || (mmc_card_sd(mmc->card) && - (mmc->card->scr.cmds & SD_SCR_CMD23_SUPPORT))) + ((mmc->card->scr.cmds & SD_SCR_CMD23_SUPPORT) || + mrq->sbc->flags & MMC_CMD_SD_APP))) emm_dma |= FIELD_PREP(MIO_EMM_DMA_MULTI, 1); pr_debug("[%s] blocks: %u multi: %d\n",