serial: bfin_5xx: disable CON_PRINTBUFFER for consoles
[firefly-linux-kernel-4.4.55.git] / drivers / serial / bfin_5xx.c
index a454e427c94987915e8fded0ab98de944d668229..965532157c65b747cdf0e6d87606118391d145f4 100644 (file)
@@ -1324,6 +1324,14 @@ struct console __init *bfin_earlyserial_init(unsigned int port,
        struct bfin_serial_port *uart;
        struct ktermios t;
 
+#ifdef CONFIG_SERIAL_BFIN_CONSOLE
+       /*
+        * If we are using early serial, don't let the normal console rewind
+        * log buffer, since that causes things to be printed multiple times
+        */
+       bfin_serial_console.flags &= ~CON_PRINTBUFFER;
+#endif
+
        if (port == -1 || port >= nr_active_ports)
                port = 0;
        bfin_serial_init_ports();