diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-20 19:54:59 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-20 19:54:59 +0000 |
commit | 6a441bfb46337ed6b59abed56dad35d94802282c (patch) | |
tree | 44eb1d67fcbc450907472186bbc0036afe9e380c /payloads/libpayload/drivers/serial.c | |
parent | 5f4c8abb6537fa7377969e837dab987abefcf922 (diff) | |
download | coreboot-6a441bfb46337ed6b59abed56dad35d94802282c.tar.xz |
Cosmetics, coding style fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3180 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/drivers/serial.c')
-rw-r--r-- | payloads/libpayload/drivers/serial.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/payloads/libpayload/drivers/serial.c b/payloads/libpayload/drivers/serial.c index bcf60df614..b3179c756d 100644 --- a/payloads/libpayload/drivers/serial.c +++ b/payloads/libpayload/drivers/serial.c @@ -37,32 +37,32 @@ #endif void serial_init(void) -{ +{ #ifdef CONFIG_SERIAL_SET_SPEED unsigned char reg; - /* Disable interrupts */ + /* Disable interrupts. */ outb(0, IOBASE + 0x01); - /* Assert RTS and DTR */ + /* Assert RTS and DTR. */ outb(3, IOBASE + 0x04); - /* Set the divisor latch */ + /* Set the divisor latch. */ reg = inb(IOBASE + 0x03); outb(reg | 0x80, IOBASE + 0x03); - /* Write the divisor */ + /* Write the divisor. */ outb(DIVISOR & 0xFF, IOBASE); outb(DIVISOR >> 8 & 0xFF, IOBASE + 1); - /* Restore the previous value of the divisor */ + /* Restore the previous value of the divisor. */ outb(reg &= ~0x80, IOBASE + 0x03); #endif } - + void serial_putchar(unsigned char c) { - while((inb(IOBASE + 0x05) & 0x20) == 0); + while ((inb(IOBASE + 0x05) & 0x20) == 0) ; outb(c, IOBASE); } @@ -73,6 +73,6 @@ int serial_havechar(void) int serial_getchar(void) { - while (!serial_havechar()); - return (int) inb(IOBASE); + while (!serial_havechar()) ; + return (int)inb(IOBASE); } |