diff --git a/hw/opentitan/ot_aon_timer.c b/hw/opentitan/ot_aon_timer.c index cd89c418a8e8..75abf5cad9c5 100644 --- a/hw/opentitan/ot_aon_timer.c +++ b/hw/opentitan/ot_aon_timer.c @@ -497,7 +497,7 @@ static void ot_aon_timer_init(Object *obj) ibex_qdev_init_irq(obj, &s->alert, OPENTITAN_DEVICE_ALERT); memory_region_init_io(&s->mmio, obj, &ot_aon_timer_ops, s, - TYPE_OT_AON_TIMER, 0x400u); + TYPE_OT_AON_TIMER, REGS_SIZE); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); s->wkup_timer = diff --git a/hw/opentitan/ot_timer.c b/hw/opentitan/ot_timer.c index 42e8d413dc69..72c4c06b901b 100644 --- a/hw/opentitan/ot_timer.c +++ b/hw/opentitan/ot_timer.c @@ -367,7 +367,7 @@ static void ot_timer_init(Object *obj) ibex_qdev_init_irq(obj, &s->alert, OPENTITAN_DEVICE_ALERT); memory_region_init_io(&s->mmio, obj, &ot_timer_ops, s, TYPE_OT_TIMER, - 0x400u); + REGS_SIZE); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL_RT, &ot_timer_cb, s); diff --git a/hw/opentitan/ot_uart.c b/hw/opentitan/ot_uart.c index 5b026eeefda6..f2f881ba1eab 100644 --- a/hw/opentitan/ot_uart.c +++ b/hw/opentitan/ot_uart.c @@ -599,7 +599,7 @@ static void ot_uart_init(Object *obj) } memory_region_init_io(&s->mmio, obj, &ot_uart_ops, s, TYPE_OT_UART, - REGS_COUNT * sizeof(uint32_t)); + REGS_SIZE); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); }