From: Peter Maydell <peter.maydell@linaro.org>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Alex Horn <alex.horn@cs.ox.ac.uk>,
qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH 1/2] omap_i2c: Clear SBD bit in STAT register on DATA read
Date: Thu, 13 Dec 2012 14:45:35 +0000 [thread overview]
Message-ID: <CAFEAcA8nWWQwK+s1cWTUtSCDrV9dSh_5WO58Wnt0ChC1RS2uXw@mail.gmail.com> (raw)
In-Reply-To: <1355293773-18361-2-git-send-email-andreas.faerber@web.de>
On 12 December 2012 06:29, Andreas Färber <andreas.faerber@web.de> wrote:
> After reading a single-byte I2C response such as the tmp105's response
> to 0x01 0x00, the SBD status bit would not get reset on next read, still
> indicating validity of only a single byte. Clear it on next word read.
This doesn't seem to correspond to what the OMAP1510 manual describes
as the condition for this bit to be zeroed:
"This bit is cleared to 0 by the core when the local host reads the
I2C_IV register if INTCODE is register access ready."
The manual also says for I2C_DATA:
"In case of an odd number of bytes received to read, the upper byte of
the last access always reads as 0x00. The local host must check the SBD
status bit in I2C_STAT register to flush this null byte."
...which to a naive reading implies that the high byte has
to be jammed to all-zeroes until I2C_STAT is read, but that
seems a little implausible.
(interestingly the SBD bit is always 0 for omap3 because the data
FIFO is 8 bits wide and so data is always read byte at at time)
-- PMM
next prev parent reply other threads:[~2012-12-13 14:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 6:29 [Qemu-devel] [PATCH 0/2] tmp105: qtest support Andreas Färber
2012-12-12 6:29 ` [Qemu-devel] [PATCH 1/2] omap_i2c: Clear SBD bit in STAT register on DATA read Andreas Färber
2012-12-13 14:45 ` Peter Maydell [this message]
2012-12-13 17:04 ` Andreas Färber
2012-12-13 17:10 ` Peter Maydell
2012-12-12 6:29 ` [Qemu-devel] [PATCH 2/2] tests: Add tmp105 unit test Andreas Färber
2012-12-12 14:44 ` Alex Horn
2012-12-15 17:44 ` Andreas Färber
2012-12-12 19:43 ` Blue Swirl
2012-12-12 23:17 ` Andreas Färber
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=CAFEAcA8nWWQwK+s1cWTUtSCDrV9dSh_5WO58Wnt0ChC1RS2uXw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.horn@cs.ox.ac.uk \
--cc=andreas.faerber@web.de \
--cc=anthony@codemonkey.ws \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.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).