public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: "Avinash.H.M." <avinashhm@ti.com>
To: Paul Walmsley <paul@pwsan.com>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Nayak, Rajendra" <rnayak@ti.com>, "Hilman, Kevin" <kh>
Subject: Re: [PATCH] omap: hwmod: add syss reset done flags to omap2, omap3 hwmods
Date: Thu, 31 Mar 2011 18:36:06 +0530	[thread overview]
Message-ID: <20110331130606.GB3938@avinash-laptop> (raw)
In-Reply-To: <20110326113138.GA3668@avinash-laptop>

> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2011-03-31 13:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 10:08 [PATCH] omap: hwmod: add syss reset done flags to omap2, omap3 hwmods Avinash.H.M
2011-03-03 21:28 ` Paul Walmsley
2011-03-14 16:16   ` Avinash.H.M.
2011-03-25  5:38     ` Paul Walmsley
2011-03-25  6:26       ` Avinash.H.M.
2011-03-25  7:20         ` Avinash.H.M.
2011-03-25 17:24           ` Paul Walmsley
2011-03-26 11:35             ` Avinash.H.M.
2011-03-26 19:38               ` Paul Walmsley
2011-03-31 14:40               ` Avinash.H.M.
2011-03-31 15:04                 ` Kevin Hilman
2011-03-31 15:51                   ` Avinash.H.M.
2011-03-31 15:56                     ` Cousson, Benoit
2011-03-31 16:22                       ` Avinash.H.M.
2011-03-25 14:42       ` Cousson, Benoit
2011-03-25 17:23         ` Paul Walmsley
2011-03-26 11:31           ` Avinash.H.M.
2011-03-31 13:06             ` Avinash.H.M. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110331130606.GB3938@avinash-laptop \
    --to=avinashhm@ti.com \
    --cc=b-cousson@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox