[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] i2c: add aspeed i2c controller
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PATCH v2] i2c: add aspeed i2c controller |
Date: |
Mon, 6 Jun 2016 17:26:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 |
On 06/06/2016 05:05 PM, Peter Maydell wrote:
> On 31 May 2016 at 15:18, Cédric Le Goater <address@hidden> 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 <address@hidden>
>> Reviewed-by: Andrew Jeffery <address@hidden>
>
>> +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
>