1 From 17a4507175ca6018ea40e91c9d753bc39f043d99 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 29 Sep 2017 10:32:19 +0100
4 Subject: [PATCH 037/806] amba_pl011: Add cts-event-workaround DT property
6 The BCM2835 PL011 implementation seems to have a bug that can lead to a
7 transmission lockup if CTS changes frequently. A workaround was added to
8 the driver with a vendor-specific flag to enable it, but this flag is
9 currently not set for ARM implementations.
11 Add a "cts-event-workaround" property to Pi DTBs and use the presence
12 of that property to force the flag to be enabled in the driver.
14 See: https://github.com/raspberrypi/linux/issues/1280
16 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
18 Documentation/devicetree/bindings/serial/pl011.txt | 3 +++
19 drivers/tty/serial/amba-pl011.c | 5 +++++
20 2 files changed, 8 insertions(+)
22 --- a/Documentation/devicetree/bindings/serial/pl011.txt
23 +++ b/Documentation/devicetree/bindings/serial/pl011.txt
24 @@ -35,6 +35,9 @@ Optional properties:
26 Poll timeout when auto-poll is set, default
28 +- cts-event-workaround:
29 + Enables the (otherwise vendor-specific) workaround for the
30 + CTS-induced TX lockup.
32 See also bindings/arm/primecell.txt
34 --- a/drivers/tty/serial/amba-pl011.c
35 +++ b/drivers/tty/serial/amba-pl011.c
36 @@ -2659,6 +2659,11 @@ static int pl011_probe(struct amba_devic
38 return PTR_ERR(uap->clk);
40 + if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) {
41 + vendor->cts_event_workaround = true;
42 + dev_info(&dev->dev, "cts_event_workaround enabled\n");
45 uap->reg_offset = vendor->reg_offset;
47 uap->fifosize = vendor->get_fifosize(dev);