[U-Boot-Users] the problem on uart
zhuzhenhua
zzh.hust at gmail.com
Fri Nov 11 06:37:25 CET 2005
i write my serial.c for our uart referring to cpu/mips/au1x00_serial.c
and it can output the characters.
but if i output a string less than 8 byte, like "1234abcd", it works
well.and then if i change the
string to "1234 abcd", it will output "a234 abcd", does someone has
this situation on porting uart?
under the line is my serial_puts and serial_putc
-------------------------------------------------------------------------
void serial_putc (const char c)
{
volatile u32 *uart0_stat = (volatile u32*)(UART0_ADDR + UART0_STAT);
volatile u32 *uart0_txdata = (volatile u32*)(UART0_ADDR + UART0_TXDATA);
if (c == '\n') serial_putc ('\r');
/* Wait for fifo to shift out some bytes */
while((*uart0_stat&UART0_STAT_TXFULL) == 1);
*uart0_txdata = (u32)c;
}
void serial_puts (const char *s)
{
while (*s)
{
serial_putc (*s++);
}
}
More information about the U-Boot
mailing list