static void lance_instance_init(Object *obj) { SysBusPCNetState *d = SYSBUS_PCNET(obj); PCNetState *s = &d->state; device_add_bootindex_property(obj, &s->conf.bootindex, "bootindex", "/ethernet-phy@0", DEVICE(obj), NULL); }
static int lance_init(SysBusDevice *sbd) { DeviceState *dev = DEVICE(sbd); SysBusPCNetState *d = SYSBUS_PCNET(dev); PCNetState *s = &d->state; memory_region_init_io(&s->mmio, OBJECT(d), &lance_mem_ops, d, "lance-mmio", 4); qdev_init_gpio_in(dev, parent_lance_reset, 1); sysbus_init_mmio(sbd, &s->mmio); sysbus_init_irq(sbd, &s->irq); s->phys_mem_read = ledma_memory_read; s->phys_mem_write = ledma_memory_write; return pcnet_common_init(dev, s, &net_lance_info); }
static void lance_reset(DeviceState *dev) { SysBusPCNetState *d = SYSBUS_PCNET(dev); pcnet_h_reset(&d->state); }