Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39ec3b8

Browse files
Phil Elwellpopcornmix
authored andcommitted
amba_pl011: Add cts-event-workaround DT property
The BCM2835 PL011 implementation seems to have a bug that can lead to a transmission lockup if CTS changes frequently. A workaround was added to the driver with a vendor-specific flag to enable it, but this flag is currently not set for ARM implementations. Add a "cts-event-workaround" property to Pi DTBs and use the presence of that property to force the flag to be enabled in the driver. See: raspberrypi/linux#1280 Signed-off-by: Phil Elwell <[email protected]>
1 parent 5915ff6 commit 39ec3b8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Documentation/devicetree/bindings/serial/pl011.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ properties:
9898
$ref: /schemas/types.yaml#/definitions/uint32
9999
default: 3000
100100

101+
cts-event-workaround:
102+
description:
103+
Enables the (otherwise vendor-specific) workaround for the
104+
CTS-induced TX lockup.
105+
type: boolean
106+
101107
required:
102108
- compatible
103109
- reg

drivers/tty/serial/amba-pl011.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,6 +2686,11 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
26862686
if (IS_ERR(uap->clk))
26872687
return PTR_ERR(uap->clk);
26882688

2689+
if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) {
2690+
vendor->cts_event_workaround = true;
2691+
dev_info(&dev->dev, "cts_event_workaround enabled\n");
2692+
}
2693+
26892694
uap->reg_offset = vendor->reg_offset;
26902695
uap->vendor = vendor;
26912696
uap->fifosize = vendor->get_fifosize(dev);

0 commit comments

Comments
 (0)