Skip to content

Commit 11c62d4

Browse files
Vineet Guptagregkh
authored andcommitted
serial/arc-uart: Miscll DT related updates (Grant's review comments)
-replace "baud" with "current-speed" -if uart alias doesn't exist in DT, don't abort, pick 0 Signed-off-by: Vineet Gupta <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Grant Likely <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: [email protected] Cc: Rob Herring <[email protected]> Cc: Rob Landley <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f2eca58 commit 11c62d4

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Documentation/devicetree/bindings/tty/serial/arc-uart.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Required properties:
55
- reg : offset and length of the register set for the device.
66
- interrupts : device interrupt
77
- clock-frequency : the input clock frequency for the UART
8-
- baud : baud rate for UART
8+
- current-speed : baud rate for UART
99

1010
e.g.
1111

@@ -14,7 +14,7 @@ arcuart0: serial@c0fc1000 {
1414
reg = <0xc0fc1000 0x100>;
1515
interrupts = <5>;
1616
clock-frequency = <80000000>;
17-
baud = <115200>;
17+
current-speed = <115200>;
1818
status = "okay";
1919
};
2020

drivers/tty/serial/arc_uart.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ arc_uart_init_one(struct platform_device *pdev, int dev_id)
547547
}
548548
uart->port.uartclk = val;
549549

550-
if (of_property_read_u32(np, "baud", &val)) {
551-
dev_err(&pdev->dev, "baud property NOT set\n");
550+
if (of_property_read_u32(np, "current-speed", &val)) {
551+
dev_err(&pdev->dev, "current-speed property NOT set\n");
552552
return -EINVAL;
553553
}
554554
uart->baud = val;
@@ -694,10 +694,8 @@ static int arc_serial_probe(struct platform_device *pdev)
694694
return -ENODEV;
695695

696696
dev_id = of_alias_get_id(np, "serial");
697-
if (dev_id < 0) {
698-
dev_err(&pdev->dev, "failed to get alias id: %d\n", dev_id);
699-
return dev_id;
700-
}
697+
if (dev_id < 0)
698+
dev_id = 0;
701699

702700
rc = arc_uart_init_one(pdev, dev_id);
703701
if (rc)

0 commit comments

Comments
 (0)