All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [Qemu-devel] [PATCH v2] i2c: add aspeed i2c controller
Date: Mon, 6 Jun 2016 17:26:38 +0200	[thread overview]
Message-ID: <5755962E.6080406@kaod.org> (raw)
In-Reply-To: <CAFEAcA9Lv_zo_BDetkyCyDQ8R_py7eWFkSzoS2RjLNponJgdrg@mail.gmail.com>

On 06/06/2016 05:05 PM, Peter Maydell wrote:
> On 31 May 2016 at 15:18, Cédric Le Goater <clg@kaod.org> 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édric Le Goater <clg@kaod.org>
>> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> 
>> +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 |= (value & 0xF) << 19;
>> +}
> 
> These two functions are unused, which means this doesn't compile with clang:
> 
> /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)
>                    ^
> 
> I have removed them in the version of the patch I put into target-arm.next.

OK. That was for the state machine I did not do finally. 

Thanks,

C. 


> thanks
> -- PMM
> 

      reply	other threads:[~2016-06-06 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 14:18 [Qemu-devel] [PATCH v2] i2c: add aspeed i2c controller Cédric Le Goater
2016-06-03 18:29 ` Peter Maydell
2016-06-06 15:05 ` Peter Maydell
2016-06-06 15:26   ` Cédric Le Goater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5755962E.6080406@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@aj.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.