[PATCH qemu 29/38] aspeed: add a rtc device on I2C bus 0

Cédric Le Goater clg at kaod.org
Wed Nov 23 04:00:03 AEDT 2016


On 11/18/2016 03:22 PM, Cédric Le Goater wrote:
> The palmetto platform has a ds3231 RTC device but not qemu. Let's use
> a ds1338 instead which provides enough basic RTC features. Only alarms
> will be missing

This belongs to the machine level also and it is conflicting with 
Alastair's patchset. We will have to synchronize our work.

C.


> Signed-off-by: Cédric Le Goater <clg at kaod.org>
> ---
>  hw/arm/aspeed_soc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
> index 2aa15d90cc31..d2bc0ba2070d 100644
> --- a/hw/arm/aspeed_soc.c
> +++ b/hw/arm/aspeed_soc.c
> @@ -276,6 +276,10 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
>      object_property_set_int(OBJECT(dev), 20000, "temperature2", &err);
>      object_property_set_int(OBJECT(dev), 110000, "temperature3", &err);
>  
> +    /* The palmetto platform expects a ds3231 RTC but a ds1338 is
> +     * enough to provide basic RTC features. Alarms will be missing */
> +    i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&s->i2c), 0), "ds1338", 0x68);
> +
>      /* FMC */
>      fmc_num_cs = aspeed_fmc_get_cs(s, &err);
>      if (err) {
> 



More information about the openbmc mailing list