Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347057
b: refs/heads/master
c: ca85e24
h: refs/heads/master
i:
  347055: 552f49f
v: v3
  • Loading branch information
Shubhrajyoti D authored and Wolfram Sang committed Nov 14, 2012
1 parent f4d37b2 commit b3384ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 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: 554c96744afd169886bd6fc2736fb0d9aaf634e8
refs/heads/master: ca85e248b65649176e9e1edfbf5e791bc44ee52b
20 changes: 5 additions & 15 deletions trunk/drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ static void __omap_i2c_init(struct omap_i2c_dev *dev)
static int omap_i2c_reset(struct omap_i2c_dev *dev)
{
unsigned long timeout;
u16 sysc;

if (dev->rev >= OMAP_I2C_OMAP1_REV_2) {
sysc = omap_i2c_read_reg(dev, OMAP_I2C_SYSC_REG);

/* Disable I2C controller before soft reset */
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG,
omap_i2c_read_reg(dev, OMAP_I2C_CON_REG) &
Expand All @@ -327,22 +331,8 @@ static int omap_i2c_reset(struct omap_i2c_dev *dev)
}

/* SYSC register is cleared by the reset; rewrite it */
if (dev->rev == OMAP_I2C_REV_ON_2430) {

omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG,
SYSC_AUTOIDLE_MASK);
omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, sysc);

} else if (dev->rev >= OMAP_I2C_REV_ON_3430_3530) {
dev->syscstate = SYSC_AUTOIDLE_MASK;
dev->syscstate |= SYSC_ENAWAKEUP_MASK;
dev->syscstate |= (SYSC_IDLEMODE_SMART <<
__ffs(SYSC_SIDLEMODE_MASK));
dev->syscstate |= (SYSC_CLOCKACTIVITY_FCLK <<
__ffs(SYSC_CLOCKACTIVITY_MASK));

omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG,
dev->syscstate);
}
}
return 0;
}
Expand Down

0 comments on commit b3384ac

Please sign in to comment.