static void tcx_init(target_phys_addr_t addr, int vram_size, int width,

                     int height, int depth)

{

    DeviceState *dev;

    SysBusDevice *s;



    dev = qdev_create(NULL, "SUNW,tcx");

    qdev_prop_set_taddr(dev, "addr", addr);

    qdev_prop_set_uint32(dev, "vram_size", vram_size);

    qdev_prop_set_uint16(dev, "width", width);

    qdev_prop_set_uint16(dev, "height", height);

    qdev_prop_set_uint16(dev, "depth", depth);

    qdev_init(dev);

    s = sysbus_from_qdev(dev);

    /* 8-bit plane */

    sysbus_mmio_map(s, 0, addr + 0x00800000ULL);

    /* DAC */

    sysbus_mmio_map(s, 1, addr + 0x00200000ULL);

    /* TEC (dummy) */

    sysbus_mmio_map(s, 2, addr + 0x00700000ULL);

    /* THC 24 bit: NetBSD writes here even with 8-bit display: dummy */

    sysbus_mmio_map(s, 3, addr + 0x00301000ULL);

    if (depth == 24) {

        /* 24-bit plane */

        sysbus_mmio_map(s, 4, addr + 0x02000000ULL);

        /* Control plane */

        sysbus_mmio_map(s, 5, addr + 0x0a000000ULL);

    } else {

        /* THC 8 bit (dummy) */

        sysbus_mmio_map(s, 4, addr + 0x00300000ULL);

    }

}

static void tcx_init(target_phys_addr_t addr, int vram_size, int width,

                     int height, int depth)

{

    DeviceState *dev;

    SysBusDevice *s;



    dev = qdev_create(NULL, "SUNW,tcx");

    qdev_prop_set_taddr(dev, "addr", addr);

    qdev_prop_set_uint32(dev, "vram_size", vram_size);

    qdev_prop_set_uint16(dev, "width", width);

    qdev_prop_set_uint16(dev, "height", height);

    qdev_prop_set_uint16(dev, "depth", depth);

    qdev_init(dev);

    s = sysbus_from_qdev(dev);

    

    sysbus_mmio_map(s, 0, addr + 0x00800000ULL);

    

    sysbus_mmio_map(s, 1, addr + 0x00200000ULL);

    

    sysbus_mmio_map(s, 2, addr + 0x00700000ULL);

    

    sysbus_mmio_map(s, 3, addr + 0x00301000ULL);

    if (depth == 24) {

        

        sysbus_mmio_map(s, 4, addr + 0x02000000ULL);

        

        sysbus_mmio_map(s, 5, addr + 0x0a000000ULL);

    } else {

        

        sysbus_mmio_map(s, 4, addr + 0x00300000ULL);

    }

}

    qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);     qdev_init(dev);
static void FUNC_0(target_phys_addr_t VAR_0, int VAR_1, int VAR_2,

                     int VAR_3, int VAR_4)

{

    DeviceState *dev;

    SysBusDevice *s;



    dev = qdev_create(NULL, "SUNW,tcx");

    qdev_prop_set_taddr(dev, "VAR_0", VAR_0);

    qdev_prop_set_uint32(dev, "VAR_1", VAR_1);

    qdev_prop_set_uint16(dev, "VAR_2", VAR_2);

    qdev_prop_set_uint16(dev, "VAR_3", VAR_3);

    qdev_prop_set_uint16(dev, "VAR_4", VAR_4);

    qdev_init(dev);

    s = sysbus_from_qdev(dev);

    

    sysbus_mmio_map(s, 0, VAR_0 + 0x00800000ULL);

    

    sysbus_mmio_map(s, 1, VAR_0 + 0x00200000ULL);

    

    sysbus_mmio_map(s, 2, VAR_0 + 0x00700000ULL);

    

    sysbus_mmio_map(s, 3, VAR_0 + 0x00301000ULL);

    if (VAR_4 == 24) {

        

        sysbus_mmio_map(s, 4, VAR_0 + 0x02000000ULL);

        

        sysbus_mmio_map(s, 5, VAR_0 + 0x0a000000ULL);

    } else {

        

        sysbus_mmio_map(s, 4, VAR_0 + 0x00300000ULL);

    }

}

static void FUNC_0(target_phys_addr_t VAR_0, int VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{ DeviceState *dev; SysBusDevice *s; dev = qdev_create(NULL, "SUNW,tcx"); qdev_prop_set_taddr(dev, "VAR_0", VAR_0); qdev_prop_set_uint32(dev, "VAR_1", VAR_1); qdev_prop_set_uint16(dev, "VAR_2", VAR_2); qdev_prop_set_uint16(dev, "VAR_3", VAR_3); qdev_prop_set_uint16(dev, "VAR_4", VAR_4); qdev_init(dev); s = sysbus_from_qdev(dev); sysbus_mmio_map(s, 0, VAR_0 + 0x00800000ULL); sysbus_mmio_map(s, 1, VAR_0 + 0x00200000ULL); sysbus_mmio_map(s, 2, VAR_0 + 0x00700000ULL); sysbus_mmio_map(s, 3, VAR_0 + 0x00301000ULL); if (VAR_4 == 24) { sysbus_mmio_map(s, 4, VAR_0 + 0x02000000ULL); sysbus_mmio_map(s, 5, VAR_0 + 0x0a000000ULL); } else { sysbus_mmio_map(s, 4, VAR_0 + 0x00300000ULL); } }