From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SALFy-0005ag-D5 for qemu-devel@nongnu.org; Wed, 21 Mar 2012 09:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SALFw-00071B-Fc for qemu-devel@nongnu.org; Wed, 21 Mar 2012 09:07:13 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:47966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SALFw-0006yI-9y for qemu-devel@nongnu.org; Wed, 21 Mar 2012 09:07:12 -0400 Received: from euspt2 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M18005Q3KFSU9@mailout2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 21 Mar 2012 13:07:04 +0000 (GMT) Received: from [106.109.8.162] by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M1800862KFR1K@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 21 Mar 2012 13:07:04 +0000 (GMT) Date: Wed, 21 Mar 2012 17:07:02 +0400 From: Igor Mitsyanko In-reply-to: Message-id: <4F69D276.5070905@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7BIT References: <1331796924-30669-1-git-send-email-i.mitsyanko@samsung.com> <1331796924-30669-2-git-send-email-i.mitsyanko@samsung.com> Subject: Re: [Qemu-devel] [PATCH V2 1/3] exynos4210: add Exynos4210 i2c implementation Reply-To: i.mitsyanko@samsung.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: e.voevodin@samsung.com, qemu-devel@nongnu.org, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com, afaerber@suse.de On 03/21/2012 03:55 PM, Peter Maydell wrote: > On 15 March 2012 07:35, Igor Mitsyanko wrote: >> Create 9 exynos4210 i2c interfaces. >> >> Signed-off-by: Igor Mitsyanko > > 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.mitsyanko@samsung.com