summaryrefslogtreecommitdiffstats
path: root/arch/ppc/boot/simple/uartlite_tty.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2007-10-01 07:46:55 +1000
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2007-10-03 07:23:16 -0500
commitbedfc8a040378cb51f46155c980d295c2c397203 (patch)
tree1f1dfdf1c97e6ee125a91fafc25d6725b7a96afe /arch/ppc/boot/simple/uartlite_tty.c
parent267b49a96e30f129600bdb4f3fa6d80d6dd42523 (diff)
downloadlinux-bedfc8a040378cb51f46155c980d295c2c397203.tar.gz
linux-bedfc8a040378cb51f46155c980d295c2c397203.tar.bz2
linux-bedfc8a040378cb51f46155c980d295c2c397203.zip
[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/ppc/boot/simple/uartlite_tty.c')
-rw-r--r--arch/ppc/boot/simple/uartlite_tty.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/ppc/boot/simple/uartlite_tty.c b/arch/ppc/boot/simple/uartlite_tty.c
index 0eae1eab38d4..ca1743e3e912 100644
--- a/arch/ppc/boot/simple/uartlite_tty.c
+++ b/arch/ppc/boot/simple/uartlite_tty.c
@@ -16,6 +16,14 @@
#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
serial_putc(unsigned long com_port, unsigned char c)
{