From: "Benoît Thébaudeau" <benoit@wsystem.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH 1/4] mmc: sdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR
Date: Thu, 4 May 2017 11:00:50 +0200 [thread overview]
Message-ID: <19f1fd58-6b56-4ba5-4fdf-9cc845b55c27@wsystem.com> (raw)
In-Reply-To: <CAK8P3a2PTrDEKbvGRDcq6dhDaALbEQbUwO-TpjricgJPREFK=g@mail.gmail.com>
On 04/05/2017 10:47, Arnd Bergmann wrote:
> On Wed, May 3, 2017 at 12:05 PM, Benoît Thébaudeau <benoit@wsystem.com> wrote:
>> The eSDHC can only DMA from 32-bit-aligned addresses.
>>
>> This fixes the following test cases of mmc_test:
>> 11: Badly aligned write
>> 12: Badly aligned read
>> 13: Badly aligned multi-block write
>> 14: Badly aligned multi-block read
>>
>> Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
>
> Is this the right description? I thought that SDHCI_QUIRK_32BIT_DMA_ADDR
> was for devices that cannot address high memory above 0xffffffff, rather than
> requiring a specific alignment.
>
> If this is indeed an address range problem rather than an alignment problem,
> are you sure it is the SD controller that is wrong here, rather than having a
> 64-bit DMA capable SDHCI connected to a 32-bit parent bus? In the
> latter case, the dma-ranges property in the parent bus should limit
> the addressing, not the device.
No, this is the right description. This quirk really is about alignment, and not
about address range. See:
drivers/mmc/host/sdhci.h:
>---
/* Controller can only DMA from 32-bit aligned addresses */
#define SDHCI_QUIRK_32BIT_DMA_ADDR (1<<7)
<---
drivers/mmc/host/sdhci.c @ sdhci_prepare_data():
>---
offset_mask = 0;
[...]
if (host->quirks & SDHCI_QUIRK_32BIT_DMA_ADDR)
offset_mask = 3;
[...]
if (sg->offset & offset_mask) {
DBG("Reverting to PIO because of bad alignment\n");
host->flags &= ~SDHCI_REQ_USE_DMA;
break;
}
<---
Benoît
next prev parent reply other threads:[~2017-05-04 9:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 10:05 Benoît Thébaudeau
2017-05-03 10:05 ` [PATCH 2/4] mmc: sdhci-esdhc-imx: Fix DAT line software reset Benoît Thébaudeau
2017-05-29 8:02 ` Adrian Hunter
2017-05-29 11:13 ` Fabio Estevam
2017-05-03 10:05 ` [PATCH 3/4] mmc: sdhci-esdhc-imx: Allow all supported prescaler values Benoît Thébaudeau
2017-05-29 8:03 ` Adrian Hunter
2017-05-29 11:14 ` Fabio Estevam
2017-05-03 10:05 ` [PATCH 4/4] mmc: sdhci-esdhc-imx: Remove the ENGcm07207 workaround Benoît Thébaudeau
2017-05-29 8:07 ` Adrian Hunter
2017-05-29 14:42 ` Ulf Hansson
2017-05-29 16:39 ` Benoît Thébaudeau
2017-05-29 11:14 ` Fabio Estevam
2017-05-04 8:47 ` [PATCH 1/4] mmc: sdhci-esdhc: Add SDHCI_QUIRK_32BIT_DMA_ADDR Arnd Bergmann
2017-05-04 9:00 ` Benoît Thébaudeau [this message]
2017-05-04 9:37 ` Arnd Bergmann
2017-05-29 8:02 ` Adrian Hunter
2017-05-29 11:12 ` Fabio Estevam
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=19f1fd58-6b56-4ba5-4fdf-9cc845b55c27@wsystem.com \
--to=benoit@wsystem.com \
--cc=adrian.hunter@intel.com \
--cc=arnd@arndb.de \
--cc=fabio.estevam@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=wsa@the-dreams.de \
/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
all inboxes | Powered by JetHome®