]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Uartlite: Flush RX fifo in bootwrapper
authorGrant Likely <grant.likely@secretlab.ca>
Sun, 30 Sep 2007 21:46:55 +0000 (07:46 +1000)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Wed, 3 Oct 2007 12:23:16 +0000 (07:23 -0500)
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>
arch/ppc/boot/simple/misc-embedded.c
arch/ppc/boot/simple/uartlite_tty.c

index 8a08ad397ed571aadb9a04f4da28193c14bb6cea..d5a00eb0e4eb973d7ae913bcdf6b9dd306d8b7f7 100644 (file)
@@ -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
 
index 0eae1eab38d48b5bf07eb980d35ccb46dd8c226d..ca1743e3e912d5ddc1ce0ee642a80530116ca4e1 100644 (file)
 
 #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)
 {