diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-07-21 19:57:32 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-07-21 19:57:32 +0000 |
commit | e32cba29beb079165ddcd01a45242a8ac010319c (patch) | |
tree | 2680d9691524f56bbaaf8bde86d4a733305bd5bc /hw/sun4m.c | |
parent | 7fc067350cb5a9218c607fce0a29af612ba48324 (diff) |
Sparc32: convert Sun4c interrupt controller to qdev
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r-- | hw/sun4m.c | 11 |
1 files changed, 8 insertions, 3 deletions
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]); |