On 03/21/2012 03:55 PM, Peter Maydell wrote:
On 15 March 2012 07:35, Igor Mitsyanko<i.mitsya...@samsung.com> wrote:
Create 9 exynos4210 i2c interfaces.
Signed-off-by: Igor Mitsyanko<i.mitsya...@samsung.com>
Mostly this looks OK but I still find the i2c slave stuff
odd -- should the controller really register itself as
a slave on its own bus? Doesn't this mean that the
controller can effectively try to talk to itself? Does
the hardware let you do that?
Controller's master and slave i2c interfaces operate on the same single
bus, so I think it should. It can't talk to itself because controller's
two modes of operation are mutually exclusive. As I said, I took this
approach from pxa i2c implementation, the only difference is that they
register slave interface on a separate bus, but I think it's not right
to do that.
I suspect that what's happening here is that the hardware
lets you put the i2c controller into slave mode so some
other device on the bus can be a master. But QEMU's
i2c bus abstraction doesn't cover that use case at all...
Yes, I saw this statement in hw/i2c.h (and probably cpu i2c controller
will never be used as i2c slave device by anyone), but I think we still
have to implement devices exactly like they described in documentation.
--
Mitsyanko Igor
ASWG, Moscow R&D center, Samsung Electronics
email: i.mitsya...@samsung.com