Commit 048c1df7 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Greg Kroah-Hartman

tty: serial: bcm63xx: Add support for unnamed clock outputs from DT

The original non-DT bcm63xx clk code ignores the struct device argument
and looks up a global clock name.  DT platforms, by contrast, often just
use a phandle to reference a clock node with no "clock-output-names"
property.  Modify the UART driver to support both schemes.
Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c0ec3fd1
...@@ -824,7 +824,8 @@ static int bcm_uart_probe(struct platform_device *pdev) ...@@ -824,7 +824,8 @@ static int bcm_uart_probe(struct platform_device *pdev)
if (!res_irq) if (!res_irq)
return -ENODEV; return -ENODEV;
clk = clk_get(&pdev->dev, "periph"); clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) :
clk_get(&pdev->dev, "periph");
if (IS_ERR(clk)) if (IS_ERR(clk))
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment