aboutsummaryrefslogtreecommitdiff
path: root/hw/riscv
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2021-08-30 15:35:15 +1000
committerAlistair Francis <alistair.francis@wdc.com>2021-09-21 07:56:49 +1000
commit57a3a6226529e60ef4eb5e11b577f2e532a72acc (patch)
tree26b5f8a9f08a1ea63b22635e2a0c44e0414293f4 /hw/riscv
parentf436ecc3156dea7edce97e7c247e3667203f5c8b (diff)
downloadqemu-57a3a6226529e60ef4eb5e11b577f2e532a72acc.zip
qemu-57a3a6226529e60ef4eb5e11b577f2e532a72acc.tar.gz
qemu-57a3a6226529e60ef4eb5e11b577f2e532a72acc.tar.bz2
hw/intc: ibex_timer: Convert the timer to use RISC-V CPU GPIO lines
Instead of using riscv_cpu_update_mip() let's instead use the new RISC-V CPU GPIO lines to set the timer MIP bits. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 84d5b1d5783d2e79eee69a2f7ac480cc0c070db3.1630301632.git.alistair.francis@wdc.com
Diffstat (limited to 'hw/riscv')
-rw-r--r--hw/riscv/opentitan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index 048aced..f7cfcf1 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -183,6 +183,9 @@ static void lowrisc_ibex_soc_realize(DeviceState *dev_soc, Error **errp)
sysbus_connect_irq(SYS_BUS_DEVICE(&s->timer),
0, qdev_get_gpio_in(DEVICE(&s->plic),
IBEX_TIMER_TIMEREXPIRED0_0));
+ qdev_connect_gpio_out(DEVICE(&s->timer), 0,
+ qdev_get_gpio_in(DEVICE(qemu_get_cpu(0)),
+ IRQ_M_TIMER));
create_unimplemented_device("riscv.lowrisc.ibex.gpio",
memmap[IBEX_DEV_GPIO].base, memmap[IBEX_DEV_GPIO].size);