summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/timer.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2017-06-12 03:27:30 -0700
committerTony Lindgren <tony@atomide.com>2017-06-12 03:27:30 -0700
commit67d00470accf5c58abbb23a44c867c5f15437976 (patch)
tree4141a408b08ec38c6d3cf0295641ce3e8a63182b /arch/arm/mach-omap2/timer.c
parent018b732458ac39c4858d9840c0e32310bc0930dd (diff)
parent70f05be3213393f20f01e4d59625df7ee49fe32f (diff)
downloadlinux-67d00470accf5c58abbb23a44c867c5f15437976.tar.bz2
Merge branch 'omap-for-v4.13/clkctrl' into omap-for-v4.13/soc-v4
Diffstat (limited to 'arch/arm/mach-omap2/timer.c')
-rw-r--r--arch/arm/mach-omap2/timer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index ce982d193046..6a861c0ac343 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -272,6 +272,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
timer->io_base = of_iomap(np, 0);
+ timer->fclk = of_clk_get_by_name(np, "fck");
+
of_node_put(np);
oh = omap_hwmod_lookup(oh_name);
@@ -286,7 +288,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
omap_hwmod_setup_one(oh_name);
/* After the dmtimer is using hwmod these clocks won't be needed */
- timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
+ if (IS_ERR_OR_NULL(timer->fclk))
+ timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
if (IS_ERR(timer->fclk))
return PTR_ERR(timer->fclk);