Received: from eggs.gnu.org ([208.118.235.92]:42937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYhik-0005mk-Ip for qemu-devel@nongnu.org; Sat, 04 May 2013 15:02:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYhij-0007yF-NT for qemu-devel@nongnu.org; Sat, 04 May 2013 15:02:10 -0400 Received: from zose-mta11.web4all.fr ([178.33.204.87]:56067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYhij-0007y2-I0 for qemu-devel@nongnu.org; Sat, 04 May 2013 15:02:09 -0400 Message-ID: <51855B2C.4040608@tribudubois.net> Date: Sat, 04 May 2013 21:02:04 +0200 From: Jean-Christophe DUBOIS MIME-Version: 1.0 References: <51853D15.7040409@suse.de> In-Reply-To: <51853D15.7040409@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 4/4] Add qtest support for i.MX I2C device emulation. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, peter.chubb@nicta.com.au, qemu-devel@nongnu.org On 05/04/2013 06:53 PM, Andreas F=E4rber wrote: > Am 04.05.2013 16:09, schrieb Jean-Christophe DUBOIS: > >> +#include "qemu/bswap.h" > Is this one needed? No, I will remove it. >> +enum IMXI2CRegisters { >> + IMX_I2C_IADR =3D 0x00, >> + IMX_I2C_IFDR =3D 0x04, >> + IMX_I2C_I2CR =3D 0x08, >> + IMX_I2C_I2SR =3D 0x0c, >> + IMX_I2C_I2DR =3D 0x10, >> +}; >> + >> +enum IMXI2CCRBits { >> + IMX_I2C_I2CR_IEN =3D 1 << 7, >> + IMX_I2C_I2CR_IIEN =3D 1 << 6, >> + IMX_I2C_I2CR_MSTA =3D 1 << 5, >> + IMX_I2C_I2CR_MTX =3D 1 << 4, >> + IMX_I2C_I2CR_TXAK =3D 1 << 3, >> + IMX_I2C_I2CR_RSTA =3D 1 << 2, >> +}; >> + >> +enum IMXI2CSRBits { >> + IMX_I2C_I2SR_ICF =3D 1 << 7, >> + IMX_I2C_I2SR_IAAF =3D 1 << 6, >> + IMX_I2C_I2SR_IBB =3D 1 << 5, >> + IMX_I2C_I2SR_IAL =3D 1 << 4, >> + IMX_I2C_I2SR_SRW =3D 1 << 2, >> + IMX_I2C_I2SR_IIF =3D 1 << 1, >> + IMX_I2C_I2SR_RXAK =3D 1 << 0, >> +}; >> + >> +enum IMXI2CDirection { >> + IMX_I2C_READ, >> + IMX_I2C_WRITE, >> +}; > libqos/i2c-omap.c was a driver for an unmaintained legacy device. > i.MX I2C however is being added by you in 2/4, so it would be better to > put these constants in a header in 2/4 for reuse here (i2c/imx_regs.h?)= . > > Otherwise looking fine! Will do in next version. Meanwhile, other comments on the series are welcome. JC > > Regards, > Andreas >