public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: balbi@ti.com
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Tony Lindgren <tony@atomide.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-i2c@vger.kernel.org, Kevin Hilman <khilman@linaro.org>
Subject: Re: [PATCH 3/5] i2c: omap: handle all irqs befor unblocking omap_i2c_xfer_msg()
Date: Wed, 19 Jun 2013 21:43:04 +0300	[thread overview]
Message-ID: <51C1FBB8.4090600@ti.com> (raw)
In-Reply-To: <20130607190543.GD15295@arwen.pp.htv.fi>

Hi Felipe,
On 06/07/2013 10:05 PM, Felipe Balbi wrote:
> Hi,
>
> On Fri, Jun 07, 2013 at 09:46:06PM +0300, Grygorii Strashko wrote:
>> ARDY|NACK and ARDY|AL are set together in OMAP_I2C_STAT_REG, which will be
> Have you seen that happen ever ? AL is Arbitration Lost, we never put
> OMAP in a multi-master environment before.
This is an example from real life:
[    0.271942] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 400 kHz
[    1.283416] omap_i2c omap_i2c.1: timeout waiting for bus ready
[    1.300109] OMAP_I2C DEBUG: stat=1001
[    1.300140] omap_i2c omap_i2c.1: Arbitration lost
[    1.300140] OMAP_I2C DEBUG: IE=601F
[    1.300140] OMAP_I2C DEBUG: STAT=1000
[    1.300170] OMAP_I2C DEBUG: IV=636F
[    1.300170] OMAP_I2C DEBUG: WE=636F
[    1.300170] OMAP_I2C DEBUG: SYSS=1
[    1.300170] OMAP_I2C DEBUG: BUF=707
[    1.300201] OMAP_I2C DEBUG: CNT=1
[    1.300201] OMAP_I2C DEBUG: DATA=1
[    1.300201] OMAP_I2C DEBUG: SYSC=215
[    1.300201] OMAP_I2C DEBUG: CON=8200
[    1.300231] OMAP_I2C DEBUG: OA=0
[    1.300231] OMAP_I2C DEBUG: SA=49
[    1.300231] OMAP_I2C DEBUG: PSC=9
[    1.300262] OMAP_I2C DEBUG: SCLL=9
[    1.300262] OMAP_I2C DEBUG: SCLH=3
[    1.300262] OMAP_I2C DEBUG: SYSTEST=1E0
[    1.300262] OMAP_I2C DEBUG: BUFSTAT=4000

and my headache now :..(
>
> ARDY | NACK I also find it a bit hard for those two to happen together
> since ARDY will be set when you can change controller's register
> *again*, mening that a transfer has completed.
There are examples:
[    3.544952] omap_i2c 48060000.i2c: IRQ (ISR = 0x0006)

[   25.574523] omap_i2c 48350000.i2c: IRQ (ISR = 0x0014)
[   25.579925] omap_i2c 48350000.i2c: IRQ (ISR = 0x0012)

to see it - enable debug output in omap_i2c_isr_thread:
         dev_dbg(dev->dev, "IRQ (ISR = 0x%04x)\n", stat);

>
> Also, we need to follow what the programming model says. And, I don't
> have docs with me right now, but IIRC it tells us to bail out if any of
> the error conditions are met.
>
yep, but first of all - all IRQs need to be acked before exit.

Sorry, for delayed reply - I've had problems with my e-mail.

- grygorii

  reply	other threads:[~2013-06-19 18:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 18:46 [PATCH 0/5] v3.10-rc4: fix OMAP4 boot failure if CONFIG_SENSORS_LM75=y Grygorii Strashko
2013-06-07 18:46 ` [PATCH 1/5] i2c: omap: fix spurious IRQs: disable/enable IRQ at INTC when idle Grygorii Strashko
     [not found]   ` <1370630768-4077-2-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2013-06-07 20:51     ` Kevin Hilman
2013-06-19 18:35       ` Grygorii Strashko
     [not found]         ` <51C1F9FA.9000502-l0cyMroinI0@public.gmane.org>
2013-06-19 19:31           ` Felipe Balbi
     [not found]             ` <20130619193111.GD4779-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2013-06-19 20:01               ` Kevin Hilman
     [not found]                 ` <878v257tuv.fsf-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-06-19 20:56                   ` Felipe Balbi
2013-06-07 18:46 ` [PATCH 2/5] i2c: omap: add runtime check in isr to be sure that i2c is enabled Grygorii Strashko
     [not found]   ` <1370630768-4077-3-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2013-06-07 19:02     ` Felipe Balbi
2013-06-19 18:42       ` Grygorii Strashko
2013-06-19 19:39         ` Felipe Balbi
2013-06-07 18:46 ` [PATCH 3/5] i2c: omap: handle all irqs befor unblocking omap_i2c_xfer_msg() Grygorii Strashko
2013-06-07 19:05   ` Felipe Balbi
2013-06-19 18:43     ` Grygorii Strashko [this message]
2013-06-19 19:44       ` Felipe Balbi
2013-06-07 18:46 ` [PATCH 4/5] i2c: omap: query STP always when NACK is received Grygorii Strashko
     [not found]   ` <1370630768-4077-5-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2013-06-07 19:07     ` Felipe Balbi
2013-06-07 18:46 ` [PATCH 5/5] i2c: omap: remove omap_i2c_isr() hw irq handler Grygorii Strashko
     [not found]   ` <1370630768-4077-6-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2013-06-07 19:07     ` Felipe Balbi
2013-06-19 18:43       ` Grygorii Strashko
     [not found]         ` <51C1FBC5.1030109-l0cyMroinI0@public.gmane.org>
2013-06-19 19:44           ` Felipe Balbi

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=51C1FBB8.4090600@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=balbi@ti.com \
    --cc=khilman@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=wsa@the-dreams.de \
    /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