From: Rajendra Nayak <rnayak@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: b-cousson@ti.com, khilman@ti.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Anand Gadiyar <gadiyar@ti.com>,
Shubhrajyoti D <shubhrajyoti@ti.com>
Subject: Re: [PATCH v2 2/2] ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status
Date: Wed, 11 Apr 2012 16:36:47 +0530 [thread overview]
Message-ID: <4F8565C7.4080506@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1204101803020.20894@utopia.booyaka.com>
Hi Paul,
On Wednesday 11 April 2012 05:41 AM, Paul Walmsley wrote:
> Just noticed that this change results in I2C softreset failed messages on
> OMAP2/3/4 on v3.4-rc2. For example, on 2420:
>
> [ 0.200378] omap_hwmod: i2c1: softreset failed (waited 10000 usec)
> [ 0.222076] omap_hwmod: i2c2: softreset failed (waited 10000 usec)
>
> Looking more closely at the code, I think the intention of the original
> code was basically correct. HDQ and I2C both need to execute some custom
> reset code after the SOFTRESET bit is set, but before the RESETDONE bit is
> tested. After this patch, the internal hwmod code tries to wait for
> RESETDONE to change, before the custom code runs -- and that is going to
> fail.
>
> Just out of curiosity, was the change in this patch prompted by some code
> that needed the change? Or was this a theoretical problem, driven by a
> code review?
The changes were done to fix up random L3 interconnect errors that
Anand G was seeing(during i2c reset operation) on some customer
platforms. I seem to have completely overlooked the I2C_EN programming
part done in omap_i2c_reset() function when I did the patch.
While the patch did fix the issue for Anand, I guess it
was because of the additional delay post reset, waiting on the
RESETDONE bit and timing out, before accessing the i2c_con register.
So looks like this patch should certainly be reverted but atleast some
platforms/modules (the issue was seen on OMAP4/i2c) will need some
delay between the omap_hwmod_softreset() call and any subsequent module
register accesses.
The patch from Fernando [1] can be quite useful if we can use the
'srst_udelay' field to populate the appropriate delay needed which can
then be used up in omap_hwmod_softreset() function.
I am out sick today, but I can try some on these lines tomorrow once
I am in office, if the approach seems fine to you.
Btw, is [1] queued already by you/Benoit to go upstream or are there
issues with it?
regards,
Rajendra
[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-February/086713.html
next prev parent reply other threads:[~2012-04-11 11:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 17:25 [PATCH v2 0/2] Fixes in hwmod reset code Rajendra Nayak
2012-03-13 17:25 ` [PATCH v2 1/2] ARM: omap: hwmod: Restore sysc after a reset Rajendra Nayak
2012-03-13 17:25 ` [PATCH v2 2/2] ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status Rajendra Nayak
2012-04-11 0:11 ` Paul Walmsley
2012-04-11 11:06 ` Rajendra Nayak [this message]
2012-04-11 18:59 ` Paul Walmsley
2012-04-12 13:05 ` Rajendra Nayak
2012-04-12 17:15 ` Paul Walmsley
2012-04-13 9:26 ` Rajendra Nayak
2012-04-13 10:45 ` Paul Walmsley
2012-04-13 11:22 ` Paul Walmsley
2012-04-13 12:15 ` Rajendra Nayak
-- strict thread matches above, loose matches on Subject: below --
2012-03-13 14:03 [PATCH v2 0/2] Fixes in hwmod reset code Rajendra Nayak
2012-03-13 14:03 ` [PATCH v2 2/2] ARM: omap: hwmod: Make omap_hwmod_softreset wait for reset status Rajendra Nayak
2012-04-04 15:34 ` Paul Walmsley
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=4F8565C7.4080506@ti.com \
--to=rnayak@ti.com \
--cc=b-cousson@ti.com \
--cc=gadiyar@ti.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=shubhrajyoti@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;
as well as URLs for NNTP newsgroup(s).