Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2620004imm; Fri, 24 Aug 2018 02:23:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbTK4FhoKh8G/cyh/jBd5W8TUx5t62n91XOhvMRrbL5bl+8cHWF6pMCpBrb9lXGjaLcyTCY X-Received: by 2002:a17:902:22:: with SMTP id 31-v6mr904572pla.190.1535102612010; Fri, 24 Aug 2018 02:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535102611; cv=none; d=google.com; s=arc-20160816; b=t2bkVKZV5SDC/ryEtV8byDW1dJUdNN3AiI6Q3xXnlHReAkf3Ka2pAf5K/TIUZKdn5o QnSKBo+zsr9TCiuLhM47Cq7XRhDfmQLNyIXLrDnl+Vw8wtbPBZ1tlz8UJGOsDvmGd/0u jR/0vAjKgC3WxxfpAOig3NIdLrssMzz4ABVMqtWoVXh/WJqXLaOxLnh5LSlVaZn1xRmh WDx7JVgQ+YUtbYBigyLUhrs5iI23SxVO4hn7Vm0DZiE1qe31zySTj0FUjKPRjbUm+Ewz 3VDa+bopvn4zhL/OQopGGtARLo/r6XcC0+Yjh/7YR464g3epiVOJJJi567xWOf1gD9pf 12bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=F8ycUMm5cEF7zHqTC/mFHa7ECSePE1v/XI0xbfy/QLA=; b=qno6GI5lo1c5dEDkp/XaMUBk2RJD3EqEdqxFxe1EdDKEDtpCQRIU2eXA9Hb2pi/0Uk 0Maoof34AmebjTv3xgg4kksAmv9F64y0BGz+HOSgOiEpryh2jngYOnq7b1r4WuwQPlyc cnIsk9CQ37tK3NwksMu4sBSdAl1BIEvn0RP5akkqptrqOOh3PjVzdWJSXojDSF3TUq/A uWV9f6hcfueMAnCC5fdjDbJ7ayOqdn1+D0WltmWI3FPzD72HSRTNeywVLCPj2kX8qed2 VqQnzauUr27am0/kXypVrYm/P3E+Zv48XnqwtuBcFv3sK2t217lft6V4uRZn+W/9bquM Dw/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z7qPe3TH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j62-v6si7461904pfb.348.2018.08.24.02.23.16; Fri, 24 Aug 2018 02:23:31 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Z7qPe3TH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727864AbeHXMze (ORCPT + 99 others); Fri, 24 Aug 2018 08:55:34 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39900 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727019AbeHXMze (ORCPT ); Fri, 24 Aug 2018 08:55:34 -0400 Received: by mail-pf1-f193.google.com with SMTP id j8-v6so4266264pff.6 for ; Fri, 24 Aug 2018 02:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F8ycUMm5cEF7zHqTC/mFHa7ECSePE1v/XI0xbfy/QLA=; b=Z7qPe3THEZioTqfmBT0VRxkEuJMLizX/DerVHLOSNrZCI2MSmODuw9sjtk9OfJ9+Fl D/qHOUKLUXODKZ8UbB/cFmv8tgDt7hNumQhM5lErvlyvQQ22+27KkijbhMKYB4B20VXc GgTu5PWE3jdRUwaT4fezdVhVpGHqKJbGnQQyA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F8ycUMm5cEF7zHqTC/mFHa7ECSePE1v/XI0xbfy/QLA=; b=i9zc/TkBXziTo9U6V/kpthne1w2d450RewlskoHxKLH9B8u/oz/J04nJrZFZXIXbYw 4fhOgD7BazLfZ/7Qxh1sKqzFRfFRWykVNHNR4HHuVKGfocuxfSWpy+uO7k3d72llulYz 25PwC7pfIj0daDi3bCfUjqYtFTKMdLJqJJ9Idnh9tK3N3KeYo5rkIhd9tuIM2gamUF2r IGOD2h6nxJOSNYwnMp2aptL+WWwHecUO+L06HBKzUQFwUGEP4WOk9PV/vt6o385ecfdi z2hVYqhy4rlsNzCk+HUnF/+4YMjEU+QkGnyq7TDTI52htw3S2/3x9clDVskhaMg0oHsz 1W1w== X-Gm-Message-State: APzg51DaVSDIKikamaLr7wOUQZqIaAzYEABpf3rR4EEOw+bJnJTseEfF QSLnAzk9hcxrHc+cLn1lpettTw== X-Received: by 2002:a63:1c07:: with SMTP id c7-v6mr888654pgc.109.1535102507976; Fri, 24 Aug 2018 02:21:47 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id g6-v6sm9520314pfb.11.2018.08.24.02.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Aug 2018 02:21:47 -0700 (PDT) From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Orson Zhai , Baolin Wang , Billows Wu , Jason Wu , Chunyan Zhang , Chunyan Zhang Subject: [PATCH V6 7/9] mmc: sdhci: SDMA may use Auto-CMD23 in v4 mode Date: Fri, 24 Aug 2018 17:20:26 +0800 Message-Id: <1535102428-20332-8-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535102428-20332-1-git-send-email-zhang.chunyan@linaro.org> References: <1535102428-20332-1-git-send-email-zhang.chunyan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 7e01601..1cb55f2 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3828,10 +3828,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)) { host->flags |= SDHCI_AUTO_CMD23; DBG("Auto-CMD23 available\n"); -- 2.7.4