Skip to content

Commit d6c491c

Browse files
Phil Elwellpopcornmix
Phil Elwell
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: #1280 Signed-off-by: Phil Elwell <[email protected]>
1 parent 0395a34 commit d6c491c

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
@@ -101,6 +101,12 @@ properties:
101101
on the device.
102102
enum: [1, 4]
103103

104+
cts-event-workaround:
105+
description:
106+
Enables the (otherwise vendor-specific) workaround for the
107+
CTS-induced TX lockup.
108+
type: boolean
109+
104110
required:
105111
- compatible
106112
- reg

drivers/tty/serial/amba-pl011.c

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

2847+
if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) {
2848+
vendor->cts_event_workaround = true;
2849+
dev_info(&dev->dev, "cts_event_workaround enabled\n");
2850+
}
2851+
28472852
uap->reg_offset = vendor->reg_offset;
28482853
uap->vendor = vendor;
28492854
uap->fifosize = vendor->get_fifosize(dev);

0 commit comments

Comments
 (0)