8250-serial: Emulate 8250 behaviour on autoprobing

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Cyrill Gorcunov
2015-06-01 16:39:41 +01:00
committed by Will Deacon
parent 251cf9a60d
commit 855a637172
+3 -1
View File
@@ -229,6 +229,7 @@ static bool serial8250_in(struct kvm *self, uint16_t port, void *data, int size,
ioport__write8(data, dev->ier);
break;
case UART_IIR:
dev->iir &= 0x3f; /* no FIFO for 8250 */
ioport__write8(data, dev->iir);
break;
case UART_LCR:
@@ -244,7 +245,8 @@ static bool serial8250_in(struct kvm *self, uint16_t port, void *data, int size,
ioport__write8(data, UART_MSR_CTS);
break;
case UART_SCR:
ioport__write8(data, dev->scr);
/* No SCR for 8250 */
ioport__write8(data, 0);
break;
default:
return false;