]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
MIPS: ath79: make bootconsole wait for both THRE and TEMT
authorMatthias Schiffer <mschiffer@universe-factory.net>
Thu, 24 Mar 2016 15:02:52 +0000 (16:02 +0100)
committerKamal Mostafa <kamal@canonical.com>
Fri, 10 Jun 2016 13:32:25 +0000 (06:32 -0700)
commit1cba0c02a0848ebb897eab4a84ce9201e09bcaec
tree99fb56e54e31af08b4c498cfc757636885b48f90
parent05985cf3a4dd259a6fdb1f8d6eda6f03c31f6734
MIPS: ath79: make bootconsole wait for both THRE and TEMT

BugLink: http://bugs.launchpad.net/bugs/1590455
commit f5b556c94c8490d42fea79d7b4ae0ecbc291e69d upstream.

This makes the ath79 bootconsole behave the same way as the generic 8250
bootconsole.

Also waiting for TEMT (transmit buffer is empty) instead of just THRE
(transmit buffer is not full) ensures that all characters have been
transmitted before the real serial driver starts reconfiguring the serial
controller (which would sometimes result in garbage being transmitted.)
This change does not cause a visible performance loss.

In addition, this seems to fix a hang observed in certain configurations on
many AR7xxx/AR9xxx SoCs during autoconfig of the real serial driver.

A more complete follow-up patch will disable 8250 autoconfig for ath79
altogether (the serial controller is detected as a 16550A, which is not
fully compatible with the ath79 serial, and the autoconfig may lead to
undefined behavior on ath79.)

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
arch/mips/ath79/early_printk.c