From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9wQS-0000mu-K4 for qemu-devel@nongnu.org; Mon, 06 Jun 2016 11:26:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9wQO-00017b-9l for qemu-devel@nongnu.org; Mon, 06 Jun 2016 11:26:48 -0400 Received: from 1.mo177.mail-out.ovh.net ([178.33.107.143]:41856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9wQO-00017I-2Y for qemu-devel@nongnu.org; Mon, 06 Jun 2016 11:26:44 -0400 Received: from player746.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id D323AFF9354 for ; Mon, 6 Jun 2016 17:26:42 +0200 (CEST) References: <1464704307-25178-1-git-send-email-clg@kaod.org> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <5755962E.6080406@kaod.org> Date: Mon, 6 Jun 2016 17:26:38 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] i2c: add aspeed i2c controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Andrew Jeffery On 06/06/2016 05:05 PM, Peter Maydell wrote: > On 31 May 2016 at 15:18, C=C3=A9dric Le Goater wrote: >> The Aspeed AST2400 integrates a set of 14 I2C/SMBus bus controllers >> directly connected to the APB bus. They can be programmed as master or >> slave but the propopsed model only supports the master mode. >> >> On the TODO list, we also have : >> >> - improve and harden the state machine. >> - bus recovery support (used by the Linux driver). >> - transfer mode state machine bits. this is not strictly necessary as >> it is mostly used for debug. The bus busy bit is deducted from the >> I2C core engine of qemu. >> - support of the pool buffer: 2048 bytes of internal SRAM (not used >> by the Linux driver). >> >> Signed-off-by: C=C3=A9dric Le Goater >> Reviewed-by: Andrew Jeffery >=20 >> +static inline uint64_t aspeed_i2c_bus_get_state(AspeedI2CBus *bus) >> +{ >> + return bus->cmd >> 19 & 0xF; >> +} >> + >> +static inline void aspeed_i2c_bus_set_state(AspeedI2CBus *bus, uint64= _t value) >> +{ >> + bus->cmd |=3D (value & 0xF) << 19; >> +} >=20 > These two functions are unused, which means this doesn't compile with c= lang: >=20 > /Users/pm215/src/qemu-for-merges/hw/i2c/aspeed_i2c.c:172:24: warning: > unused function 'aspeed_i2c_bus_get_state' [-Wunused-function] > static inline uint64_t aspeed_i2c_bus_get_state(AspeedI2CBus *bus) > ^ > /Users/pm215/src/qemu-for-merges/hw/i2c/aspeed_i2c.c:177:20: warning: > unused function 'aspeed_i2c_bus_set_state' [-Wunused-function] > static inline void aspeed_i2c_bus_set_state(AspeedI2CBus *bus, uint64_t= value) > ^ >=20 > I have removed them in the version of the patch I put into target-arm.n= ext. OK. That was for the state machine I did not do finally.=20 Thanks, C.=20 > thanks > -- PMM >=20