mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
i2c-omap: Don't write IE state in unidle if 0
Commit ef871432... (i2c-omap: OMAP3: PM: (re)init for every transfer to support off-mode) introduced a change which make the dev->iestate contents be written to the OMAP_I2C_IE_REG every time omap_i2c_unidle is called. Previously, the state was only written if it wasn't equal to zero. In omap_i2c_probe, omap_i2c_unidle() is called prior to omap_i2c_init(), in which case dev->iestate has not yet been initialized and will be set to zero. Having this value written to the registers causes deadlock while booting. As such, this change restores the original functionality. Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
parent
ac07fb4dc1
commit
07ac31f6f4
1 changed files with 7 additions and 1 deletions
|
@ -247,7 +247,13 @@ static void omap_i2c_unidle(struct omap_i2c_dev *dev)
|
||||||
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
|
omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN);
|
||||||
}
|
}
|
||||||
dev->idle = 0;
|
dev->idle = 0;
|
||||||
omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
|
|
||||||
|
/*
|
||||||
|
* Don't write to this register if the IE state is 0 as it can
|
||||||
|
* cause deadlock.
|
||||||
|
*/
|
||||||
|
if (dev->iestate)
|
||||||
|
omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap_i2c_idle(struct omap_i2c_dev *dev)
|
static void omap_i2c_idle(struct omap_i2c_dev *dev)
|
||||||
|
|
Loading…
Reference in a new issue