Revision c4c270e2 hw/eepro100.c
b/hw/eepro100.c | ||
---|---|---|
78 | 78 |
#define MAX_ETH_FRAME_SIZE 1514 |
79 | 79 |
|
80 | 80 |
/* This driver supports several different devices which are declared here. */ |
81 |
#define i82550 0x82550 |
|
81 | 82 |
#define i82551 0x82551 |
83 |
#define i82557A 0x82557a |
|
82 | 84 |
#define i82557B 0x82557b |
83 | 85 |
#define i82557C 0x82557c |
86 |
#define i82558A 0x82558a |
|
84 | 87 |
#define i82558B 0x82558b |
88 |
#define i82559A 0x82559a |
|
89 |
#define i82559B 0x82559b |
|
85 | 90 |
#define i82559C 0x82559c |
86 | 91 |
#define i82559ER 0x82559e |
87 | 92 |
#define i82562 0x82562 |
... | ... | |
1711 | 1716 |
eeprom93xx_free(s->eeprom); |
1712 | 1717 |
} |
1713 | 1718 |
|
1714 |
static int pci_nic_uninit(PCIDevice *dev) |
|
1719 |
static int pci_nic_uninit(PCIDevice *pci_dev)
|
|
1715 | 1720 |
{ |
1716 |
EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, dev); |
|
1721 |
EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
|
|
1717 | 1722 |
|
1718 | 1723 |
cpu_unregister_io_memory(s->mmio_index); |
1719 | 1724 |
|
... | ... | |
1768 | 1773 |
return 0; |
1769 | 1774 |
} |
1770 | 1775 |
|
1771 |
static int pci_i82551_init(PCIDevice *dev) |
|
1776 |
static int pci_i82550_init(PCIDevice *pci_dev) |
|
1777 |
{ |
|
1778 |
return nic_init(pci_dev, i82550); |
|
1779 |
} |
|
1780 |
|
|
1781 |
static int pci_i82551_init(PCIDevice *pci_dev) |
|
1782 |
{ |
|
1783 |
return nic_init(pci_dev, i82551); |
|
1784 |
} |
|
1785 |
|
|
1786 |
static int pci_i82557a_init(PCIDevice *pci_dev) |
|
1787 |
{ |
|
1788 |
return nic_init(pci_dev, i82557A); |
|
1789 |
} |
|
1790 |
|
|
1791 |
static int pci_i82557b_init(PCIDevice *pci_dev) |
|
1792 |
{ |
|
1793 |
return nic_init(pci_dev, i82557B); |
|
1794 |
} |
|
1795 |
|
|
1796 |
static int pci_i82557c_init(PCIDevice *pci_dev) |
|
1797 |
{ |
|
1798 |
return nic_init(pci_dev, i82557C); |
|
1799 |
} |
|
1800 |
|
|
1801 |
static int pci_i82558a_init(PCIDevice *pci_dev) |
|
1802 |
{ |
|
1803 |
return nic_init(pci_dev, i82558A); |
|
1804 |
} |
|
1805 |
|
|
1806 |
static int pci_i82558b_init(PCIDevice *pci_dev) |
|
1807 |
{ |
|
1808 |
return nic_init(pci_dev, i82558B); |
|
1809 |
} |
|
1810 |
|
|
1811 |
static int pci_i82559a_init(PCIDevice *pci_dev) |
|
1812 |
{ |
|
1813 |
return nic_init(pci_dev, i82559A); |
|
1814 |
} |
|
1815 |
|
|
1816 |
static int pci_i82559b_init(PCIDevice *pci_dev) |
|
1817 |
{ |
|
1818 |
return nic_init(pci_dev, i82559B); |
|
1819 |
} |
|
1820 |
|
|
1821 |
static int pci_i82559c_init(PCIDevice *pci_dev) |
|
1772 | 1822 |
{ |
1773 |
return nic_init(dev, i82551);
|
|
1823 |
return nic_init(pci_dev, i82559C);
|
|
1774 | 1824 |
} |
1775 | 1825 |
|
1776 |
static int pci_i82557b_init(PCIDevice *dev)
|
|
1826 |
static int pci_i82559er_init(PCIDevice *pci_dev)
|
|
1777 | 1827 |
{ |
1778 |
return nic_init(dev, i82557B);
|
|
1828 |
return nic_init(pci_dev, i82559ER);
|
|
1779 | 1829 |
} |
1780 | 1830 |
|
1781 |
static int pci_i82559er_init(PCIDevice *dev)
|
|
1831 |
static int pci_i82562_init(PCIDevice *pci_dev)
|
|
1782 | 1832 |
{ |
1783 |
return nic_init(dev, i82559ER);
|
|
1833 |
return nic_init(pci_dev, i82562);
|
|
1784 | 1834 |
} |
1785 | 1835 |
|
1786 | 1836 |
static PCIDeviceInfo eepro100_info[] = { |
1787 | 1837 |
{ |
1838 |
.qdev.name = "i82550", |
|
1839 |
.qdev.size = sizeof(EEPRO100State), |
|
1840 |
.init = pci_i82550_init, |
|
1841 |
},{ |
|
1788 | 1842 |
.qdev.name = "i82551", |
1789 | 1843 |
.qdev.size = sizeof(EEPRO100State), |
1790 | 1844 |
.init = pci_i82551_init, |
1791 | 1845 |
},{ |
1846 |
.qdev.name = "i82557a", |
|
1847 |
.qdev.size = sizeof(EEPRO100State), |
|
1848 |
.init = pci_i82557a_init, |
|
1849 |
},{ |
|
1792 | 1850 |
.qdev.name = "i82557b", |
1793 | 1851 |
.qdev.size = sizeof(EEPRO100State), |
1794 | 1852 |
.init = pci_i82557b_init, |
1795 | 1853 |
},{ |
1854 |
.qdev.name = "i82557c", |
|
1855 |
.qdev.size = sizeof(EEPRO100State), |
|
1856 |
.init = pci_i82557c_init, |
|
1857 |
},{ |
|
1858 |
.qdev.name = "i82558a", |
|
1859 |
.qdev.size = sizeof(EEPRO100State), |
|
1860 |
.init = pci_i82558a_init, |
|
1861 |
},{ |
|
1862 |
.qdev.name = "i82558b", |
|
1863 |
.qdev.size = sizeof(EEPRO100State), |
|
1864 |
.init = pci_i82558b_init, |
|
1865 |
},{ |
|
1866 |
.qdev.name = "i82559a", |
|
1867 |
.qdev.size = sizeof(EEPRO100State), |
|
1868 |
.init = pci_i82559a_init, |
|
1869 |
},{ |
|
1870 |
.qdev.name = "i82559b", |
|
1871 |
.qdev.size = sizeof(EEPRO100State), |
|
1872 |
.init = pci_i82559b_init, |
|
1873 |
},{ |
|
1874 |
.qdev.name = "i82559c", |
|
1875 |
.qdev.size = sizeof(EEPRO100State), |
|
1876 |
.init = pci_i82559c_init, |
|
1877 |
},{ |
|
1796 | 1878 |
.qdev.name = "i82559er", |
1797 | 1879 |
.qdev.size = sizeof(EEPRO100State), |
1798 | 1880 |
.init = pci_i82559er_init, |
1799 | 1881 |
},{ |
1882 |
.qdev.name = "i82562", |
|
1883 |
.qdev.size = sizeof(EEPRO100State), |
|
1884 |
.init = pci_i82562_init, |
|
1885 |
},{ |
|
1800 | 1886 |
/* end of list */ |
1801 | 1887 |
} |
1802 | 1888 |
}; |
Also available in: Unified diff