Rename define+device for Realtek 8019AS PNP
This commit is contained in:
@@ -312,7 +312,7 @@ asic_write(nic_t *dev, uint32_t off, uint32_t val, unsigned len)
|
||||
static uint32_t
|
||||
page3_read(nic_t *dev, uint32_t off, UNUSED(unsigned int len))
|
||||
{
|
||||
if (dev->board >= NE2K_RTL8019AS)
|
||||
if (dev->board >= NE2K_RTL8019AS_PNP)
|
||||
switch (off) {
|
||||
case 0x1: /* 9346CR */
|
||||
return (dev->_9346cr);
|
||||
@@ -327,7 +327,7 @@ page3_read(nic_t *dev, uint32_t off, UNUSED(unsigned int len))
|
||||
return (dev->config3 & 0x46);
|
||||
|
||||
case 0x8: /* CSNSAV */
|
||||
return ((dev->board == NE2K_RTL8019AS) ? dev->pnp_csnsav : 0x00);
|
||||
return ((dev->board == NE2K_RTL8019AS_PNP) ? dev->pnp_csnsav : 0x00);
|
||||
|
||||
case 0xe: /* 8029ASID0 */
|
||||
if (dev->board == NE2K_RTL8029AS)
|
||||
@@ -350,7 +350,7 @@ page3_read(nic_t *dev, uint32_t off, UNUSED(unsigned int len))
|
||||
static void
|
||||
page3_write(nic_t *dev, uint32_t off, uint32_t val, UNUSED(unsigned len))
|
||||
{
|
||||
if (dev->board >= NE2K_RTL8019AS) {
|
||||
if (dev->board >= NE2K_RTL8019AS_PNP) {
|
||||
nelog(3, "%s: Page2 write to register 0x%02x, len=%u, value=0x%04x\n",
|
||||
dev->name, off, len, val);
|
||||
|
||||
@@ -919,7 +919,7 @@ nic_init(const device_t *info)
|
||||
dev->name = info->name;
|
||||
dev->board = info->local;
|
||||
|
||||
if (dev->board >= NE2K_RTL8019AS) {
|
||||
if (dev->board >= NE2K_RTL8019AS_PNP) {
|
||||
dev->base_address = 0x340;
|
||||
dev->base_irq = 12;
|
||||
if (dev->board == NE2K_RTL8029AS) {
|
||||
@@ -1042,18 +1042,18 @@ nic_init(const device_t *info)
|
||||
dp8390_mem_alloc(dev->dp8390, 0x4000, 0x8000);
|
||||
break;
|
||||
|
||||
case NE2K_RTL8019AS:
|
||||
case NE2K_RTL8019AS_PNP:
|
||||
case NE2K_RTL8029AS:
|
||||
dev->is_pci = (dev->board == NE2K_RTL8029AS) ? 1 : 0;
|
||||
dev->maclocal[0] = 0x00; /* 00:E0:4C (Realtek OID) */
|
||||
dev->maclocal[1] = 0xE0;
|
||||
dev->maclocal[2] = 0x4C;
|
||||
rom = (dev->board == NE2K_RTL8019AS) ? ROM_PATH_RTL8019 : ROM_PATH_RTL8029;
|
||||
rom = (dev->board == NE2K_RTL8019AS_PNP) ? ROM_PATH_RTL8019 : ROM_PATH_RTL8029;
|
||||
if (dev->is_pci)
|
||||
dp8390_set_defaults(dev->dp8390, DP8390_FLAG_EVEN_MAC);
|
||||
else
|
||||
dp8390_set_defaults(dev->dp8390, DP8390_FLAG_EVEN_MAC | DP8390_FLAG_CLEAR_IRQ);
|
||||
dp8390_set_id(dev->dp8390, 0x50, (dev->board == NE2K_RTL8019AS) ? 0x70 : 0x43);
|
||||
dp8390_set_id(dev->dp8390, 0x50, (dev->board == NE2K_RTL8019AS_PNP) ? 0x70 : 0x43);
|
||||
dp8390_mem_alloc(dev->dp8390, 0x4000, 0x8000);
|
||||
break;
|
||||
|
||||
@@ -1090,13 +1090,13 @@ nic_init(const device_t *info)
|
||||
* Make this device known to the I/O system.
|
||||
* PnP and PCI devices start with address spaces inactive.
|
||||
*/
|
||||
if ((dev->board < NE2K_RTL8019AS) && (dev->board != NE2K_ETHERNEXT_MC))
|
||||
if ((dev->board < NE2K_RTL8019AS_PNP) && (dev->board != NE2K_ETHERNEXT_MC))
|
||||
nic_ioset(dev, dev->base_address);
|
||||
|
||||
/* Set up our BIOS ROM space, if any. */
|
||||
nic_rom_init(dev, rom);
|
||||
|
||||
if (dev->board >= NE2K_RTL8019AS) {
|
||||
if (dev->board >= NE2K_RTL8019AS_PNP) {
|
||||
if (dev->is_pci) {
|
||||
/*
|
||||
* Configure the PCI space registers.
|
||||
@@ -1144,7 +1144,7 @@ nic_init(const device_t *info)
|
||||
pci_add_card(PCI_ADD_NORMAL, nic_pci_read, nic_pci_write, dev, &dev->pci_slot);
|
||||
}
|
||||
|
||||
/* Initialize the RTL8029 EEPROM. */
|
||||
/* Initialize the RTL80x9 EEPROM. */
|
||||
memset(dev->eeprom, 0x00, sizeof(dev->eeprom));
|
||||
|
||||
if (dev->board == NE2K_RTL8029AS) {
|
||||
@@ -1158,7 +1158,7 @@ nic_init(const device_t *info)
|
||||
const char *pnp_rom_file = NULL;
|
||||
int pnp_rom_len = 0x4a;
|
||||
switch (dev->board) {
|
||||
case NE2K_RTL8019AS:
|
||||
case NE2K_RTL8019AS_PNP:
|
||||
pnp_rom_file = "roms/network/rtl8019as/RTL8019A.BIN";
|
||||
break;
|
||||
|
||||
@@ -1182,7 +1182,7 @@ nic_init(const device_t *info)
|
||||
}
|
||||
|
||||
switch (info->local) {
|
||||
case NE2K_RTL8019AS:
|
||||
case NE2K_RTL8019AS_PNP:
|
||||
case NE2K_DE220P:
|
||||
dev->pnp_card = isapnp_add_card(pnp_rom, pnp_rom_len,
|
||||
nic_pnp_config_changed, nic_pnp_csn_changed,
|
||||
@@ -1706,11 +1706,11 @@ const device_t ethernext_mc_device = {
|
||||
.config = mca_mac_config
|
||||
};
|
||||
|
||||
const device_t rtl8019as_device = {
|
||||
const device_t rtl8019as_pnp_device = {
|
||||
.name = "Realtek RTL8019AS",
|
||||
.internal_name = "ne2kpnp",
|
||||
.flags = DEVICE_ISA | DEVICE_AT,
|
||||
.local = NE2K_RTL8019AS,
|
||||
.local = NE2K_RTL8019AS_PNP,
|
||||
.init = nic_init,
|
||||
.close = nic_close,
|
||||
.reset = NULL,
|
||||
|
||||
@@ -96,7 +96,7 @@ static const NETWORK_CARD net_cards[] = {
|
||||
{ &ne1000_device },
|
||||
{ &ne2000_device },
|
||||
{ &pcnet_am79c960_eb_device },
|
||||
{ &rtl8019as_device },
|
||||
{ &rtl8019as_pnp_device },
|
||||
{ &wd8003e_device },
|
||||
{ &wd8003eb_device },
|
||||
{ &wd8013ebt_device },
|
||||
|
||||
Reference in New Issue
Block a user