[PATCH 3/3] Add a unit test for RX8900 RTC (time functionality only)

Cédric Le Goater clg at kaod.org
Mon Oct 31 17:49:11 AEDT 2016


On 10/27/2016 06:29 AM, Alastair D'Silva wrote:
> On Thu, 2016-10-27 at 14:51 +1030, Joel Stanley wrote:
>>> -         * This I2C device doesn't exist on the real board.
>>> +         * These I2C devices doesn't exist on the real board.
>>>           * We add it here (only on qtest usage) to be able to do a
>>> bit
>>>           * of simple qtest. See "make check" for details.
>>>           */
>>> -        i2c_create_slave((I2CBus *)qdev_get_child_bus(DEVICE(&s-
>>>> soc.i2c[0]),
>>> -                                                      "i2c"),
>>> -                         "ds1338", 0x68);
>>> +        I2CBus *i2c = (I2CBus *)qdev_get_child_bus(DEVICE(&s-
>>>> soc.i2c[0]),
>>> +                "i2c");
>>> +        i2c_create_slave(i2c, "ds1338", 0x68);
>>> +        i2c_create_slave(i2c, "rx8900", 0x32);
>>
>> I'm not sure how upstream will take this.
>>
>> Is there a reason you didn't add them to an aspeed board instead?
>>
> 
> We are currently missing the *_i2c_create and the associated
> send/receive callbacks required to access the i2c bus from the test
> framework. The structure of aspeed_i2c.c was different enough from
> i2c_imx.c & i2c_omap.c that I need more familiarity with the code
> before I could implement it myself.

Could you extend libqos to have these routines ? or you can start an 
aspeed guest which would have the device with your patchset. take a 
look at the m25p80 test.  

Cheers,

C.


More information about the openbmc mailing list