static void xilinx_spips_realize(DeviceState *dev, Error **errp)

{

    XilinxSPIPS *s = XILINX_SPIPS(dev);

    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);

    XilinxSPIPSClass *xsc = XILINX_SPIPS_GET_CLASS(s);

    int i;



    DB_PRINT_L(0, "realized spips\n");



    s->spi = g_new(SSIBus *, s->num_busses);

    for (i = 0; i < s->num_busses; ++i) {

        char bus_name[16];

        snprintf(bus_name, 16, "spi%d", i);

        s->spi[i] = ssi_create_bus(dev, bus_name);

    }



    s->cs_lines = g_new0(qemu_irq, s->num_cs * s->num_busses);

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[0]);

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[1]);

    sysbus_init_irq(sbd, &s->irq);

    for (i = 0; i < s->num_cs * s->num_busses; ++i) {

        sysbus_init_irq(sbd, &s->cs_lines[i]);

    }



    memory_region_init_io(&s->iomem, OBJECT(s), xsc->reg_ops, s,

                          "spi", XLNX_SPIPS_R_MAX * 4);

    sysbus_init_mmio(sbd, &s->iomem);



    s->irqline = -1;



    fifo8_create(&s->rx_fifo, xsc->rx_fifo_size);

    fifo8_create(&s->tx_fifo, xsc->tx_fifo_size);

}

static void xilinx_spips_realize(DeviceState *dev, Error **errp)

{

    XilinxSPIPS *s = XILINX_SPIPS(dev);

    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);

    XilinxSPIPSClass *xsc = XILINX_SPIPS_GET_CLASS(s);

    int i;



    DB_PRINT_L(0, "realized spips\n");



    s->spi = g_new(SSIBus *, s->num_busses);

    for (i = 0; i < s->num_busses; ++i) {

        char bus_name[16];

        snprintf(bus_name, 16, "spi%d", i);

        s->spi[i] = ssi_create_bus(dev, bus_name);

    }



    s->cs_lines = g_new0(qemu_irq, s->num_cs * s->num_busses);

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[0]);

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[1]);

    sysbus_init_irq(sbd, &s->irq);

    for (i = 0; i < s->num_cs * s->num_busses; ++i) {

        sysbus_init_irq(sbd, &s->cs_lines[i]);

    }



    memory_region_init_io(&s->iomem, OBJECT(s), xsc->reg_ops, s,

                          "spi", XLNX_SPIPS_R_MAX * 4);

    sysbus_init_mmio(sbd, &s->iomem);



    s->irqline = -1;



    fifo8_create(&s->rx_fifo, xsc->rx_fifo_size);

    fifo8_create(&s->tx_fifo, xsc->tx_fifo_size);

}

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[0]);     ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[1]);
static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)

{

    XilinxSPIPS *s = XILINX_SPIPS(VAR_0);

    SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0);

    XilinxSPIPSClass *xsc = XILINX_SPIPS_GET_CLASS(s);

    int VAR_2;



    DB_PRINT_L(0, "realized spips\n");



    s->spi = g_new(SSIBus *, s->num_busses);

    for (VAR_2 = 0; VAR_2 < s->num_busses; ++VAR_2) {

        char bus_name[16];

        snprintf(bus_name, 16, "spi%d", VAR_2);

        s->spi[VAR_2] = ssi_create_bus(VAR_0, bus_name);

    }



    s->cs_lines = g_new0(qemu_irq, s->num_cs * s->num_busses);

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[0]);

    ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[1]);

    sysbus_init_irq(sbd, &s->irq);

    for (VAR_2 = 0; VAR_2 < s->num_cs * s->num_busses; ++VAR_2) {

        sysbus_init_irq(sbd, &s->cs_lines[VAR_2]);

    }



    memory_region_init_io(&s->iomem, OBJECT(s), xsc->reg_ops, s,

                          "spi", XLNX_SPIPS_R_MAX * 4);

    sysbus_init_mmio(sbd, &s->iomem);



    s->irqline = -1;



    fifo8_create(&s->rx_fifo, xsc->rx_fifo_size);

    fifo8_create(&s->tx_fifo, xsc->tx_fifo_size);

}

static void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{ XilinxSPIPS *s = XILINX_SPIPS(VAR_0); SysBusDevice *sbd = SYS_BUS_DEVICE(VAR_0); XilinxSPIPSClass *xsc = XILINX_SPIPS_GET_CLASS(s); int VAR_2; DB_PRINT_L(0, "realized spips\n"); s->spi = g_new(SSIBus *, s->num_busses); for (VAR_2 = 0; VAR_2 < s->num_busses; ++VAR_2) { char bus_name[16]; snprintf(bus_name, 16, "spi%d", VAR_2); s->spi[VAR_2] = ssi_create_bus(VAR_0, bus_name); } s->cs_lines = g_new0(qemu_irq, s->num_cs * s->num_busses); ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[0]); ssi_auto_connect_slaves(DEVICE(s), s->cs_lines, s->spi[1]); sysbus_init_irq(sbd, &s->irq); for (VAR_2 = 0; VAR_2 < s->num_cs * s->num_busses; ++VAR_2) { sysbus_init_irq(sbd, &s->cs_lines[VAR_2]); } memory_region_init_io(&s->iomem, OBJECT(s), xsc->reg_ops, s,
"spi", XLNX_SPIPS_R_MAX * 4); sysbus_init_mmio(sbd, &s->iomem); s->irqline = -1; fifo8_create(&s->rx_fifo, xsc->rx_fifo_size); fifo8_create(&s->tx_fifo, xsc->tx_fifo_size); }