From: Chris Ball <cjb@laptop.org>
To: r66093@freescale.com
Cc: linux-mmc@vger.kernel.org,
Jerry Huang <Chang-Ming.Huang@freescale.com>,
Priyanka Jain <Priyanka.Jain@freescale.com>
Subject: Re: [PATCH 5/5 v4] ESDHC: Fix DMA errors in kernel booting on P1010
Date: Fri, 06 Jan 2012 10:00:16 -0500 [thread overview]
Message-ID: <m2ehvczxj3.fsf@bob.laptop.org> (raw)
In-Reply-To: <1325827997-27490-6-git-send-email-r66093@freescale.com> (r66093@freescale.com's message of "Fri, 6 Jan 2012 13:33:17 +0800")
Hi Jerry,
On Fri, Jan 06 2012, r66093@freescale.com wrote:
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 2db0d5c..d5a2259 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -832,14 +832,29 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
> * is ADMA.
> */
> if (host->version >= SDHCI_SPEC_200) {
> - ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
> - ctrl &= ~SDHCI_CTRL_DMA_MASK;
> - if ((host->flags & SDHCI_REQ_USE_DMA) &&
> - (host->flags & SDHCI_USE_ADMA))
> - ctrl |= SDHCI_CTRL_ADMA32;
> - else
> - ctrl |= SDHCI_CTRL_SDMA;
> - sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
> + if (host->quirks2 & SDHCI_QUIRK2_QORIQ_PROCTL_WEIRD) {
> +#define ESDHCI_PROCTL_DMAS_MASK 0x00000300
> +#define ESDHCI_PROCTL_ADMA32 0x00000200
> +#define ESDHCI_PROCTL_SDMA 0x00000000
> + u32 ctrl;
> + ctrl = sdhci_readl(host, SDHCI_HOST_CONTROL);
> + ctrl &= ~ESDHCI_PROCTL_DMAS_MASK;
> + if ((host->flags & SDHCI_REQ_USE_DMA) &&
> + (host->flags & SDHCI_USE_ADMA))
> + ctrl |= ESDHCI_PROCTL_ADMA32;
> + else
> + ctrl |= ESDHCI_PROCTL_SDMA;
> + sdhci_writel(host, ctrl, SDHCI_HOST_CONTROL);
> + } else {
> + ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
> + ctrl &= ~SDHCI_CTRL_DMA_MASK;
> + if ((host->flags & SDHCI_REQ_USE_DMA) &&
> + (host->flags & SDHCI_USE_ADMA))
> + ctrl |= SDHCI_CTRL_ADMA32;
> + else
> + ctrl |= SDHCI_CTRL_SDMA;
> + sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
> + }
drivers/mmc/host/sdhci.c must know nothing about ESDHC registers.
It's a generic driver. We can add hooks so that your own driver
can run code in the right place instead.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2012-01-06 15:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 5:33 [PATCH 0/1] new version workaround for FSL's eSDHC controller r66093
2012-01-06 5:33 ` [PATCH 1/5 v2] ESDHC: add PIO mode support r66093
2012-01-06 5:33 ` [PATCH 2/5 v2] ESDHC: set the timeout to the max value r66093
2012-01-06 5:33 ` [PATCH 3/5 v4] ESDHC: Power management for ESDHC r66093
2012-01-06 5:33 ` [PATCH 4/5 v4] ESDHC: Workaround for data crc error on p1010rdb r66093
2012-01-06 5:33 ` [PATCH 5/5 v4] ESDHC: Fix DMA errors in kernel booting on P1010 r66093
2012-01-06 15:00 ` Chris Ball [this message]
2012-01-09 2:59 ` Huang Changming-R66093
2012-01-13 2:37 ` [PATCH 4/5 v4] ESDHC: Workaround for data crc error on p1010rdb Huang Changming-R66093
2012-01-13 12:12 ` Anton Vorontsov
2012-01-16 4:43 ` Huang Changming-R66093
2012-01-13 2:36 ` [PATCH 3/5 v4] ESDHC: Power management for ESDHC Huang Changming-R66093
2012-01-13 11:50 ` Anton Vorontsov
2012-01-13 2:36 ` [PATCH 2/5 v2] ESDHC: set the timeout to the max value Huang Changming-R66093
2012-01-13 11:54 ` Anton Vorontsov
2012-01-16 3:35 ` Huang Changming-R66093
2012-01-13 2:35 ` [PATCH 1/5 v2] ESDHC: add PIO mode support Huang Changming-R66093
2012-01-13 11:56 ` Anton Vorontsov
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=m2ehvczxj3.fsf@bob.laptop.org \
--to=cjb@laptop.org \
--cc=Chang-Ming.Huang@freescale.com \
--cc=Priyanka.Jain@freescale.com \
--cc=linux-mmc@vger.kernel.org \
--cc=r66093@freescale.com \
/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