summaryrefslogtreecommitdiff
path: root/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch')
-rw-r--r--recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch b/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch
new file mode 100644
index 0000000000..6a3a5d9354
--- /dev/null
+++ b/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch
@@ -0,0 +1,52 @@
+From 991f54c9da846ab9571c256adf42d8d80d044bdc Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Tue, 16 Feb 2010 10:04:30 -0800
+Subject: [PATCH 11/37] OMAP3: trim excessively long delays in i2c driver
+
+---
+ drivers/i2c/omap24xx_i2c.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
+index 30a8b4c..ba47fc4 100644
+--- a/drivers/i2c/omap24xx_i2c.c
++++ b/drivers/i2c/omap24xx_i2c.c
+@@ -148,7 +148,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
+ if (status & I2C_STAT_XRDY) {
+ /* Important: have to use byte access */
+ writeb (regoffset, &i2c_base->data);
+- udelay (20000);
++ udelay (2000);
+ if (readw (&i2c_base->stat) & I2C_STAT_NACK) {
+ i2c_error = 1;
+ }
+@@ -160,7 +160,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
+ /* free bus, otherwise we can't use a combined transction */
+ writew (0, &i2c_base->con);
+ while (readw (&i2c_base->stat) || (readw (&i2c_base->con) & I2C_CON_MST)) {
+- udelay (10000);
++ udelay (1000);
+ /* Have to clear pending interrupt to clear I2C_STAT */
+ writew (0xFFFF, &i2c_base->stat);
+ }
+@@ -181,7 +181,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
+ #else
+ *value = readw (&i2c_base->data);
+ #endif
+- udelay (20000);
++ udelay (2000);
+ } else {
+ i2c_error = 1;
+ }
+@@ -190,7 +190,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
+ writew (I2C_CON_EN, &i2c_base->con);
+ while (readw (&i2c_base->stat)
+ || (readw (&i2c_base->con) & I2C_CON_MST)) {
+- udelay (10000);
++ udelay (1000);
+ writew (0xFFFF, &i2c_base->stat);
+ }
+ }
+--
+1.6.6.1
+