dev: Allow additional UART interrupts to be set

This patch allows setting a few additional interrupts for status
changes that should never occur.
This commit is contained in:
Ali Saidi 2013-10-17 10:20:45 -05:00
parent c2553745c9
commit 88b811b4ef

View file

@ -211,10 +211,14 @@ Pl011::write(PacketPtr pkt)
case UART_IMSC: case UART_IMSC:
imsc = data; imsc = data;
if (imsc.rimim || imsc.ctsmim || imsc.dcdmim || imsc.dsrmim if (imsc.feim || imsc.peim || imsc.beim || imsc.oeim || imsc.rsvd)
|| imsc.feim || imsc.peim || imsc.beim || imsc.oeim || imsc.rsvd)
panic("Unknown interrupt enabled\n"); panic("Unknown interrupt enabled\n");
// rimim, ctsmim, dcdmim, dsrmim can be enabled but are ignored
// they are supposed to interrupt on a change of status in the line
// which we should never have since our terminal is happy to always
// receive bytes.
if (imsc.txim) { if (imsc.txim) {
DPRINTF(Uart, "Writing to IMSC: TX int enabled, scheduling interruptt\n"); DPRINTF(Uart, "Writing to IMSC: TX int enabled, scheduling interruptt\n");
rawInt.txim = 1; rawInt.txim = 1;