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

Alastair D'Silva alastair at au1.ibm.com
Thu Oct 27 15:29:34 AEDT 2016


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.

-- 
Alastair D'Silva
Open Source Developer
Linux Technology Centre, IBM Australia
mob: 0423 762 819



More information about the openbmc mailing list