2007-11-06 Robert Millan <rmh@aybabtu.com>

* term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
	in grub_outb() calls.
	(serial_hw_init): Likewise.
This commit is contained in:
robertmh 2007-11-06 21:23:59 +00:00
parent 53b052dedb
commit 4917851111
2 changed files with 14 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2007-11-06 Robert Millan <rmh@aybabtu.com>
* term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
in grub_outb() calls.
(serial_hw_init): Likewise.
2007-11-05 Robert Millan <rmh@aybabtu.com> 2007-11-05 Robert Millan <rmh@aybabtu.com>
* util/update-grub.in: Allow files in ${update_grub_dir} to contain * util/update-grub.in: Allow files in ${update_grub_dir} to contain

View file

@ -96,7 +96,7 @@ serial_hw_put (const int c)
return; return;
} }
grub_outb (serial_settings.port + UART_TX, c); grub_outb (c, serial_settings.port + UART_TX);
} }
static void static void
@ -268,26 +268,26 @@ serial_hw_init (void)
unsigned char status = 0; unsigned char status = 0;
/* Turn off the interupt. */ /* Turn off the interupt. */
grub_outb (serial_settings.port + UART_IER, 0); grub_outb (0, serial_settings.port + UART_IER);
/* Set DLAB. */ /* Set DLAB. */
grub_outb (serial_settings.port + UART_LCR, UART_DLAB); grub_outb (UART_DLAB, serial_settings.port + UART_LCR);
/* Set the baud rate. */ /* Set the baud rate. */
grub_outb (serial_settings.port + UART_DLL, serial_settings.divisor & 0xFF); grub_outb (serial_settings.divisor & 0xFF, serial_settings.port + UART_DLL);
grub_outb (serial_settings.port + UART_DLH, serial_settings.divisor >> 8 ); grub_outb (serial_settings.divisor >> 8, serial_settings.port + UART_DLH);
/* Set the line status. */ /* Set the line status. */
status |= (serial_settings.parity status |= (serial_settings.parity
| serial_settings.word_len | serial_settings.word_len
| serial_settings.stop_bits); | serial_settings.stop_bits);
grub_outb (serial_settings.port + UART_LCR, status); grub_outb (status, serial_settings.port + UART_LCR);
/* Enable the FIFO. */ /* Enable the FIFO. */
grub_outb (serial_settings.port + UART_FCR, UART_ENABLE_FIFO); grub_outb (UART_ENABLE_FIFO, serial_settings.port + UART_FCR);
/* Turn on DTR, RTS, and OUT2. */ /* Turn on DTR, RTS, and OUT2. */
grub_outb (serial_settings.port + UART_MCR, UART_ENABLE_MODEM); grub_outb (UART_ENABLE_MODEM, serial_settings.port + UART_MCR);
/* Drain the input buffer. */ /* Drain the input buffer. */
while (grub_serial_checkkey () != -1) while (grub_serial_checkkey () != -1)