[PATCH qemu 2/3] ast2400: add a rtc device on I2C bus 0
Joel Stanley
joel at jms.id.au
Wed May 18 23:33:25 AEST 2016
Hey Cedric,
On Wed, May 18, 2016 at 4:55 AM, Cédric Le Goater <clg at kaod.org> wrote:
> The palmetto platform has a ds3231 RTC device but not qemu. Let's use
> a ds1338 instead.
>
> The aspeed-bmc-opp-palmetto dts file needs to be changed consequently
> with :
>
> rtc at 68 {
> compatible = "dallas,ds1338";
> reg = <0x68>;
> };
Please see my comments for the tmp device.
How much does the register layout differ between the 1338 and the 3231?
Cheers,
Joel
>
> Signed-off-by: Cédric Le Goater <clg at kaod.org>
> ---
> hw/arm/ast2400.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/arm/ast2400.c b/hw/arm/ast2400.c
> index 4576e67cd483..41bfc74493fa 100644
> --- a/hw/arm/ast2400.c
> +++ b/hw/arm/ast2400.c
> @@ -159,6 +159,8 @@ static void ast2400_realize(DeviceState *dev, Error **errp)
> sysbus_mmio_map(SYS_BUS_DEVICE(&s->i2c), 0, AST2400_I2C_BASE);
> sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c), 0,
> qdev_get_gpio_in(DEVICE(&s->vic), 12));
> +
> + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&s->i2c), 0), "ds1338", 0x68);
> }
>
> static void ast2400_class_init(ObjectClass *oc, void *data)
> --
> 2.1.4
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
More information about the openbmc
mailing list