diff options
author | root <root@lamia.panaceas.james.local> | 2017-03-15 13:50:51 +0000 |
---|---|---|
committer | root <root@lamia.panaceas.james.local> | 2017-03-15 13:50:51 +0000 |
commit | 2dd7ea9b7a34fd02c10b67bccebfb3c04b7ab3bf (patch) | |
tree | f145c6f6ad2dd52e271f1b84a4cfb8b8f0c6ce07 /tboot/com.c | |
parent | f327ade1d0333deee519b2c2977f8edae5b9fa3d (diff) | |
download | tboot-2dd7ea9b7a34fd02c10b67bccebfb3c04b7ab3bf.tar.gz tboot-2dd7ea9b7a34fd02c10b67bccebfb3c04b7ab3bf.tar.bz2 tboot-2dd7ea9b7a34fd02c10b67bccebfb3c04b7ab3bf.zip |
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; |