static void i82378_init(DeviceState *dev, I82378State *s)

{

    ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(dev, "isa.0"));

    ISADevice *pit;

    qemu_irq *out0_irq;



    /* This device has:

       2 82C59 (irq)

       1 82C54 (pit)

       2 82C37 (dma)

       NMI

       Utility Bus Support Registers



       All devices accept byte access only, except timer

     */



    qdev_init_gpio_out(dev, s->out, 2);

    qdev_init_gpio_in(dev, i82378_request_pic_irq, 16);



    /* Workaround the fact that i8259 is not qdev'ified... */

    out0_irq = qemu_allocate_irqs(i82378_request_out0_irq, s, 1);



    /* 2 82C59 (irq) */

    s->i8259 = i8259_init(isabus, *out0_irq);

    isa_bus_irqs(isabus, s->i8259);



    /* 1 82C54 (pit) */

    pit = pit_init(isabus, 0x40, 0, NULL);



    /* speaker */

    pcspk_init(isabus, pit);



    /* 2 82C37 (dma) */

    DMA_init(1, &s->out[1]);

    isa_create_simple(isabus, "i82374");



    /* timer */

    isa_create_simple(isabus, "mc146818rtc");

}

static void i82378_init(DeviceState *dev, I82378State *s)

{

    ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(dev, "isa.0"));

    ISADevice *pit;

    qemu_irq *out0_irq;



    



















    qdev_init_gpio_out(dev, s->out, 2);

    qdev_init_gpio_in(dev, i82378_request_pic_irq, 16);



    

    out0_irq = qemu_allocate_irqs(i82378_request_out0_irq, s, 1);



    

    s->i8259 = i8259_init(isabus, *out0_irq);

    isa_bus_irqs(isabus, s->i8259);



    

    pit = pit_init(isabus, 0x40, 0, NULL);



    

    pcspk_init(isabus, pit);



    

    DMA_init(1, &s->out[1]);

    isa_create_simple(isabus, "i82374");



    

    isa_create_simple(isabus, "mc146818rtc");

}

    DMA_init(1, &s->out[1]);     isa_create_simple(isabus, "i82374");
static void FUNC_0(DeviceState *VAR_0, I82378State *VAR_1)

{

    ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(VAR_0, "isa.0"));

    ISADevice *pit;

    qemu_irq *out0_irq;



    



















    qdev_init_gpio_out(VAR_0, VAR_1->out, 2);

    qdev_init_gpio_in(VAR_0, i82378_request_pic_irq, 16);



    

    out0_irq = qemu_allocate_irqs(i82378_request_out0_irq, VAR_1, 1);



    

    VAR_1->i8259 = i8259_init(isabus, *out0_irq);

    isa_bus_irqs(isabus, VAR_1->i8259);



    

    pit = pit_init(isabus, 0x40, 0, NULL);



    

    pcspk_init(isabus, pit);



    

    DMA_init(1, &VAR_1->out[1]);

    isa_create_simple(isabus, "i82374");



    

    isa_create_simple(isabus, "mc146818rtc");

}

static void FUNC_0(DeviceState *VAR_0, I82378State *VAR_1)
{ ISABus *isabus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(VAR_0, "isa.0")); ISADevice *pit; qemu_irq *out0_irq; qdev_init_gpio_out(VAR_0, VAR_1->out, 2); qdev_init_gpio_in(VAR_0, i82378_request_pic_irq, 16); out0_irq = qemu_allocate_irqs(i82378_request_out0_irq, VAR_1, 1); VAR_1->i8259 = i8259_init(isabus, *out0_irq); isa_bus_irqs(isabus, VAR_1->i8259); pit = pit_init(isabus, 0x40, 0, NULL); pcspk_init(isabus, pit); DMA_init(1, &VAR_1->out[1]); isa_create_simple(isabus, "i82374"); isa_create_simple(isabus, "mc146818rtc"); }