8 set_serial (int bps, int bits, enum parity_type parity, int stop)
10 int baud_base = 1843200 / 16; /* Base rate of 16550A. */
11 uint16_t divisor = baud_base / bps; /* Clock rate divisor. */
14 outb (LCR_REG, make_lcr (bits, parity, stop, false, true));
17 outb (LS_REG, divisor & 0xff);
18 outb (MS_REG, divisor >> 8);
21 outb (LCR_REG, make_lcr (bits, parity, stop, false, false));
27 outb (IER_REG, 0); /* Turn off all interrupts. */
28 outb (FCR_REG, 0); /* Disable FIFO. */
29 set_serial (9600, 8, NONE, 1);
30 outb (MCR_REG, 0); /* Turn off output lines. */
34 serial_outb (uint8_t byte)
36 while ((inb (LSR_REG) & LSR_THRE) == 0)