* I2C1 controller timed out issue
@ 2008-12-20 10:04 pramod gurav
2008-12-20 14:09 ` Felipe Balbi
0 siblings, 1 reply; 7+ messages in thread
From: pramod gurav @ 2008-12-20 10:04 UTC (permalink / raw)
To: linux-omap, linux-i2c
Hi,
I am working on OMAP3430 board. The kernel is linux-omap-2.6.
The twl5030 module is sitting on i2c1.
I often come across a error saying
i2c_omap i2c_omap.1: controller timed out
i2c_omap i2c_omap.1: controller timed out
This is all what appears in logs when i2c1 times out and all the
other slave devices on i2c1 stop responding. Other i2c busses(2)
work properly. if try to reboot the I2C fails to respnd in u-boot also
saying
timed out in wait_for_pin: I2C_STAT=0
I2C read failed
timed out in wait_for_pin: I2C_STAT=0
I2C read failed
timed out in wait_for_pin: I2C_STAT=0
I2C read failed
I have to to do hard reset to progress with the boot.
I gone through the changes happened to i2-omap driver in between
and tried applying the patches manually.
The problem still persists.
May be I am missing some more changes.
The i2-omap.c source is attached herewith this mail.
Somebody please suggest me on this issue if this has been seen as
a issue and if fixed.
Thanks
Pramod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: I2C1 controller timed out issue
2008-12-20 10:04 I2C1 controller timed out issue pramod gurav
@ 2008-12-20 14:09 ` Felipe Balbi
2008-12-22 5:14 ` pramod gurav
[not found] ` <c236f0530812200935y1397d03bm54fe7f3714776b0@mail.gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Felipe Balbi @ 2008-12-20 14:09 UTC (permalink / raw)
To: pramod gurav; +Cc: linux-omap, linux-i2c
On Sat, Dec 20, 2008 at 03:34:00PM +0530, pramod gurav wrote:
> Hi,
> I am working on OMAP3430 board. The kernel is linux-omap-2.6.
> The twl5030 module is sitting on i2c1.
> I often come across a error saying
>
> i2c_omap i2c_omap.1: controller timed out
> i2c_omap i2c_omap.1: controller timed out
>
> This is all what appears in logs when i2c1 times out and all the
> other slave devices on i2c1 stop responding. Other i2c busses(2)
> work properly. if try to reboot the I2C fails to respnd in u-boot also
> saying
>
> timed out in wait_for_pin: I2C_STAT=0
> I2C read failed
> timed out in wait_for_pin: I2C_STAT=0
> I2C read failed
> timed out in wait_for_pin: I2C_STAT=0
> I2C read failed
>
> I have to to do hard reset to progress with the boot.
>
> I gone through the changes happened to i2-omap driver in between
> and tried applying the patches manually.
> The problem still persists.
> May be I am missing some more changes.
>
> The i2-omap.c source is attached herewith this mail.
> Somebody please suggest me on this issue if this has been seen as
> a issue and if fixed.
Are you using current linux-omap from git ? This problem is long gone.
--
balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: I2C1 controller timed out issue
2008-12-20 14:09 ` Felipe Balbi
@ 2008-12-22 5:14 ` pramod gurav
[not found] ` <f502236f0812212114p4b20e81br52d9031c4673f886-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[not found] ` <c236f0530812200935y1397d03bm54fe7f3714776b0@mail.gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: pramod gurav @ 2008-12-22 5:14 UTC (permalink / raw)
To: me-uiRdBs8odbtmTBlB0Cgj/Q
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi,
I am using current linux-omap git sources. Can you please post the patch to fix
this timeout issue.
On Sat, Dec 20, 2008 at 7:39 PM, Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org> wrote:
> On Sat, Dec 20, 2008 at 03:34:00PM +0530, pramod gurav wrote:
>> Hi,
>> I am working on OMAP3430 board. The kernel is linux-omap-2.6.
>> The twl5030 module is sitting on i2c1.
>> I often come across a error saying
>>
>> i2c_omap i2c_omap.1: controller timed out
>> i2c_omap i2c_omap.1: controller timed out
>>
>> This is all what appears in logs when i2c1 times out and all the
>> other slave devices on i2c1 stop responding. Other i2c busses(2)
>> work properly. if try to reboot the I2C fails to respnd in u-boot also
>> saying
>>
>> timed out in wait_for_pin: I2C_STAT=0
>> I2C read failed
>> timed out in wait_for_pin: I2C_STAT=0
>> I2C read failed
>> timed out in wait_for_pin: I2C_STAT=0
>> I2C read failed
>>
>> I have to to do hard reset to progress with the boot.
>>
>> I gone through the changes happened to i2-omap driver in between
>> and tried applying the patches manually.
>> The problem still persists.
>> May be I am missing some more changes.
>>
>> The i2-omap.c source is attached herewith this mail.
>> Somebody please suggest me on this issue if this has been seen as
>> a issue and if fixed.
>
> Are you using current linux-omap from git ? This problem is long gone.
>
> --
> balbi
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: I2C1 controller timed out issue
[not found] ` <f502236f0812212114p4b20e81br52d9031c4673f886-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-12-22 5:22 ` pramod gurav
[not found] ` <f502236f0812212122x3cb45444ld30c5e56d3546726-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: pramod gurav @ 2008-12-22 5:22 UTC (permalink / raw)
To: me-uiRdBs8odbtmTBlB0Cgj/Q
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi,
The kernel is from the tag "v2.6.26-omap2".
And I applied the patch
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commitdiff;
h=663715fc55ea5d292171c6934a2b91d8f4874171;hp=3c0134484bd5fe3c3d9611aab1983881efc894c0
But it did not work for me.
Pramod
On Mon, Dec 22, 2008 at 10:44 AM, pramod gurav <pramodforum-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
> I am using current linux-omap git sources. Can you please post the patch to fix
> this timeout issue.
>
> On Sat, Dec 20, 2008 at 7:39 PM, Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org> wrote:
>> On Sat, Dec 20, 2008 at 03:34:00PM +0530, pramod gurav wrote:
>>> Hi,
>>> I am working on OMAP3430 board. The kernel is linux-omap-2.6.
>>> The twl5030 module is sitting on i2c1.
>>> I often come across a error saying
>>>
>>> i2c_omap i2c_omap.1: controller timed out
>>> i2c_omap i2c_omap.1: controller timed out
>>>
>>> This is all what appears in logs when i2c1 times out and all the
>>> other slave devices on i2c1 stop responding. Other i2c busses(2)
>>> work properly. if try to reboot the I2C fails to respnd in u-boot also
>>> saying
>>>
>>> timed out in wait_for_pin: I2C_STAT=0
>>> I2C read failed
>>> timed out in wait_for_pin: I2C_STAT=0
>>> I2C read failed
>>> timed out in wait_for_pin: I2C_STAT=0
>>> I2C read failed
>>>
>>> I have to to do hard reset to progress with the boot.
>>>
>>> I gone through the changes happened to i2-omap driver in between
>>> and tried applying the patches manually.
>>> The problem still persists.
>>> May be I am missing some more changes.
>>>
>>> The i2-omap.c source is attached herewith this mail.
>>> Somebody please suggest me on this issue if this has been seen as
>>> a issue and if fixed.
>>
>> Are you using current linux-omap from git ? This problem is long gone.
>>
>> --
>> balbi
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: I2C1 controller timed out issue
[not found] ` <f502236f0812212122x3cb45444ld30c5e56d3546726-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-12-22 7:26 ` David Brownell
0 siblings, 0 replies; 7+ messages in thread
From: David Brownell @ 2008-12-22 7:26 UTC (permalink / raw)
To: pramod gurav
Cc: me-uiRdBs8odbtmTBlB0Cgj/Q, linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sunday 21 December 2008, pramod gurav wrote:
> The kernel is from the tag "v2.6.26-omap2".
Yet the current kernel is 2.6.28-rc9-omap1 ... do
try the *current* GIT when someone suggests that,
not something seven months old.
I happen to know that RC8 didn't have this issue
in my use, for what it's worth.
- Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: I2C1 controller timed out issue
[not found] ` <c236f0530812200935y1397d03bm54fe7f3714776b0@mail.gmail.com>
@ 2008-12-22 16:03 ` Felipe Balbi
2008-12-22 16:07 ` Kainan Cha
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Balbi @ 2008-12-22 16:03 UTC (permalink / raw)
To: Kainan Cha; +Cc: me, pramod gurav, linux-omap, linux-i2c
On Sat, Dec 20, 2008 at 11:35:51AM -0600, Kainan Cha wrote:
> Balbi,
>
> I have also seen this issue once in a while but I am using 2.6.24 kernel. Do
> you know which commits in the linux-omap git fixes this issue so I can
> backport?
Hmm, I suppose it's this one:
commit 663715fc55ea5d292171c6934a2b91d8f4874171
Author: Paul Walmsley <paul@pwsan.com>
Date: Fri Oct 10 10:58:30 2008 -0600
i2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()
omap_i2c_unidle() and omap_i2c_idle() are called recursively during
omap_i2c_probe(). This is evidently unexpected and will wipe
out the I2C interrupt enable register the second time that
omap_i2c_idle() is called consecutively. Any I2C transactions
following a probe of a bus with at least one device on it will then
time out.
Fix by moving omap_i2c_idle() further up in omap_i2c_probe(). Ensure
the I2C controller is marked as idle before the probe starts. Also
attempt to catch future reappearances of this bug early in development
by warning in omap_i2c_{un,}idle() when they are called recursively.
Problem reported by David Brownell <david-b@pacbell.net>.
Tested on 3430SDP and 2430SDP.
But I'd say the changes to twl4030-core.c also helped and those will be
nasty to backport :-p
--
balbi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: I2C1 controller timed out issue
2008-12-22 16:03 ` Felipe Balbi
@ 2008-12-22 16:07 ` Kainan Cha
0 siblings, 0 replies; 7+ messages in thread
From: Kainan Cha @ 2008-12-22 16:07 UTC (permalink / raw)
To: me-uiRdBs8odbtmTBlB0Cgj/Q
Cc: pramod gurav, linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
Thanks.
Kainan
On Mon, Dec 22, 2008 at 10:03 AM, Felipe Balbi <me-uiRdBs8odbtmTBlB0Cgj/Q@public.gmane.org> wrote:
> On Sat, Dec 20, 2008 at 11:35:51AM -0600, Kainan Cha wrote:
>> Balbi,
>>
>> I have also seen this issue once in a while but I am using 2.6.24 kernel. Do
>> you know which commits in the linux-omap git fixes this issue so I can
>> backport?
>
> Hmm, I suppose it's this one:
>
> commit 663715fc55ea5d292171c6934a2b91d8f4874171
> Author: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
> Date: Fri Oct 10 10:58:30 2008 -0600
>
> i2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()
>
> omap_i2c_unidle() and omap_i2c_idle() are called recursively during
> omap_i2c_probe(). This is evidently unexpected and will wipe
> out the I2C interrupt enable register the second time that
> omap_i2c_idle() is called consecutively. Any I2C transactions
> following a probe of a bus with at least one device on it will then
> time out.
>
> Fix by moving omap_i2c_idle() further up in omap_i2c_probe(). Ensure
> the I2C controller is marked as idle before the probe starts. Also
> attempt to catch future reappearances of this bug early in development
> by warning in omap_i2c_{un,}idle() when they are called recursively.
>
> Problem reported by David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>.
>
> Tested on 3430SDP and 2430SDP.
>
> But I'd say the changes to twl4030-core.c also helped and those will be
> nasty to backport :-p
>
> --
> balbi
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-22 16:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 10:04 I2C1 controller timed out issue pramod gurav
2008-12-20 14:09 ` Felipe Balbi
2008-12-22 5:14 ` pramod gurav
[not found] ` <f502236f0812212114p4b20e81br52d9031c4673f886-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-22 5:22 ` pramod gurav
[not found] ` <f502236f0812212122x3cb45444ld30c5e56d3546726-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-22 7:26 ` David Brownell
[not found] ` <c236f0530812200935y1397d03bm54fe7f3714776b0@mail.gmail.com>
2008-12-22 16:03 ` Felipe Balbi
2008-12-22 16:07 ` Kainan Cha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox