We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c48b070 commit bf9dc2aCopy full SHA for bf9dc2a
drivers/pci/pci.c
@@ -205,6 +205,12 @@ void LpcSetSerialState(int enable)
205
// Select serial device
206
LpcWriteRegister(0x07, 0x04);
207
208
+ if (enable) {
209
+ // Set serial base
210
+ LpcWriteRegister(0x61, SERIAL_PORT & 0xFF);
211
+ LpcWriteRegister(0x60, SERIAL_PORT >> 8);
212
+ }
213
+
214
// Enable device
215
LpcWriteRegister(0x30, enable ? 0x01 : 0x00);
216
}
@@ -512,10 +518,6 @@ void BootPciPeripheralInitialization(void)
512
518
if (!LpcGetSerialState()) {
513
519
LpcSetSerialState(1);
514
520
515
- // Set Serial Base
516
- LpcWriteRegister(0x61, SERIAL_PORT & 0xFF);
517
- LpcWriteRegister(0x60, SERIAL_PORT >> 8);
-
521
// Set Serial Interrupt
522
LpcSetSerialIRQState(1);
523
0 commit comments