提交 1309c3c7 编写于 作者: P Phil Elwell 提交者: Zheng Zengkai

amba_pl011: Add cts-event-workaround DT property

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

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: https://github.com/raspberrypi/linux/issues/1280Signed-off-by: NPhil Elwell <phil@raspberrypi.org>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 05884dbf
......@@ -98,6 +98,12 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
default: 3000
cts-event-workaround:
description:
Enables the (otherwise vendor-specific) workaround for the
CTS-induced TX lockup.
type: boolean
required:
- compatible
- reg
......
......@@ -2686,6 +2686,11 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
if (IS_ERR(uap->clk))
return PTR_ERR(uap->clk);
if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) {
vendor->cts_event_workaround = true;
dev_info(&dev->dev, "cts_event_workaround enabled\n");
}
uap->reg_offset = vendor->reg_offset;
uap->vendor = vendor;
uap->fifosize = vendor->get_fifosize(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册