Changes the serial port to output at 115200
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 12 May 2009 23:05:39 +0000 (16:05 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 18 May 2009 19:13:11 +0000 (12:13 -0700)
kern/console.c

index d0aa7a1..ad94a80 100644 (file)
@@ -60,7 +60,8 @@ serial_init(void)
        
        // Set speed; requires DLAB latch
        outb(COM1+COM_LCR, COM_LCR_DLAB);
-       outb(COM1+COM_DLL, (uint8_t) (115200 / 9600));
+       // Setting speed to 115200 (setting the divider to 1)
+       outb(COM1+COM_DLL, 1);
        outb(COM1+COM_DLM, 0);
 
        // 8 data bits, 1 stop bit, parity off; turn off DLAB latch