From: Wolfram Sang <w.sang@pengutronix.de>
To: "Chuanxiao.Dong" <chuanxiao.dong@intel.com>
Cc: cjb@laptop.org, adrian.hunter@nokia.com, linux-mmc@vger.kernel.org
Subject: Re: [PATCH v1 1/3]Add erase timeout calculation routine for sdhci host
Date: Thu, 11 Nov 2010 10:33:42 +0100 [thread overview]
Message-ID: <20101111093341.GA3131@pengutronix.de> (raw)
In-Reply-To: <20101111090519.GB18170@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
On Thu, Nov 11, 2010 at 05:05:19PM +0800, Chuanxiao.Dong wrote:
> From 04704a1c769dc4d15b5fb54d65d8ad46f6c5f57a Mon Sep 17 00:00:00 2001
> From: Chuanxiao Dong <chuanxiao.dong@intel.com>
> Date: Thu, 11 Nov 2010 13:42:32 +0800
> Subject: [PATCH 1/3] mmc: add erase timeout calculation routine for sdhci host
>
> Erase command needs R1b response which means after HD handle
> a CMD_RESPONSE interrupt, driver also need to wait for a while.
> For SDHCI host controller, HD also need to handle a DATA_END
> interrupt.
> During device handle erase cmd, if the blocks need to be erased
> are too many, some SDHCI host controller maybe launch a TIMEOUT
> interrupt before the erase cmd finishing. To avoid this kind of
> situation, SDHCI HD need to calculate a correct timeout value
> before issuing erase cmd. Patch added a routine to implement
> this.
Just a formal thing I noticed on a glimpse...
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 154cbf8..79fcca2 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -879,6 +879,48 @@ static void sdhci_finish_data(struct sdhci_host *host)
> tasklet_schedule(&host->finish_tasklet);
> }
>
> +static void sdhci_set_erasetimeout(struct sdhci_host *host,
> + unsigned int erase_timeout)
> +{
> + u64 current_timeout;
> + int count = 0xe;
I'd suggest a define with a speaking name instead of all the hardcoded 0xe.
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-11-11 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 9:05 [PATCH v1 1/3]Add erase timeout calculation routine for sdhci host Chuanxiao.Dong
2010-11-11 9:33 ` Wolfram Sang [this message]
2010-11-11 10:01 ` Dong, Chuanxiao
2010-11-11 10:15 ` Wolfram Sang
2010-11-11 10:23 ` Dong, Chuanxiao
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=20101111093341.GA3131@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=adrian.hunter@nokia.com \
--cc=chuanxiao.dong@intel.com \
--cc=cjb@laptop.org \
--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