Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142671
b: refs/heads/master
c: 65de394
h: refs/heads/master
i:
  142669: f12ae5c
  142667: b564549
  142663: e115571
  142655: 6d91014
v: v3
  • Loading branch information
Wolfram Sang authored and Ben Dooks committed Apr 7, 2009
1 parent 49a90b0 commit 02e2a54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b486ddbc0fb8127ccf2c820cfbf0b98e6f8a4e97
refs/heads/master: 65de394df21f8ccc61525f77b0e4ee6940a0932e
7 changes: 3 additions & 4 deletions trunk/drivers/i2c/busses/i2c-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
/** Variables ******************************************************************
*******************************************************************************/

static unsigned int disable_delay; /* Dummy delay */

/*
* sorted list of clock divider, register value pairs
* taken from table 26-5, p.26-9, Freescale i.MX
Expand Down Expand Up @@ -121,6 +119,7 @@ struct imx_i2c_struct {
int irq;
wait_queue_head_t queue;
unsigned long i2csr;
unsigned int disable_delay;
};

/** Functions for IMX I2C adapter driver ***************************************
Expand Down Expand Up @@ -212,7 +211,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
* This delay caused by an i.MXL hardware bug.
* If no (or too short) delay, no "STOP" bit will be generated.
*/
udelay(disable_delay);
udelay(i2c_imx->disable_delay);
/* Disable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2CR);
}
Expand Down Expand Up @@ -243,7 +242,7 @@ static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
* This delay is used in I2C bus disable function
* to fix chip hardware bug.
*/
disable_delay = (500000U * i2c_clk_div[i][0]
i2c_imx->disable_delay = (500000U * i2c_clk_div[i][0]
+ (i2c_clk_rate / 2) - 1) / (i2c_clk_rate / 2);

/* dev_dbg() can't be used, because adapter is not yet registered */
Expand Down

0 comments on commit 02e2a54

Please sign in to comment.