linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2 v2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup
Date: Sat, 16 Apr 2011 09:42:23 -0700	[thread overview]
Message-ID: <1302972143.2719.22.camel@vence> (raw)
In-Reply-To: <20110411131154.GA4498@avinash-laptop>

On Mon, 2011-04-11 at 18:41 +0530, Avinash.H.M. wrote:
> > > > +     oh->_sysc_cache = v;
> > > > +     omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs);
> > >
> > > Direct SYSCONFIG access isn't right here.   This should go through
> > > omap_hwmod.
> > >
> > > What is probably needed is exposing _ocp_softreset to device code
> > > via something like omap_hwmod_ocp_softreset() and calling that here.
> > >
> 
> Hi Kevin , 
> 
> Looking more closely, i realised that, the sequence of _ocp_softreset
> doesn't work for I2C. It has a special programming sequence which needs
> to be followed to reset the IP. That was the reason, we created
> omap_i2c_reset.  So i feel we need not expose _ocp_softreset.
> 
> Since, the problem here is accessing the SYSCONFIG here, instead, what i
> can do is, something like below.
> 
> 	omap_hwmod_softreset(struct omap_hwmod *oh)
> 	{
> 
> 		v = oh->_sysc_cache;
> 		v |= (0x1 << oh->class->sysc->sysc_fields->srst_shift);
> 
> 		oh->_sysc_cache = v;
> 		omap_hwmod_write(v, oh, oh->class->sysc->sysc_offs);
> 
> 	}
> 
> And then call this in omap_i2c_reset. Is this OK ?

Yes, sounds reasonable.

Please be sure to describe the reasoning above in the changelog as well.

Thanks,

Kevin

  reply	other threads:[~2011-04-16 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  7:03 [PATCH 1/2 v2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup Avinash.H.M.
2011-04-11 13:11 ` Avinash.H.M.
2011-04-16 16:42   ` Kevin Hilman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-04-05 15:40 [PATCH 0/2 v2] OMAP2/3: fix the i2c,gpio reset timeouts during boot Avinash.H.M
2011-04-05 15:40 ` [PATCH 1/2 v2] OMAP2/3: hwmod: fix the i2c-reset timeout during bootup Avinash.H.M
2011-04-05 18:27   ` Kevin Hilman
2011-04-07  6:42     ` Mahadeva, Avinash

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=1302972143.2719.22.camel@vence \
    --to=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).