diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2009-08-08 21:43:12 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2009-08-08 21:43:12 +0000 |
commit | 74ff8d90a11bdcbfabf0da10e4556cf139c096f7 (patch) | |
tree | 0c30e841ad6e4692c026e2f3ac824bca0b3cfb09 /hw/sparc32_dma.c | |
parent | d95d8f1c11132355d72f23f9500fd9229f5f3c1f (diff) |
Sparc32: move sparc32_dma init to sun4m.c
Also connect ESP and Lance reset signals to DMA.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sparc32_dma.c')
-rw-r--r-- | hw/sparc32_dma.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c index 7633905af8..800d5bcfd4 100644 --- a/hw/sparc32_dma.c +++ b/hw/sparc32_dma.c @@ -244,27 +244,6 @@ static int dma_load(QEMUFile *f, void *opaque, int version_id) return 0; } -void *sparc32_dma_init(target_phys_addr_t daddr, qemu_irq parent_irq, - void *iommu, qemu_irq *dev_irq, qemu_irq **reset) -{ - DeviceState *dev; - SysBusDevice *s; - DMAState *d; - - dev = qdev_create(NULL, "sparc32_dma"); - qdev_prop_set_ptr(dev, "iommu_opaque", iommu); - qdev_init(dev); - s = sysbus_from_qdev(dev); - sysbus_connect_irq(s, 0, parent_irq); - *dev_irq = qdev_get_gpio_in(dev, 0); - sysbus_mmio_map(s, 0, daddr); - - d = FROM_SYSBUS(DMAState, s); - *reset = &d->dev_reset; - - return d; -} - static void sparc32_dma_init1(SysBusDevice *dev) { DMAState *s = FROM_SYSBUS(DMAState, dev); @@ -279,6 +258,7 @@ static void sparc32_dma_init1(SysBusDevice *dev) qemu_register_reset(dma_reset, s); qdev_init_gpio_in(&dev->qdev, dma_set_irq, 1); + qdev_init_gpio_out(&dev->qdev, &s->dev_reset, 1); } static SysBusDeviceInfo sparc32_dma_info = { |