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);
|
||||
|
||||
|
@@ -77,7 +77,7 @@ extern serial_t * serial_attach(int port,
|
||||
void *priv);
|
||||
extern void serial_remove(serial_t *dev);
|
||||
extern void serial_set_type(serial_t *dev, int type);
|
||||
extern void serial_setup(serial_t *dev, uint16_t addr, int irq);
|
||||
extern void serial_setup(serial_t *dev, uint16_t addr, uint8_t irq);
|
||||
extern void serial_clear_fifo(serial_t *dev);
|
||||
extern void serial_write_fifo(serial_t *dev, uint8_t dat);
|
||||
extern void serial_set_next_inst(int ni);
|
||||
|
Reference in New Issue
Block a user