/* Output a single byte to the serial port.  */
void serial_putc(const char c)
/* Output a single byte to the serial port.  */
void serial_putc(const char c)
{
	int tmo;
	if (c == '\n')
		serial_putc ('\r');
	tmo = get_timer (0) + 1 * CONFIG_SYS_HZ;
	while (IO_SYSFLG1 & SYSFLG1_UTXFF)
		if (get_timer (0) > tmo)
			break;
	IO_UARTDR1 = c;
}