Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp396763imm; Thu, 30 Aug 2018 01:24:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY0xDFoBqv0DUmqc8970/6kHlWUkT3A7A4tlgjPYdltt6K0CtRqMqlRdVqDl744Fpqa0+60 X-Received: by 2002:a63:7f08:: with SMTP id a8-v6mr8812752pgd.296.1535617449976; Thu, 30 Aug 2018 01:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535617449; cv=none; d=google.com; s=arc-20160816; b=K2NCuZnTAr/q73SQ05qLsyOz7p5pd2XCkgxnwpdtSm+YfP4sH23RGT9JxPmjrORsoK bVYfvbTcO6jaVU+iKYrT/D0BAXXhfdCzwc3i/26z9VrF41/jzq5XPN25bOSOW8cVY+re uZ30Vw/GYkoJEeZ9khZv6l7MTeYDjph9QgAiKzYV0YkCSF58eQybKGtMgPK1ZtaGzwmK PKJFmKt7usotnOW8d3ucnrexPL2cKLDrvXcohLRiocpL35ffRXgANQ9Sy7PLl56xTQRi se4cHlyHNgcGGvQwtshru6EOMG+0J2VJ5RRrAUnmRV1D7ZSj4oItIrD0wX8XH0oAc3l7 RdaA== 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=Ah8c1s4NQMeDLK8VDxuLb0Way+MTHYiFrnLMxjLrOic=; b=1J9pn7xdteb7KU+R6rJDunyPVVD/4rckKLmdpi/6wbZCGHy1X/4mUVuM1fTdaPRztB M93o5JDz0+WVl0cLjR1MuwGbulREe7AuIwpgdqs7jrjdvXIQRUXZVr0Alj0etabvQ0SG Sy5Hj2Pyr70Sxy1K7pVKEMxyvTCr/8wd4fLJPCEYXzlpAlzxGJeSWxKf1hg1eVyEuwq7 QyL3CwTnMITXkvHXXXf3dCpSNiHninl6dTkhYA5HvfBtIzgQJpyzEWPgKNJvIcreBmHc SINFSzJC7XUbrWHIfIVeagRc8pC76ynxWF73eKHYnE0RpVMLVswLy4uET9SnxOOY7eFB iwFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ci2esfNn; 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 s12-v6si5665274plp.464.2018.08.30.01.23.55; Thu, 30 Aug 2018 01:24:09 -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=Ci2esfNn; 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 S1728106AbeH3MX2 (ORCPT + 99 others); Thu, 30 Aug 2018 08:23:28 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38981 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728068AbeH3MX1 (ORCPT ); Thu, 30 Aug 2018 08:23:27 -0400 Received: by mail-pg1-f193.google.com with SMTP id g20-v6so3565829pgv.6 for ; Thu, 30 Aug 2018 01:22:29 -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=Ah8c1s4NQMeDLK8VDxuLb0Way+MTHYiFrnLMxjLrOic=; b=Ci2esfNnkrultBR2JC8oOpP8798ra5xy2lQVamINyr0vxNV8Va0QyFMobOXx5BrTzh 6AYTQroAWBjY4/dEK9n5xbBTh1ejAtr+e3CihREeL95NRivmUT87sZVVp+HWAHO8tLJb gQM80n7RDnruyd9l43yPB0goqCGQYGKbd3n5M= 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=Ah8c1s4NQMeDLK8VDxuLb0Way+MTHYiFrnLMxjLrOic=; b=liml2WMh12h40TF8sjpuPpoTFNwCjsIRoP2OHsyqDUq5wO7Y2MuZYLKT/4o9U2cZDH stESk/krcJyeUE36qLbh4iDkvKMBEFIlHG2gRI+ztaTsg12bBh4/bdHd0Ot3+9ikIgob rZinNp64dkU0UMaLMfEayqILP56bX0Do2VIZ6t8VeCScNI6TXPHePv91wA+dnF5LAc9h OF4kyG6ODn9MMDy/jzTTJUx2+wk9gBS29QJVSaOkRLzqFW0RGJwL06bo6ZTbsYDmSpKu HvFlkHv6iAj+2AjubpgIEyxw1gweUkvvwHTmCoWuSiXycYtqJSBfpKZadse6BP9313jx qgKQ== X-Gm-Message-State: APzg51C2bcczmlcGMHFSmYnEMwQ6YRbkaE4OFY2vAKT1YXNi20wUKgjy blHuaPvPsJjQlx9RVbzcvK1s/A== X-Received: by 2002:aa7:88d3:: with SMTP id p19-v6mr9499481pfo.160.1535617349542; Thu, 30 Aug 2018 01:22:29 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id j22-v6sm8224885pfh.45.2018.08.30.01.22.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Aug 2018 01:22:28 -0700 (PDT) From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter , Rob Herring 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 V8 7/9] mmc: sdhci: SDMA may use Auto-CMD23 in v4 mode Date: Thu, 30 Aug 2018 16:21:43 +0800 Message-Id: <1535617305-16952-8-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535617305-16952-1-git-send-email-zhang.chunyan@linaro.org> References: <1535617305-16952-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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 62d843ac90..606d331 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3834,10 +3834,13 @@ 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->flags & SDHCI_USE_SDMA) || host->v4_mode) && !(host->quirks2 & SDHCI_QUIRK2_ACMD23_BROKEN)) { host->flags |= SDHCI_AUTO_CMD23; DBG("Auto-CMD23 available\n"); -- 2.7.4