From e32cba29beb079165ddcd01a45242a8ac010319c Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Tue, 21 Jul 2009 19:57:32 +0000 Subject: Sparc32: convert Sun4c interrupt controller to qdev Signed-off-by: Blue Swirl --- hw/sun4m.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'hw/sun4m.c') diff --git a/hw/sun4m.c b/hw/sun4m.c index 1e240179bb..1e668fca1f 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -1502,13 +1502,15 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size, { CPUState *env; void *iommu, *espdma, *ledma, *nvram; - qemu_irq *cpu_irqs, *slavio_irq, espdma_irq, ledma_irq; + qemu_irq *cpu_irqs, slavio_irq[8], espdma_irq, ledma_irq; qemu_irq *esp_reset, *le_reset; qemu_irq fdc_tc; unsigned long kernel_size; BlockDriverState *fd[MAX_FD]; int drive_index; void *fw_cfg; + DeviceState *dev; + unsigned int i; /* init CPU */ if (!cpu_model) @@ -1521,8 +1523,11 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size, prom_init(hwdef->slavio_base, bios_name); - slavio_intctl = sun4c_intctl_init(hwdef->intctl_base, - &slavio_irq, cpu_irqs); + dev = sun4c_intctl_init(hwdef->intctl_base, cpu_irqs); + + for (i = 0; i < 8; i++) { + slavio_irq[i] = qdev_get_gpio_in(dev, i); + } iommu = iommu_init(hwdef->iommu_base, hwdef->iommu_version, slavio_irq[hwdef->me_irq]); -- cgit v1.2.3