diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2015-08-16 05:23:46 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-10-06 06:33:14 -0400 |
commit | 7d8d05d11473a169ab4d53bc7fc23d1fe3f1959f (patch) | |
tree | bee4e05c057bad03571e622f911fe391b684515b /drivers/misc/atmel_tclib.c | |
parent | eed9fb9df47898ea62d71be7dcc3b36d95819a7c (diff) |
misc: atmel_tclib: get and use slow clock
Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system
hang") added a workaround for the slow clock as it is not properly handled
by its users.
Get and use the slow clock as it is necessary for the timer counters.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/misc/atmel_tclib.c')
-rw-r--r-- | drivers/misc/atmel_tclib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c index 0ca05c3ec8d6..ac24a4bd63f7 100644 --- a/drivers/misc/atmel_tclib.c +++ b/drivers/misc/atmel_tclib.c | |||
@@ -125,6 +125,10 @@ static int __init tc_probe(struct platform_device *pdev) | |||
125 | if (IS_ERR(clk)) | 125 | if (IS_ERR(clk)) |
126 | return PTR_ERR(clk); | 126 | return PTR_ERR(clk); |
127 | 127 | ||
128 | tc->slow_clk = devm_clk_get(&pdev->dev, "slow_clk"); | ||
129 | if (IS_ERR(tc->slow_clk)) | ||
130 | return PTR_ERR(tc->slow_clk); | ||
131 | |||
128 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 132 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
129 | tc->regs = devm_ioremap_resource(&pdev->dev, r); | 133 | tc->regs = devm_ioremap_resource(&pdev->dev, r); |
130 | if (IS_ERR(tc->regs)) | 134 | if (IS_ERR(tc->regs)) |