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 | 6f93e3ec6d40c1406389cdb83ffb55ac18fd9744 (patch) | |
tree | 2680d9691524f56bbaaf8bde86d4a733305bd5bc /hw/sun4m.c | |
parent | 190deb7857e853ff0f3668373c105d0c41228c5b (diff) | |
download | qemu-6f93e3ec6d40c1406389cdb83ffb55ac18fd9744.tar.gz qemu-6f93e3ec6d40c1406389cdb83ffb55ac18fd9744.tar.bz2 qemu-6f93e3ec6d40c1406389cdb83ffb55ac18fd9744.zip |
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]); |