On Fri, Mar 25, 2011 at 11:23:38AM -0600, Paul Walmsley wrote: > Hi, > > On Fri, 25 Mar 2011, Cousson, Benoit wrote: > > > On 3/25/2011 6:38 AM, Paul Walmsley wrote: > > > > > On Thu, 24 Feb 2011, Avinash.H.M wrote: > > > > > > Some of the omap2, omap3 peripherals support software reset. This > > > > > > can be done through the softreset bit in sysconfig register. > > > > > > The reset status can be checked through resetdone bit of > > > > > > sysstatus register. syss_has_reset_status is added to the hwmod > > > > > > database of peripherals which have resetdone bit in sysstatus > > > > > > register. > > > > > > > > > > > > Cc: Rajendra Nayak<rnayak@xxxxxx> > > > > > > Cc: Paul Walmsley<paul@xxxxxxxxx> > > > > > > Cc: Benoit Cousson<b-cousson@xxxxxx> > > > > > > Cc: Kevin Hilman<khilman@xxxxxx> > > > > > > Reviewed-by: Govindraj.R<govindraj.raja@xxxxxx> > > > > > > Signed-off-by: Avinash.H.M<avinashhm@xxxxxx> > > > > > > This patch is causing I2C softreset timeouts in the hwmod layer on OMAP2 > > > and 3. Could you please take a look at this and figure out what is going > > > on? > > > > I think this is probably due to the nasty I2C softreset bug with discussed > > last year with Paul Brady. > > > > AFAIR, the I2C cannot be reset by just writing to the SYSCONFIG softreset bit. > > You need to play with other registers too. 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. > > 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. br, - Avinash > > > Avinash, > > You should try to look at 3430 or 3630 errata. You will probably find the bug > > I'm referring to. > > > - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html