mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
tty/bcm63xx_uart: allow naming clock in device tree
Codify using a named clock for the refclk of the uart. This makes it easier if we might need to add a gating clock (like present on the BCM6345). Signed-off-by: Jonas Gorski <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Kevin Cernekee <[email protected]> Cc: Russell King <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/17328/ Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: James Hogan <[email protected]>
This commit is contained in:
parent
9a9cc02a6a
commit
fa1e6a8aec
2 changed files with 10 additions and 2 deletions
|
|
@ -846,8 +846,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
|
|||
if (!res_irq)
|
||||
return -ENODEV;
|
||||
|
||||
clk = pdev->dev.of_node ? of_clk_get(pdev->dev.of_node, 0) :
|
||||
clk_get(&pdev->dev, "refclk");
|
||||
clk = clk_get(&pdev->dev, "refclk");
|
||||
if (IS_ERR(clk) && pdev->dev.of_node)
|
||||
clk = of_clk_get(pdev->dev.of_node, 0);
|
||||
|
||||
if (IS_ERR(clk))
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue