Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f60830a authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Greg Kroah-Hartman
Browse files

serial: sirf: Use generic uart-has-rtscts DT property



Convert the SiRF UART driver from using the vendor-specific
"sirf,uart-has-rtscts" to the generic "uart-has-rtscts" DT property, as
documented by the Generic Serial DT Bindings.

The old vendor-specific property is still recognized by the driver for
backwards compatibility, but deprecated.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent af99c187
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -9,9 +9,9 @@ Required properties:
- clocks : Should contain uart clock number
- clocks : Should contain uart clock number


Optional properties:
Optional properties:
- sirf,uart-has-rtscts: we have hardware flow controller pins in hardware
- uart-has-rtscts: we have hardware flow controller pins in hardware
- rts-gpios: RTS pin for USP-based UART if sirf,uart-has-rtscts is true
- rts-gpios: RTS pin for USP-based UART if uart-has-rtscts is true
- cts-gpios: CTS pin for USP-based UART if sirf,uart-has-rtscts is true
- cts-gpios: CTS pin for USP-based UART if uart-has-rtscts is true


Example:
Example:


@@ -28,7 +28,7 @@ On the board-specific dts, we can put rts-gpios and cts-gpios like


usp@b0090000 {
usp@b0090000 {
	compatible = "sirf,prima2-usp-uart";
	compatible = "sirf,prima2-usp-uart";
	sirf,uart-has-rtscts;
	uart-has-rtscts;
	rts-gpios = <&gpio 15 0>;
	rts-gpios = <&gpio 15 0>;
	cts-gpios = <&gpio 46 0>;
	cts-gpios = <&gpio 46 0>;
};
};
+2 −1
Original line number Original line Diff line number Diff line
@@ -1293,7 +1293,8 @@ static int sirfsoc_uart_probe(struct platform_device *pdev)
	sirfport->uart_reg = (struct sirfsoc_uart_register *)match->data;
	sirfport->uart_reg = (struct sirfsoc_uart_register *)match->data;


	sirfport->hw_flow_ctrl =
	sirfport->hw_flow_ctrl =
		of_property_read_bool(np, "sirf,uart-has-rtscts");
		of_property_read_bool(np, "uart-has-rtscts") ||
		of_property_read_bool(np, "sirf,uart-has-rtscts") /* deprecated */;
	if (of_device_is_compatible(np, "sirf,prima2-uart") ||
	if (of_device_is_compatible(np, "sirf,prima2-uart") ||
		of_device_is_compatible(np, "sirf,atlas7-uart"))
		of_device_is_compatible(np, "sirf,atlas7-uart"))
		sirfport->uart_reg->uart_type = SIRF_REAL_UART;
		sirfport->uart_reg->uart_type = SIRF_REAL_UART;