[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing it |
Date: |
Thu, 8 Feb 2024 19:12:41 +0100 |
We should not wire IRQs on unrealized device.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/sparc/sun4m.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index e782c8ec7a..d52e6a7213 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -312,13 +312,11 @@ static void *sparc32_dma_init(hwaddr dma_base,
dma = qdev_new(TYPE_SPARC32_DMA);
espdma = SPARC32_ESPDMA_DEVICE(object_resolve_path_component(
OBJECT(dma), "espdma"));
- sysbus_connect_irq(SYS_BUS_DEVICE(espdma), 0, espdma_irq);
esp = SYSBUS_ESP(object_resolve_path_component(OBJECT(espdma), "esp"));
ledma = SPARC32_LEDMA_DEVICE(object_resolve_path_component(
OBJECT(dma), "ledma"));
- sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq);
lance = SYSBUS_PCNET(object_resolve_path_component(
OBJECT(ledma), "lance"));
@@ -332,6 +330,11 @@ static void *sparc32_dma_init(hwaddr dma_base,
}
sysbus_realize_and_unref(SYS_BUS_DEVICE(dma), &error_fatal);
+
+ sysbus_connect_irq(SYS_BUS_DEVICE(espdma), 0, espdma_irq);
+
+ sysbus_connect_irq(SYS_BUS_DEVICE(ledma), 0, ledma_irq);
+
sysbus_mmio_map(SYS_BUS_DEVICE(dma), 0, dma_base);
sysbus_mmio_map(SYS_BUS_DEVICE(esp), 0, esp_base);
--
2.41.0
- [PATCH v3 02/11] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h', (continued)
- [PATCH v3 02/11] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h', Philippe Mathieu-Daudé, 2024/02/08
- [PATCH v3 05/11] hw/ppc/prep: Realize ISA bridge before accessing it, Philippe Mathieu-Daudé, 2024/02/08
- [PATCH v3 06/11] hw/misc/macio: Realize IDE controller before accessing it, Philippe Mathieu-Daudé, 2024/02/08
- [PATCH v3 08/11] hw/sparc/sun4m: Realize DMA controller before accessing it,
Philippe Mathieu-Daudé <=
- [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it, Philippe Mathieu-Daudé, 2024/02/08
- [PATCH v3 09/11] hw/sparc/leon3: Realize GRLIB IRQ controller before accessing it, Philippe Mathieu-Daudé, 2024/02/08
- [PATCH v3 10/11] hw/sparc/leon3: Initialize GPIO before realizing CPU devices, Philippe Mathieu-Daudé, 2024/02/08