diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt index 77863aefe9ef1..8d65b0ec2828b 100644 --- a/Documentation/devicetree/bindings/serial/pl011.txt +++ b/Documentation/devicetree/bindings/serial/pl011.txt @@ -35,6 +35,9 @@ Optional properties: - poll-timeout-ms: Poll timeout when auto-poll is set, default 3000ms. +- cts-event-workaround: + Enables the (otherwise vendor-specific) workaround for the + CTS-induced TX lockup. See also bindings/arm/primecell.txt diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi index 81914a615c8b0..d312c2739624e 100644 --- a/arch/arm/boot/dts/bcm270x.dtsi +++ b/arch/arm/boot/dts/bcm270x.dtsi @@ -26,6 +26,11 @@ interrupts = <2 17>, <2 18>; }; + serial@7e201000 { /* uart0 */ + /* Enable CTS bug workaround */ + cts-event-workaround; + }; + i2s@7e203000 { /* i2s */ #sound-dai-cells = <0>; reg = <0x7e203000 0x24>; diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 4b815abbf9913..8c6e495b74ca6 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2664,6 +2664,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);