public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Haijun.Zhang@freescale.com
Cc: linux-mmc@vger.kernel.org, Jerry Huang <Chang-Ming.Huang@freescale.com>
Subject: Re: [PATCH V3] Powerpc eSDHC Recover from the ADMA error
Date: Wed, 19 Sep 2012 08:41:40 -0700	[thread overview]
Message-ID: <20120919154140.GA1743@lizard> (raw)
In-Reply-To: <1348046559-13215-1-git-send-email-Haijun.Zhang@freescale.com>

On Wed, Sep 19, 2012 at 05:22:39PM +0800, Haijun.Zhang@freescale.com wrote:
> From: Haijun Zhang <Haijun.Zhang@freescale.com>
> 
> Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> CC: Anton Vorontsov <cbouatmailru@gmail.com>
[...]
> ---
> changes for v3:
>         - Correct the if statement in function workground
> 
> changes for v2:
>         - Invert the condition of the if statement in function workground

Just two minor cosmetic comments...

>  drivers/mmc/host/sdhci-of-esdhc.c |   53 ++++++++++++++++++++++++++++++++++++-
>  drivers/mmc/host/sdhci.c          |    2 +
>  drivers/mmc/host/sdhci.h          |    5 +++-
>  3 files changed, 58 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index 1cba55a..7a4c410 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -21,6 +21,7 @@
>  #include "sdhci-esdhc.h"
>  
>  #define VENDOR_V_22	0x12
> +#define VENDOR_V_23    0x13

The above line uses tab, but you add spaces.
A bit inconsistent.

[...]
> +static void esdhci_of_adma_workaround(struct sdhci_host *host, u32 intmask)
> +{
> +	u32 tmp;
> +	bool applicable;
> +	dma_addr_t dmastart;
> +	dma_addr_t dmanow;
> +
> +	tmp = in_be32(host->ioaddr + SDHCI_SLOT_INT_STATUS);
> +	tmp = (tmp & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;
> +
> +	applicable = (intmask & SDHCI_INT_DATA_END) &&
> +			(intmask & SDHCI_INT_BLK_GAP) &&
> +			(tmp == VENDOR_V_23);
> +	if (!applicable)
> +		return;
> +
> +	host->data->error = 0;
> +	dmastart = sg_dma_address(host->data->sg);
> +	dmanow = dmastart + host->data->bytes_xfered;
> +	/*
> +	 * Force update to the next DMA block boundary.
> +	 */
> +	dmanow = (dmanow &
> +		~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1)) +

These two lines can be put into one.

> +		SDHCI_DEFAULT_BOUNDARY_SIZE;
> +	host->data->bytes_xfered = dmanow - dmastart;
> +	sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS);
> +}

The rest looks OK, so for of-esdhc part, feel free to add:

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Thanks!

  reply	other threads:[~2012-09-19 15:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19  9:22 [PATCH V3] Powerpc eSDHC Recover from the ADMA error Haijun.Zhang
2012-09-19 15:41 ` Anton Vorontsov [this message]
2012-09-20  2:46   ` Zhang Haijun-B42677

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=20120919154140.GA1743@lizard \
    --to=cbouatmailru@gmail.com \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=Haijun.Zhang@freescale.com \
    --cc=linux-mmc@vger.kernel.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