diff options
author | Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> | 2018-08-06 14:22:11 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-18 16:07:23 +0200 |
commit | ea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f (patch) | |
tree | 55820fe77ef16c6eceeba9d06f38451d6d6ab8da /drivers/tty | |
parent | 9d7c249a1ef9bf0d5696df14e6bc067004f16979 (diff) | |
download | linux-ea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f.tar.bz2 |
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/uartlite.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 98d3eadd2fd0..69411b6cc2a2 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c @@ -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) |