Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bedfc8a040378cb51f46155c980d295c2c397203
Commit:     bedfc8a040378cb51f46155c980d295c2c397203
Parent:     267b49a96e30f129600bdb4f3fa6d80d6dd42523
Author:     Grant Likely <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 1 07:46:55 2007 +1000
Committer:  Josh Boyer <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 07:23:16 2007 -0500

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Josh Boyer <[EMAIL PROTECTED]>
---
 arch/ppc/boot/simple/misc-embedded.c |    4 +++-
 arch/ppc/boot/simple/uartlite_tty.c  |    8 ++++++++
 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 8a08ad3..d5a00eb 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
         * initialize the serial console port.
         */
        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);
 #endif
 
diff --git a/arch/ppc/boot/simple/uartlite_tty.c 
b/arch/ppc/boot/simple/uartlite_tty.c
index 0eae1ea..ca1743e 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)
 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to