linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@embeddededge.com>
To: bart@ardistech.com
Cc: Embedded Linux PPC List <linuxppc-embedded@lists.linuxppc.org>,
	dmalek@jlc.net
Subject: Re: MPC823: i2c-algo-8xx read interrupt?
Date: Fri, 08 Feb 2002 12:04:50 -0500	[thread overview]
Message-ID: <3C640532.5000708@embeddededge.com> (raw)
In-Reply-To: 3C63EC39.ACEECA08@ardistech.com


bart@ardistech.com wrote:


> When testing with i2c reading an eeprom on a MPC823e I get the message "IIC
> read; complete but rbuf empty".

What speed processor and what kernel?

> .... IMHO this is because the interrupt in the TX
> buffer is enabled intead of the the interrupt of the RX buffer. Is this a bug
> or is there a reason behind this?

The transmit and receive run concurrently on the I2C controller.  This is why
the transmit interrupt is always used.  Basically, on a read the transmit
buffer contains the device information to be written, and when the bus is
turned around the received data ends up in the receive buffer.  The transmit
provides all of the timing for the bus, which is why you need a "dummy"
transmit buffer that includes the length you want to receive.

A couple of things could be happening.  One is that the latency of clearing
the receive BD ready flag is longer than the interrupt processing overhead, but
I don't believe this is the case except that you say when you wait for the
receive interrupt it works OK.  Another is that the device isn't properly
terminating the I2C transfer (you tell it to transfer more bytes that the
dummy transmit clocks out), so you have to wait for a recieve time out to
close the BD.  If you wait for the receive interrupt, are there any errors
posted in the BD?  Does the receive buffer contain the proper data even when
the transmit complete occurs?

One of the reasons for using the transmit interrupt is when there are receive
errors, you still get an interrupt to go looking at the receive BD.  Maybe
the newer parts work differently and we need to accomodate this.

Thanks.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-02-08 17:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-08 15:18 MPC823: i2c-algo-8xx read interrupt? bart
2002-02-08 17:04 ` Dan Malek [this message]
     [not found]   ` <3C640C11.4080407@cambridgebroadband.com>
     [not found]     ` <3C6410F1.4000104@embeddededge.com>
2002-02-11 12:13       ` bart
     [not found]     ` <3C6776CC.634AB65D@ardistech.com>
2002-02-11 15:30       ` Dan Malek
2002-02-11 15:45         ` bart
2002-02-11 16:02           ` Dan Malek
2002-02-11 16:19             ` bart
  -- strict thread matches above, loose matches on Subject: below --
2002-02-11 15:49 Pergola, Michael

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=3C640532.5000708@embeddededge.com \
    --to=dan@embeddededge.com \
    --cc=bart@ardistech.com \
    --cc=dmalek@jlc.net \
    --cc=linuxppc-embedded@lists.linuxppc.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).