Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112368
b: refs/heads/master
c: 387fa6a
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Baryshkov authored and Russell King committed Sep 9, 2008
1 parent d163e2e commit fe52eaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 9ba63c4fa10cf446eff06a3200822d22b0c31c31
refs/heads/master: 387fa6a5eca021ed5bef5454413b7cdfda74ba41
7 changes: 4 additions & 3 deletions trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c)

static void i2c_pxa_abort(struct pxa_i2c *i2c)
{
unsigned long timeout = jiffies + HZ/4;
int i = 250;

if (i2c_pxa_is_slavemode(i2c)) {
dev_dbg(&i2c->adap.dev, "%s: called in slave mode\n", __func__);
return;
}

while (time_before(jiffies, timeout) && (readl(_IBMR(i2c)) & 0x1) == 0) {
while ((i > 0) && (readl(_IBMR(i2c)) & 0x1) == 0) {
unsigned long icr = readl(_ICR(i2c));

icr &= ~ICR_START;
Expand All @@ -206,7 +206,8 @@ static void i2c_pxa_abort(struct pxa_i2c *i2c)

show_state(i2c);

msleep(1);
mdelay(1);
i --;
}

writel(readl(_ICR(i2c)) & ~(ICR_MA | ICR_START | ICR_STOP),
Expand Down

0 comments on commit fe52eaf

Please sign in to comment.