Commit ea42d7a6 authored by Shubhrajyoti Datta's avatar Shubhrajyoti Datta Committed by Greg Kroah-Hartman

tty: serial: uartlite: Enable clocks at probe

At probe the uartlite is getting configured.
Enable the clocks before assiging uart and
disable after probe is done.
Signed-off-by: default avatarShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d7c249a
...@@ -776,13 +776,17 @@ static int ulite_probe(struct platform_device *pdev) ...@@ -776,13 +776,17 @@ static int ulite_probe(struct platform_device *pdev)
pdata->clk = NULL; pdata->clk = NULL;
} }
ret = clk_prepare(pdata->clk); ret = clk_prepare_enable(pdata->clk);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to prepare clock\n"); dev_err(&pdev->dev, "Failed to prepare clock\n");
return ret; return ret;
} }
return ulite_assign(&pdev->dev, id, res->start, irq, pdata); ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
clk_disable(pdata->clk);
return ret;
} }
static int ulite_remove(struct platform_device *pdev) static int ulite_remove(struct platform_device *pdev)
......
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