Skip to contentSkip to conversation

linux-omap-psp: Added patch by Steve Sakoman to fix timeout errors

PATCH Superseded Joel A Fernandes 3 participants 3 messages Jul 14, 2011

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 linux-omap-psp: Added patch by Steve Sakoman to fix timeout errors

This fixes MMC errors due to timeouts, and is borrowed from linux-omap-2.6.39 recipe (as noticed by Jason Kridner)

---
Changes since earlier patch:
* Fixed commit summary

Some useful links shared by Jason:
http://www.mail-archive.com/[email protected]/msg42214.html
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.patchRelevant links:

The link to the patch in org.openembedded.dev:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch?h=org.openembedded.dev

 ...mc-Adjust-dto-to-eliminate-timeout-errors.patch |   22 ++++++++++++++++++++
 recipes/linux/linux-omap_2.6.32.bb                 |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 recipes/linux/linux-omap-2.6.32/0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch
recipes/linux/linux-omap-2.6.32/0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file +22 -0
new file mode 100644
index 0000000..ae5a7aa
@@ -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 24/31] 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_2.6.32.bb +1 -0
index 348ec96..404387f 100644
@@ -33,6 +33,7 @@ file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch \
 file://0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch \
 file://0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch \
 file://0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch \
+file://0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch \
 file://madc/0009-drivers-mfd-add-twl4030-madc-driver.patch \
 file://madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch \
 file://madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch \
Signature · 1 line
1.7.0.4
#1 lore raw

Dear Joel,

Am Donnerstag, den 14.07.2011, 17:03 -0500 schrieb Joel A Fernandes:

in my opinion the commit summary should be the following.

Add patch to fix MMC errors due to timeouts

The name of the author can go into the commit message.

Quoted 1 line

This fixes MMC errors due to timeouts, and is borrowed from linux-omap-2.6.39 recipe (as noticed by Jason Kridner)

Did somebody actually experience this problem or this this precaution? If the forme could you please add a link to the problem report?

Quoted 8 lines

---
Changes since earlier patch:
* Fixed commit summary

Some useful links shared by Jason:
http://www.mail-archive.com/[email protected]/msg42214.html
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.patchRelevant links:

At the end there is missing a line break.

Quoted 2 lines

The link to the patch in org.openembedded.dev:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch?h=org.openembedded.dev

I would like to see those information in the commit message.

Quoted 38 lines
 ...mc-Adjust-dto-to-eliminate-timeout-errors.patch |   22 ++++++++++++++++++++
 recipes/linux/linux-omap_2.6.32.bb                 |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 recipes/linux/linux-omap-2.6.32/0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch
recipes/linux/linux-omap-2.6.32/0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file +22 -0
new file mode 100644
index 0000000..ae5a7aa
@@ -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 24/31] 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_2.6.32.bb +0 -0
index 348ec96..404387f 100644

recipes/linux/linux-omap_2.6.32.bb file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch \ · line 39

Quoted 7 lines
recipes/linux/linux-omap_2.6.32.bb +1 -0
@@ -33,6 +33,7 @@ file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch \
 file://0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch \
 file://0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch \
 file://0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch \
+file://0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch \
 file://madc/0009-drivers-mfd-add-twl4030-madc-driver.patch \
 file://madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch \
 file://madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch \

Otherwise this looks good.

Thanks,

Paul

#2 lore raw
Quoted 7 lines · Paul Menzel

Dear Joel,

Am Donnerstag, den 14.07.2011, 17:03 -0500 schrieb Joel A Fernandes:

in my opinion the commit summary should be the following.

Quoted 8 lines

Add patch to fix MMC errors due to timeouts

The name of the author can go into the commit message.

Quoted 1 line

This fixes MMC errors due to timeouts, and is borrowed from linux-omap-2.6.39 recipe (as noticed by Jason Kridner)

Did somebody actually experience this problem or this this precaution? If the forme could you please add a link to the problem report?

The first link below this paragraph includes reference to this issue. We've seen it on some of the BeagleBoard rev C5 boards being tested before release on certain SD cards, but Joel was asked directly to look at this issue rather than a post showing up on a mailing list. Another reference to the issue, that Joel might want to include if he does a revision, can be found at:
http://www.gossamer-threads.com/lists/maemo/users/64583. A slightly different fix was applied there, but the fundamental of increasing the timeout is the same.

Quoted 76 lines
Quoted 9 lines

---
Changes since earlier patch:
 * Fixed commit summary

Some useful links shared by Jason:
http://www.mail-archive.com/[email protected]/msg42214.html
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.patchRelevant links:

At the end there is missing a line break.

Quoted 2 lines

The link to the patch in org.openembedded.dev:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch?h=org.openembedded.dev

I would like to see those information in the commit message.

Quoted 38 lines

 ...mc-Adjust-dto-to-eliminate-timeout-errors.patch |   22 ++++++++++++++++++++ recipes/linux/linux-omap_2.6.32.bb                 |    1 +

 2 files changed, 23 insertions(+), 0 deletions(-)

 create mode 100644 recipes/linux/linux-omap-2.6.32/0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch

recipes/linux/linux-omap-2.6.32/0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file +22 -0
new file mode 100644
index 0000000..ae5a7aa
@@ -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 24/31] 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_2.6.32.bb +0 -0
index 348ec96..404387f 100644

recipes/linux/linux-omap_2.6.32.bb file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch \ · line 39

Quoted 7 lines
recipes/linux/linux-omap_2.6.32.bb +1 -0
@@ -33,6 +33,7 @@ file://0005-ARM-OMAP-add-support-for-TCT-Zippy-to-Beagle-board.patch \
  file://0006-ARM-OMAP-Make-beagle-u-boot-partition-writable.patch \
  file://0007-ASoC-enable-audio-capture-by-default-for-twl4030.patch \
  file://0009-MTD-NAND-omap2-proper-fix-for-subpage-read-ECC-error.patch \
+file://0010-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch \
  file://madc/0009-drivers-mfd-add-twl4030-madc-driver.patch \
  file://madc/0010-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch \
  file://madc/0011-ARM-OMAP-Add-twl4030-madc-support-to-Beagle.patch \

Otherwise this looks good.

Thanks,

Paul

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel