aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2007-09-30 17:46:55 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2007-10-03 08:23:16 -0400
commitbedfc8a040378cb51f46155c980d295c2c397203 (patch)
tree1f1dfdf1c97e6ee125a91fafc25d6725b7a96afe /arch
parent267b49a96e30f129600bdb4f3fa6d80d6dd42523 (diff)
[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: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/boot/simple/misc-embedded.c4
-rw-r--r--arch/ppc/boot/simple/uartlite_tty.c8
2 files changed, 11 insertions, 1 deletions
diff --git a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c
index 8a08ad397ed..d5a00eb0e4e 100644
--- a/arch/ppc/boot/simple/misc-embedded.c
+++ b/arch/ppc/boot/simple/misc-embedded.c
@@ -89,7 +89,9 @@ load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *b
89 * initialize the serial console port. 89 * initialize the serial console port.
90 */ 90 */
91 embed_config(&bp); 91 embed_config(&bp);
92#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) 92#if defined(CONFIG_SERIAL_CPM_CONSOLE) || \
93 defined(CONFIG_SERIAL_8250_CONSOLE) || \
94 defined(CONFIG_SERIAL_UARTLITE_CONSOLE)
93 com_port = serial_init(0, bp); 95 com_port = serial_init(0, bp);
94#endif 96#endif
95 97
diff --git a/arch/ppc/boot/simple/uartlite_tty.c b/arch/ppc/boot/simple/uartlite_tty.c
index 0eae1eab38d..ca1743e3e91 100644
--- a/arch/ppc/boot/simple/uartlite_tty.c
+++ b/arch/ppc/boot/simple/uartlite_tty.c
@@ -16,6 +16,14 @@
16 16
17#define UARTLITE_BASEADDR ((void*)(XPAR_UARTLITE_0_BASEADDR)) 17#define UARTLITE_BASEADDR ((void*)(XPAR_UARTLITE_0_BASEADDR))
18 18
19unsigned long
20serial_init(int chan, void *ignored)
21{
22 /* Clear the RX FIFO */
23 out_be32(UARTLITE_BASEADDR + 0x0C, 0x2);
24 return 0;
25}
26
19void 27void
20serial_putc(unsigned long com_port, unsigned char c) 28serial_putc(unsigned long com_port, unsigned char c)
21{ 29{