Skip to contentSkip to conversation

linux-omap-psp: Added patch to fix MMC timeout errors

PATCH Superseded Joel A Fernandes 2 participants 2 messages Jul 14, 2011 – Jul 15, 2011

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 linux-omap-psp: Added patch to fix MMC timeout errors

This fixes MMC errors due to timeouts, and is borrowed from Steve Sakoman's patch for the linux-omap-2.6.39 recipe (as noticed by Jason Kridner)

---
Changes since v2:
* Applied the patch to the correct recipe (linux-omap-psp-2.6.32 instead of linux-omap-2.6.32) (Sorry!)
* Moved author name to commit message

A link shared by Jason discussing the issue:
http://www.mail-archive.com/[email protected]/msg42214.html

Paul,
This is an actual problem that we experience and this patch seems to fix it.

Patch:
http://cgit.openembedded.net/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch

---
 ...mc-Adjust-dto-to-eliminate-timeout-errors.patch |   22 ++++++++++++++++++++
 recipes/linux/linux-omap-psp_2.6.32.bb             |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 recipes/linux/linux-omap-psp-2.6.32/0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch
recipes/linux/linux-omap-psp-2.6.32/0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file +22 -0
new file mode 100644
index 0000000..4867d3f
@@ -0,0 +1,22 @@
+From 26a79f408bd41ad7b4a47f2683909d3fc1575eab Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <[email protected]>
+Date: Wed, 12 Jan 2011 05:54:55 -0800
+Subject: [PATCH] omap: mmc: Adjust dto to eliminate timeout errors
+
+A number of SD card types were experiencing timeout errors.  This
+could also lead to data corruption in some cases.
+
+This fix proposed by Sukumar Ghoral of TI.
+---
+diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
+index 9646a75..ef458d6 100644
+--- a/drivers/mmc/host/omap_hsmmc.c
++++ b/drivers/mmc/host/omap_hsmmc.c
+@@ -1032,6 +1032,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
+ 	cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd);
+ 	timeout = timeout_ns / cycle_ns;
+ 	timeout += timeout_clks;
++	timeout *= 2;
+ 	if (timeout) {
+ 		while ((timeout & 0x80000000) == 0) {
+ 			dto += 1;
recipes/linux/linux-omap-psp_2.6.32.bb +1 -0
index a076bf1..e6c97ed 100644
@@ -59,6 +59,7 @@ SRC_URI = "git://arago-project.org/git/projects/linux-omap3.git;protocol=http;br
            file://0044-ARM-OMAP-beagle-every-known-beagle-except-revB-uses-.patch \
            file://0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch \
            file://0046-ARM-OMAP-beagle-disable-uart-timeout.patch \
+           file://0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch \
            file://cam/0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch \
            file://cam/0002-mt9t111-Fix-all-checkpatch-errors.patch \
            file://cam/0003-mt9t111-Pass-v4l2_int_device-data.patch \
Signature · 1 line
1.7.0.4
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 15-07-11 00:35, Joel A Fernandes schreef:

Quoted 4 lines

This fixes MMC errors due to timeouts, and is borrowed from Steve Sakoman's patch for the linux-omap-2.6.39 recipe (as noticed by Jason Kridner)

http://www.mail-archive.com/[email protected]/msg42214.html

That needs to go in to the summary

Quoted 3 lines

Paul, This is an actual problem that we experience and this patch seems to fix it.

Patch: http://cgit.openembedded.net/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch ---

And you're missing a

- -MACHINE_KERNEL_PR_append = "e+gitr${SRCREV}"
+MACHINE_KERNEL_PR_append = "f+gitr${SRCREV}"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFOH+yWMkyGM64RGpERAjfIAJ0bAsRWsVUdkUIaVm5jcYEZ6dE4bACfVyBL AuQu1mFvLC4wXniyiweDJb8=
=6zgI
-----END PGP SIGNATURE-----