> Thanks Benoit. You are right. > > The TRM Section '18.3.1.3.2 Software Reset' explains the steps for > softresetting I2C. The steps are below: > > 1. Ensure that the module is disabled (clear the I2Ci.I2C_CON[15] I2C_EN > bit to 0). > 2. Set the I2Ci.I2C_SYSC[1] SRST bit to 1. > 3. Enable the module by setting I2Ci.I2C_CON[15] I2C_EN bit to 1. > 4. Check the I2Ci.I2C_SYSS[0] RDONE bit until it is set to 1 to indicate > the software reset is complete.
Hi paul, I have been able to implement the function. It took a while because, even after implementing the above sequence, i was seeing the I2C wasn't resetting. The issue turned out that i was doing '32 bit data access' which was corrupting the i2c register contents. I missed the TRM section where it tells, "i2c registers are limited to 8-bit or 16-bit access". Special thanks to balaji.t.k for helping me debug this and pointing this was the issue. On correcting this, the function worked cleanly and i2c was reset. I ll send out the patch tomorrow. br , - avinash > > > > > Thanks BenoƮt. > > > > So then, Avinash, you might need to create a custom hwmod class > > reset function for the I2C block (viz., struct omap_hwmod_class.reset) > > OK Paul. I'll add the I2C_CON register and follow the above sequence as > suggested in the TRM in the custom I2C reset function. > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html