Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 May 2014 19:17:01 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Winston Smith <smith.winston.101@gmail.com>
Cc:        FreeBSD ARM <freebsd-arm@FreeBSD.org>
Subject:   Re: BBB/I2C: Using ioctl(I2CRDWR) warns: interrupt storm detected on "intr70:"
Message-ID:  <1398993421.22079.160.camel@revolution.hippie.lan>
In-Reply-To: <CADH-AwFGiuhcF_xUwQ4n1vkx9u3AJHVf=LMXKotw25NEutm0Vg@mail.gmail.com>
References:  <CADH-AwGbnqzGqbzpV9YMgdOciLpoy3fqxF1RtCmMPZtgc%2BAcXg@mail.gmail.com> <1398987601.22079.140.camel@revolution.hippie.lan> <CADH-AwFGiuhcF_xUwQ4n1vkx9u3AJHVf=LMXKotw25NEutm0Vg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2014-05-01 at 20:24 -0400, Winston Smith wrote:
> On Thu, May 1, 2014 at 7:40 PM, Ian Lepore <ian@freebsd.org> wrote:
> > Nope, that's not spurious, that's a real problem, usually it's a driver
> > bug.
> 
> It happens every time I run my `bbb_eeprom` utility -- how would I go
> about further debugging this?

Typically an interrupt storm will happen when a device driver's
interrupt handler fails to clear the condition that triggers the
interrupt, so it re-interrupts immediately, continuously.

After spending a few minutes looking at arm/ti/ti_i2c.c, there's
something that seems not-quite-right... the interrupt handler reads the
I2C_STAT register and clears any interrupt bits it finds there, but:

#define	I2C_REG_STAT		0x88

When I look in the AM335x reference manual that's listed as "I2C
interrupt status vector (legacy)."  There's another register at 0x28
described as "Per-event enabled interrupt status vector."  

I wonder if just changing the I2C_REG_STAT 0x28 (in ti_i2c.h) would fix
things?  If not, I'd recommend doing a more thorough version of what I
started doing... compare what you see in the manual with the code in
terms of register offsets and which bits are being checked and see if
there are other lurking glitches.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1398993421.22079.160.camel>