diff options
Diffstat (limited to 'tboot/com.c')
-rw-r--r-- | tboot/com.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tboot/com.c b/tboot/com.c index c1851a6..e65ada4 100644 --- a/tboot/com.c +++ b/tboot/com.c @@ -66,13 +66,15 @@ static void comc_putchar(int c) static void comc_setup(int speed) { + int wait; + OUTB(com_cfcr, CFCR_DLAB | g_com_port.comc_fmt); OUTB(com_dlbl, COMC_BPS(speed) & 0xff); OUTB(com_dlbh, COMC_BPS(speed) >> 8); OUTB(com_cfcr, g_com_port.comc_fmt); OUTB(com_mcr, MCR_RTS | MCR_DTR); - for ( int wait = COMC_TXWAIT; wait > 0; wait-- ) { + for ( wait = COMC_TXWAIT; wait > 0; wait-- ) { INB(com_data); if ( !(INB(com_lsr) & LSR_RXRDY) ) break; |