Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp442213imm; Wed, 29 Aug 2018 04:02:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZZ9bEBPRV/hr+Fi8+cA8wyn2NH/PH7Id3BZtqhblPrnjlD8TUFKLG0+eCwJKifMoO+EUur X-Received: by 2002:a65:60cf:: with SMTP id r15-v6mr3347237pgv.41.1535540572509; Wed, 29 Aug 2018 04:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535540572; cv=none; d=google.com; s=arc-20160816; b=Fo0y49aBLKA+mYVbT8vof6zgAXBog5Sa3wTyRplXv24qBtxD+56PUFmcZu3HXXVr6/ NLy1jty9ecX9ZWDyk32SEWQ0KeLuH5f4j4aarOVXwqK6MypnO8+DaL/R6F8ssAM49Qs9 FRUDjq5ZgqJaKfliNIjYk73EDaMptCzJ8x4zdyJgqtlwzW6KFsZOKUQ3XCeT72w+KNMk jArYFQ5UMWXftavOnEXLzHj5+bYl0KjqY9BcpO3ZIcn9VBBTOMXRlbLv5QCrgctBkSE5 TKQrHvPbEsaE9Ec/t+jpY7VNLE7hAvJvHWpnS9KCi1g/NRYzmO9nsk4xqn2hzTm6xsd/ CrZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=aPT1cou2ELeg8xCHnm0heW9Ok5CQo7h52V8V0f9BEnk=; b=bjAGSXQrCTRbNa9KBHAPjE1/V2Memm3rIPdx7ryF2XWsSBeF0Cu76sYIP2QnLXMUsY nqp3cPO8UUSCAOzq/oWUvGWCQ9aNsSWscLbIb6HABGALdDq+id9kAxl8A66PP2+VPR09 jgoTa2AIXgyoxlrCd7eMsp4iPJssjtcENNA9FnGe+Xxl5qWoiXyzP9nhU12l1jT0d2m0 uPXAiC9vHocmFrT/BfIrDioUwq6bcC+dl2wKo9TslUwDTYev390s7PTCqQaxsXl+0C74 xA2J8S5SEUh4HJAcKzhHYxDdjdS1+nxs02CRyGDDQjTGJCe3VMffsDzD4Sae/FB+F39I y60w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3-v6si3558981pgc.447.2018.08.29.04.02.36; Wed, 29 Aug 2018 04:02:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728269AbeH2O5t (ORCPT + 99 others); Wed, 29 Aug 2018 10:57:49 -0400 Received: from mga05.intel.com ([192.55.52.43]:2716 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbeH2O5t (ORCPT ); Wed, 29 Aug 2018 10:57:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2018 04:01:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,303,1531810800"; d="scan'208";a="66031902" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.98]) ([10.237.72.98]) by fmsmga007.fm.intel.com with ESMTP; 29 Aug 2018 04:01:26 -0700 Subject: Re: [PATCH V7 7/9] mmc: sdhci: SDMA may use Auto-CMD23 in v4 mode To: Chunyan Zhang , Ulf Hansson Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Orson Zhai , Baolin Wang , Billows Wu , Jason Wu , Chunyan Zhang , Chunyan Zhang References: <1535526184-32718-1-git-send-email-zhang.chunyan@linaro.org> <1535526184-32718-8-git-send-email-zhang.chunyan@linaro.org> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Wed, 29 Aug 2018 13:59:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1535526184-32718-8-git-send-email-zhang.chunyan@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/08/18 10:03, Chunyan Zhang wrote: > When Host Version 4 Enable is set to 1, SDMA uses ADMA System Address > register (05Fh-058h) instead of using register (000h-004h) to indicate > its system address of data location. The register (000h-004h) is > re-assigned to 32-bit Block Count and Auto CMD23 argument, so then SDMA > may use Auto CMD23. > > Signed-off-by: Chunyan Zhang > --- > drivers/mmc/host/sdhci.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c > index 62d843ac90..ac92e0f 100644 > --- a/drivers/mmc/host/sdhci.c > +++ b/drivers/mmc/host/sdhci.c > @@ -3834,10 +3834,14 @@ int sdhci_setup_host(struct sdhci_host *host) > if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12) > host->flags |= SDHCI_AUTO_CMD12; > > - /* Auto-CMD23 stuff only works in ADMA or PIO. */ > + /* > + * For v3 mode, Auto-CMD23 stuff only works in ADMA or PIO; ; -> . > + * For v4 mode, SDMA may use Auto-CMD23 as well. > + */ > if ((host->version >= SDHCI_SPEC_300) && > ((host->flags & SDHCI_USE_ADMA) || > - !(host->flags & SDHCI_USE_SDMA)) && > + (!host->v4_mode && !(host->flags & SDHCI_USE_SDMA)) || > + (host->v4_mode && (host->flags & SDHCI_USE_SDMA))) && > !(host->quirks2 & SDHCI_QUIRK2_ACMD23_BROKEN)) { This is over complicated. We can use auto-CMD23 if not using SDMA or if in v4_mode i.e. if (host->version >= SDHCI_SPEC_300 && (!(host->flags & SDHCI_USE_SDMA) || host->v4_mode) && !(host->quirks2 & SDHCI_QUIRK2_ACMD23_BROKEN)) { > host->flags |= SDHCI_AUTO_CMD23; > DBG("Auto-CMD23 available\n"); >