serial: 8250_dw: Limit dw8250_tx_wait_empty quirk to armada-38x devices
authorJoshua Scott <joshua.scott@alliedtelesis.co.nz>
Fri, 16 Mar 2018 00:42:00 +0000 (13:42 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 08:11:13 +0000 (10:11 +0200)
commitb7639b0b15ddd1a4686b0142e70dfb122eefc88f
treee2c3f53b29dc09f7a73f99a1f2ad54d539b29362
parent63ba1e00f178a4483b473489cadc4eb52a77df2a
serial: 8250_dw: Limit dw8250_tx_wait_empty quirk to armada-38x devices

The previous implementation has had a detrimental effect on devices using
high bitrates (bluetooth), as the fifo being non-empty for a single check
would result in a 10 µs delay.

Limit the change to devices with the new "marvell,armada-38x-uart"
compatible string. Also update the code to allow the first 1000 retries
to not perform a delay.

The maximum duration of retries has been increased to cover a worst-case
seen on the Armada 385 SoC. "dmesg ; resize", will fill the buffer with
text to output before doing a resize. At 9600 baud this took up to 13 ms
to flush all characters and avoid some getting lost.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/boot/dts/armada-38x.dtsi
drivers/tty/serial/8250/8250_dw.c