diff options
-rw-r--r-- | Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | 6 | ||||
-rw-r--r-- | drivers/tty/serial/bcm63xx_uart.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt index 5c52e5eef16d..8b2b0460259a 100644 --- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt +++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt | |||
@@ -11,6 +11,11 @@ Required properties: | |||
11 | - clocks: Clock driving the hardware; used to figure out the baud rate | 11 | - clocks: Clock driving the hardware; used to figure out the baud rate |
12 | divisor. | 12 | divisor. |
13 | 13 | ||
14 | |||
15 | Optional properties: | ||
16 | |||
17 | - clock-names: Should be "refclk". | ||
18 | |||
14 | Example: | 19 | Example: |
15 | 20 | ||
16 | uart0: serial@14e00520 { | 21 | uart0: serial@14e00520 { |
@@ -19,6 +24,7 @@ Example: | |||
19 | interrupt-parent = <&periph_intc>; | 24 | interrupt-parent = <&periph_intc>; |
20 | interrupts = <2>; | 25 | interrupts = <2>; |
21 | clocks = <&periph_clk>; | 26 | clocks = <&periph_clk>; |
27 | clock-names = "refclk"; | ||
22 | }; | 28 | }; |
23 | 29 | ||
24 | clocks { | 30 | clocks { |
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index afcc0418831b..0385bd361f4f 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c | |||
@@ -846,8 +846,10 @@ static int bcm_uart_probe(struct platform_device *pdev) | |||
846 | if (!res_irq) | 846 | if (!res_irq) |
847 | return -ENODEV; | 847 | return -ENODEV; |
848 | 848 | ||
849 | clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) : | 849 | clk = clk_get(&pdev->dev, "refclk"); |
850 | clk_get(&pdev->dev, "refclk"); | 850 | if (IS_ERR(clk) && pdev->dev.of_node) |
851 | clk = of_clk_get(pdev->dev.of_node, 0); | ||
852 | |||
851 | if (IS_ERR(clk)) | 853 | if (IS_ERR(clk)) |
852 | return -ENODEV; | 854 | return -ENODEV; |
853 | 855 | ||