|
From: | Jean-Christophe DUBOIS |
Subject: | Re: [Qemu-devel] [PATCH v2 4/4] Add qtest support for i.MX I2C device emulation. |
Date: | Sat, 04 May 2013 21:02:04 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 |
On 05/04/2013 06:53 PM, Andreas Färber 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 = 0x00, + IMX_I2C_IFDR = 0x04, + IMX_I2C_I2CR = 0x08, + IMX_I2C_I2SR = 0x0c, + IMX_I2C_I2DR = 0x10, +}; + +enum IMXI2CCRBits { + IMX_I2C_I2CR_IEN = 1 << 7, + IMX_I2C_I2CR_IIEN = 1 << 6, + IMX_I2C_I2CR_MSTA = 1 << 5, + IMX_I2C_I2CR_MTX = 1 << 4, + IMX_I2C_I2CR_TXAK = 1 << 3, + IMX_I2C_I2CR_RSTA = 1 << 2, +}; + +enum IMXI2CSRBits { + IMX_I2C_I2SR_ICF = 1 << 7, + IMX_I2C_I2SR_IAAF = 1 << 6, + IMX_I2C_I2SR_IBB = 1 << 5, + IMX_I2C_I2SR_IAL = 1 << 4, + IMX_I2C_I2SR_SRW = 1 << 2, + IMX_I2C_I2SR_IIF = 1 << 1, + IMX_I2C_I2SR_RXAK = 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
[Prev in Thread] | Current Thread | [Next in Thread] |