Don't raise the UART interrupts if no IRQ is configured
The 82C606 SuperIO allows reconfiguring the interrupt line used for the UART alarm at runtime, including disabling it altogether. While at that, correct the type in the serial_setup() prototype to be the same as serial_t.irq uses.
This commit is contained in:
@@ -128,7 +128,7 @@ serial_update_ints(serial_t *dev)
|
||||
dev->iir = 0;
|
||||
}
|
||||
|
||||
if (stat && ((dev->mctrl & 8) || (dev->type == SERIAL_8250_PCJR))) {
|
||||
if (stat && (dev->irq != 0xff) && ((dev->mctrl & 8) || (dev->type == SERIAL_8250_PCJR))) {
|
||||
if (dev->type >= SERIAL_NS16450)
|
||||
picintlevel(1 << dev->irq);
|
||||
else
|
||||
@@ -615,7 +615,7 @@ serial_remove(serial_t *dev)
|
||||
|
||||
|
||||
void
|
||||
serial_setup(serial_t *dev, uint16_t addr, int irq)
|
||||
serial_setup(serial_t *dev, uint16_t addr, uint8_t irq)
|
||||
{
|
||||
serial_log("Adding serial port %i at %04X...\n", dev->inst, addr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user