Got rid of the IRQ hacks for the BT-985D and the RTL8029AS because they are no longer needed, all the boards now give the cards IRQ's.

This commit is contained in:
OBattler
2017-06-04 02:59:30 +02:00
parent 3c1b0da73f
commit 8a57bd4bc0
2 changed files with 9 additions and 41 deletions

View File

@@ -255,7 +255,7 @@ nelog(int lvl, const char *fmt, ...)
static void
nic_interrupt(nic_t *dev, int set)
{
if (PCI && dev->is_pci) {
if ((PCI && dev->is_pci) && (dev->base_irq == 0xff)) {
if (set)
pci_set_irq(dev->card, PCI_INTA);
else
@@ -1635,15 +1635,11 @@ nic_pci_write(int func, int addr, uint8_t val, void *priv)
nic_update_bios(dev);
return;
#if 0
case 0x3C: /* PCI_ILR */
if (val != 0xFF) {
nelog(1, "%s: IRQ now: %i\n", dev->name, val);
dev->base_irq = val;
}
dev->pci_regs[addr] = dev->base_irq;
return;
#endif
}
}
@@ -1909,11 +1905,12 @@ nic_init(int board)
if (dev->is_pci) {
dev->base_address = 0x340;
dev->base_irq = 10;
} else {
dev->base_address = device_get_config_hex16("base");
dev->bios_addr = device_get_config_hex20("bios_addr");
}
dev->base_irq = device_get_config_int("irq");
}
/* See if we have a local MAC address configured. */
mac = device_get_config_mac("mac", -1);
@@ -2220,29 +2217,6 @@ static device_config_t ne2000_config[] =
static device_config_t rtl8029as_config[] =
{
{
"irq", "IRQ", CONFIG_SELECTION, "", 10,
{
{
"IRQ 3", 3
},
{
"IRQ 5", 5
},
{
"IRQ 7", 7
},
{
"IRQ 10", 10
},
{
"IRQ 11", 11
},
{
""
}
},
},
#if 1
/*
* WTF.

View File

@@ -534,10 +534,8 @@ BuslogicLog(const char *format, ...)
static void
BuslogicInterrupt(Buslogic_t *bl, int set)
{
#if 0
if (bl->chip != CHIP_BUSLOGIC_PCI)
if ((bl->chip != CHIP_BUSLOGIC_PCI) || (bl->Irq != 255))
{
#endif
if (set)
{
picint(1 << bl->Irq);
@@ -546,20 +544,18 @@ BuslogicInterrupt(Buslogic_t *bl, int set)
{
picintc(1 << bl->Irq);
}
#if 0
}
else
{
if (set)
{
pci_set_irq(bl->Card, PCI_INTD);
pci_set_irq(bl->Card, PCI_INTA);
}
else
{
pci_clear_irq(bl->Card, PCI_INTD);
pci_clear_irq(bl->Card, PCI_INTA);
}
}
#endif
}
@@ -2134,7 +2130,7 @@ BuslogicPCIRead(int func, int addr, void *p)
case 0x3C:
return bl->Irq;
case 0x3D:
return 4;
return PCI_INTA;
}
return(0);
@@ -2224,7 +2220,6 @@ BuslogicPCIWrite(int func, int addr, uint8_t val, void *p)
}
return;
#if 0
case 0x3C:
buslogic_pci_regs[addr] = val;
if (val != 0xFF) {
@@ -2232,7 +2227,6 @@ BuslogicPCIWrite(int func, int addr, uint8_t val, void *p)
bl->Irq = val;
}
return;
#endif
}
}