mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
hw/arm/fsl-imx31: Wire up watchdog
With this patch, the watchdog on i.MX31 emulations is fully operational. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20200517162135.110364-5-linux@roeck-us.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
4f0aff00f9
commit
b9e521dda3
3 changed files with 11 additions and 0 deletions
|
@ -63,6 +63,8 @@ static void fsl_imx31_init(Object *obj)
|
|||
sysbus_init_child_obj(obj, "gpio[*]", &s->gpio[i], sizeof(s->gpio[i]),
|
||||
TYPE_IMX_GPIO);
|
||||
}
|
||||
|
||||
sysbus_init_child_obj(obj, "wdt", &s->wdt, sizeof(s->wdt), TYPE_IMX2_WDT);
|
||||
}
|
||||
|
||||
static void fsl_imx31_realize(DeviceState *dev, Error **errp)
|
||||
|
@ -205,6 +207,10 @@ static void fsl_imx31_realize(DeviceState *dev, Error **errp)
|
|||
gpio_table[i].irq));
|
||||
}
|
||||
|
||||
/* Watchdog */
|
||||
object_property_set_bool(OBJECT(&s->wdt), true, "realized", &error_abort);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt), 0, FSL_IMX31_WDT_ADDR);
|
||||
|
||||
/* On a real system, the first 16k is a `secure boot rom' */
|
||||
memory_region_init_rom(&s->secure_rom, OBJECT(dev), "imx31.secure_rom",
|
||||
FSL_IMX31_SECURE_ROM_SIZE, &err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue