Commit bedfc8a0 authored by Grant Likely's avatar Grant Likely Committed by Josh Boyer

[POWERPC] Uartlite: Flush RX fifo in bootwrapper

Flush the uartlite RX fifo so that characters typed before entry into
the zImage wrapper do not muck up the kernel command line.
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
parent 267b49a9
...@@ -89,7 +89,9 @@ load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *b ...@@ -89,7 +89,9 @@ load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *b
* initialize the serial console port. * initialize the serial console port.
*/ */
embed_config(&bp); embed_config(&bp);
#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) #if defined(CONFIG_SERIAL_CPM_CONSOLE) || \
defined(CONFIG_SERIAL_8250_CONSOLE) || \
defined(CONFIG_SERIAL_UARTLITE_CONSOLE)
com_port = serial_init(0, bp); com_port = serial_init(0, bp);
#endif #endif
......
...@@ -16,6 +16,14 @@ ...@@ -16,6 +16,14 @@
#define UARTLITE_BASEADDR ((void*)(XPAR_UARTLITE_0_BASEADDR)) #define UARTLITE_BASEADDR ((void*)(XPAR_UARTLITE_0_BASEADDR))
unsigned long
serial_init(int chan, void *ignored)
{
/* Clear the RX FIFO */
out_be32(UARTLITE_BASEADDR + 0x0C, 0x2);
return 0;
}
void void
serial_putc(unsigned long com_port, unsigned char c) serial_putc(unsigned long com_port, unsigned char c)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment