From: Jaehoon Chung <jh80.chung@samsung.com>
To: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>,
kyungmin Park <kyungmin.park@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
matt@console-pimps.org
Subject: [RFC Patch] SDHCI: add quirk for data timeout value when card busy.
Date: Tue, 30 Nov 2010 15:13:48 +0900 [thread overview]
Message-ID: <4CF4961C.5020606@samsung.com> (raw)
This patch is added quirks for data timeout value.
Some card have problem when suspend/resume.
CMD6(switch command) to switch the bus to high speed mode
and to set the bus width.
After resuming, the card was initialized...in that time, some
card need set a correct timeout value.
so we add SDHCI_QUIRK_SET_DATA_TIMEOUT_VAL.
Let me know any comment, plz.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/mmc/host/sdhci.c | 6 +++++-
include/linux/mmc/sdhci.h | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 782c0ee..3b93d97 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -655,8 +655,12 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
WARN_ON(host->data);
- if (data == NULL)
+ if (data == NULL) {
+ if ((host->quirks & SDHCI_QUIRK_SET_DATA_TIMEOUT_VAL) &&
+ (host->cmd->flags & MMC_RSP_BUSY))
+ sdhci_writel(host, 0xE, SDHCI_TIMEOUT_CONTROL);
return;
+ }
/* Sanity checks */
BUG_ON(data->blksz * data->blocks > 524288);
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index 1fdc673..315ff49 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -83,7 +83,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28)
/* Controller doesn't have HISPD bit field in HI-SPEED SD card */
#define SDHCI_QUIRK_NO_HISPD_BIT (1<<29)
-
+/* Controller need set data timeout value when card is busy */
+#define SDHCI_QUIRK_SET_DATA_TIMEOUT_VAL (1<<30)
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */
--
1.6.0.4
Thanks
Jaehoon Chung
next reply other threads:[~2010-11-30 6:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 6:13 Jaehoon Chung [this message]
2010-11-30 6:42 ` [RFC Patch] SDHCI: add quirk for data timeout value when card busy Philip Rakity
2010-11-30 7:15 ` Jaehoon Chung
2010-11-30 9:56 ` Wolfram Sang
2010-11-30 10:13 ` Jaehoon Chung
2010-11-30 10:54 ` Wolfram Sang
2010-11-30 11:37 ` Jaehoon Chung
2010-11-30 15:56 ` Philip Rakity
2010-12-01 5:44 ` Jaehoon Chung
2010-12-01 5:51 ` Philip Rakity
2010-12-01 12:29 ` Jaehoon Chung
2010-12-01 16:21 ` Philip Rakity
2010-12-02 7:40 ` Jaehoon Chung
2010-12-02 9:09 ` Wolfram Sang
2010-12-02 16:00 ` Philip Rakity
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=4CF4961C.5020606@samsung.com \
--to=jh80.chung@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=cjb@laptop.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=matt@console-pimps.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.