summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>2018-08-06 10:52:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-18 16:07:23 +0200
commitea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f (patch)
tree55820fe77ef16c6eceeba9d06f38451d6d6ab8da /drivers/tty
parentserial: 8250: drop the printk from serial8250_interrupt() (diff)
downloadlinux-ea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f.tar.xz
linux-ea42d7a67a9e2b2e780eacbf9b2c3848c9ce2a0f.zip
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.c8
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)