Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <vgupta@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Cc: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vineet Gupta and committed by
Greg Kroah-Hartman
11c62d4f f2eca58f

+6 -8
+2 -2
Documentation/devicetree/bindings/tty/serial/arc-uart.txt
··· 5 5 - reg : offset and length of the register set for the device. 6 6 - interrupts : device interrupt 7 7 - clock-frequency : the input clock frequency for the UART 8 - - baud : baud rate for UART 8 + - current-speed : baud rate for UART 9 9 10 10 e.g. 11 11 ··· 14 14 reg = <0xc0fc1000 0x100>; 15 15 interrupts = <5>; 16 16 clock-frequency = <80000000>; 17 - baud = <115200>; 17 + current-speed = <115200>; 18 18 status = "okay"; 19 19 }; 20 20
+4 -6
drivers/tty/serial/arc_uart.c
··· 547 547 } 548 548 uart->port.uartclk = val; 549 549 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"); 552 552 return -EINVAL; 553 553 } 554 554 uart->baud = val; ··· 694 694 return -ENODEV; 695 695 696 696 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; 701 699 702 700 rc = arc_uart_init_one(pdev, dev_id); 703 701 if (rc)