aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/timer.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2017-05-31 10:59:58 -0400
committerTony Lindgren <tony@atomide.com>2017-06-06 03:13:41 -0400
commit138f7ca78f5a0677f591fdf23d0309c2f4774bf7 (patch)
treea5d389995784063ffb081186277d34fb807840d7 /arch/arm/mach-omap2/timer.c
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
ARM: OMAP2+: timer: add support for fetching fck handle from DT
The mux clock handle shall be provided via "fck" DT handle. This avoids the need to lookup the main clock via hwmod core, which will not work with the clkctrl clock support anymore; the main clock is not going to be a mux. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
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 07dd692c4737..af90f95c2433 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -255,6 +255,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
255 255
256 timer->io_base = of_iomap(np, 0); 256 timer->io_base = of_iomap(np, 0);
257 257
258 timer->fclk = of_clk_get_by_name(np, "fck");
259
258 of_node_put(np); 260 of_node_put(np);
259 } else { 261 } else {
260 if (omap_dm_timer_reserve_systimer(timer->id)) 262 if (omap_dm_timer_reserve_systimer(timer->id))
@@ -292,7 +294,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
292 omap_hwmod_setup_one(oh_name); 294 omap_hwmod_setup_one(oh_name);
293 295
294 /* After the dmtimer is using hwmod these clocks won't be needed */ 296 /* After the dmtimer is using hwmod these clocks won't be needed */
295 timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh)); 297 if (IS_ERR_OR_NULL(timer->fclk))
298 timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
296 if (IS_ERR(timer->fclk)) 299 if (IS_ERR(timer->fclk))
297 return PTR_ERR(timer->fclk); 300 return PTR_ERR(timer->fclk);
298 301