Revision ee6847d1 hw/pcnet.c
b/hw/pcnet.c | ||
---|---|---|
2128 | 2128 |
s->mmio_index = |
2129 | 2129 |
cpu_register_io_memory(lance_mem_read, lance_mem_write, d); |
2130 | 2130 |
|
2131 |
s->dma_opaque = qdev_get_prop_ptr(&dev->qdev, "dma"); |
|
2132 |
|
|
2133 | 2131 |
qdev_init_gpio_in(&dev->qdev, parent_lance_reset, 1); |
2134 | 2132 |
|
2135 | 2133 |
sysbus_init_mmio(dev, 4, s->mmio_index); |
... | ... | |
2141 | 2139 |
|
2142 | 2140 |
pcnet_common_init(&dev->qdev, s, lance_cleanup); |
2143 | 2141 |
} |
2142 |
|
|
2143 |
static SysBusDeviceInfo lance_info = { |
|
2144 |
.init = lance_init, |
|
2145 |
.qdev.name = "lance", |
|
2146 |
.qdev.size = sizeof(SysBusPCNetState), |
|
2147 |
.qdev.props = (Property[]) { |
|
2148 |
{ |
|
2149 |
.name = "dma", |
|
2150 |
.info = &qdev_prop_ptr, |
|
2151 |
.offset = offsetof(SysBusPCNetState, state.dma_opaque), |
|
2152 |
}, |
|
2153 |
{/* end of list */} |
|
2154 |
} |
|
2155 |
}; |
|
2156 |
|
|
2144 | 2157 |
#endif /* TARGET_SPARC */ |
2145 | 2158 |
|
2146 | 2159 |
static PCIDeviceInfo pcnet_info = { |
... | ... | |
2153 | 2166 |
{ |
2154 | 2167 |
pci_qdev_register(&pcnet_info); |
2155 | 2168 |
#if defined (TARGET_SPARC) && !defined(TARGET_SPARC64) |
2156 |
sysbus_register_dev("lance", sizeof(SysBusPCNetState), lance_init);
|
|
2169 |
sysbus_register_withprop(&lance_info);
|
|
2157 | 2170 |
#endif |
2158 | 2171 |
} |
2159 | 2172 |
|
Also available in: Unified diff