linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowjanya Komatineni <skomatineni@nvidia.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	Mikko Perttunen <mperttunen@nvidia.com>
Cc: "thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: RE: [PATCH V6 2/2] mmc: tegra: HW Command Queue Support for Tegra SDMMC
Date: Fri, 28 Dec 2018 20:16:15 +0000	[thread overview]
Message-ID: <BN7PR12MB2836645A118593A969ABA5AEC2B70@BN7PR12MB2836.namprd12.prod.outlook.com> (raw)
In-Reply-To: <317b5abe-894a-097a-cbfa-0cab5e253a0d@intel.com>

Hi Adrian

>> This patch adds HW Command Queue for supported Tegra SDMMC 
>> controllers.
>> 
>> Tegra SDHCI with Quirk SDHCI_QUIRK2_BROKEN_64_BIT_DMA disables the use 
>> of 64_BIT DMA to disable 64-bit addressing mode access to the system 
>> memory and sdhci_cqe_enable using flag SDHCI_USE_64_BIT_DMA for 
>> ADMA32/ADMA2 Vs ADMA64/ADMA3 DMA selection.
>> 
>> CQE need to use ADMA3 as it need to fetch task descriptor along with 
>> transfer descriptor, so this patch forces DMA Select to be
>> ADMA3 for CQE.

> I don't understand why you use the term "ADMA3" since it is not CQE terminology, can be 32-bit or 64-bit, and, from the driver point of view, has quite different requirements from CQE.
> 
> It seems you are saying that Tegra supports only 32-bit DMA but must select 64-bit DMA for CQE?  Can you clarify this a bit?
> 

As per Host Spec, When Host Version 4 is enabled, DMA_SELECT options supported are
00: SDMA
01: Not Used
10: ADMA2
11: ADMA2 or ADMA3

When Host Version 4 is disabled, DMA_SELECT options supported are
00: SDMA
01: Not Used
10: 32-Bit addressing ADMA2
11: 64-Bit addressing ADMA2

Version 4 is enabled for CQE and need to use ADMA3 DMA Select. ADMA3 enables host to program multiple ADMA2 operations.
CQE need to fetch both task descriptor and transfer descriptor and should use ADMA3.
ADMA3 is supported with both 32-bit and 64-bit addressing modes. 
SDHCI driver has DMA select options defined as per Host versions below 4 and using ADMA32, ADMA64 which are equivalent to ADMA2 and ADMA3 for Host V4.
If using same ADMA64 is adding confusion, probably I can add define ADMA3_CQE with same b'11 to avoid confusion. Please let me know.

>> 
>> Tegra SDMMC Host design prevents write access to BLOCK_COUNT registers 
>> when CQE is enabled to prevent SW from updating block size during 
>> Command Queue mode.
>> 
>> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>> ---
>>  drivers/mmc/host/Kconfig       |   1 +
>>  drivers/mmc/host/sdhci-tegra.c | 107 ++++++++++++++++++++++++++++++++++++++++-
>>  drivers/mmc/host/sdhci.c       |   6 ++-
>>  3 files changed, 112 insertions(+), 2 deletions(-)

Thanks & Regards,
Sowjanya

      reply	other threads:[~2018-12-28 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27 21:58 [PATCH V6 0/2] HW Command Queue support for Tegra SDMMC Sowjanya Komatineni
2018-12-27 21:58 ` [PATCH V6 1/2] arm64: dtsi: Fix SDMMC address range Sowjanya Komatineni
2018-12-27 21:58 ` [PATCH V6 2/2] mmc: tegra: HW Command Queue Support for Tegra SDMMC Sowjanya Komatineni
2018-12-28  8:58   ` Adrian Hunter
2018-12-28 20:16     ` Sowjanya Komatineni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN7PR12MB2836645A118593A969ABA5AEC2B70@BN7PR12MB2836.namprd12.prod.outlook.com \
    --to=skomatineni@nvidia.com \
    --cc=adrian.hunter@intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).