1
0
Fork 0

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: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Shubhrajyoti Datta 2018-08-06 14:22:11 +05:30 committed by Greg Kroah-Hartman
parent 9d7c249a1e
commit ea42d7a67a
1 changed files with 6 additions and 2 deletions

View File

@ -776,13 +776,17 @@ static int ulite_probe(struct platform_device *pdev)
pdata->clk = NULL;
}
ret = clk_prepare(pdata->clk);
ret = clk_prepare_enable(pdata->clk);
if (ret) {
dev_err(&pdev->dev, "Failed to prepare clock\n");
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)