Revision d986bd50 hw/eepro100.c
b/hw/eepro100.c | ||
---|---|---|
1350 | 1350 |
static void pci_map(PCIDevice * pci_dev, int region_num, |
1351 | 1351 |
uint32_t addr, uint32_t size, int type) |
1352 | 1352 |
{ |
1353 |
PCIEEPRO100State *d = (PCIEEPRO100State *) pci_dev;
|
|
1353 |
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
|
|
1354 | 1354 |
EEPRO100State *s = &d->eepro100; |
1355 | 1355 |
|
1356 | 1356 |
logout("region %d, addr=0x%08x, size=0x%08x, type=%d\n", |
... | ... | |
1424 | 1424 |
static void pci_mmio_map(PCIDevice * pci_dev, int region_num, |
1425 | 1425 |
uint32_t addr, uint32_t size, int type) |
1426 | 1426 |
{ |
1427 |
PCIEEPRO100State *d = (PCIEEPRO100State *) pci_dev;
|
|
1427 |
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
|
|
1428 | 1428 |
|
1429 | 1429 |
logout("region %d, addr=0x%08x, size=0x%08x, type=%d\n", |
1430 | 1430 |
region_num, addr, size, type); |
... | ... | |
1724 | 1724 |
|
1725 | 1725 |
static int pci_nic_uninit(PCIDevice *dev) |
1726 | 1726 |
{ |
1727 |
PCIEEPRO100State *d = (PCIEEPRO100State *) dev;
|
|
1727 |
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, dev);
|
|
1728 | 1728 |
EEPRO100State *s = &d->eepro100; |
1729 | 1729 |
|
1730 | 1730 |
cpu_unregister_io_memory(s->mmio_index); |
... | ... | |
1734 | 1734 |
|
1735 | 1735 |
static int nic_init(PCIDevice *pci_dev, uint32_t device) |
1736 | 1736 |
{ |
1737 |
PCIEEPRO100State *d = (PCIEEPRO100State *)pci_dev;
|
|
1737 |
PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
|
|
1738 | 1738 |
EEPRO100State *s; |
1739 | 1739 |
|
1740 | 1740 |
logout("\n"); |
Also available in: Unified diff