aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/timer.c
diff options
context:
space:
mode:
authorTarun Kanti DebBarma <tarun.kanti@ti.com>2011-09-20 07:30:20 -0400
committerTony Lindgren <tony@atomide.com>2011-09-21 18:50:31 -0400
commit3392cdd33a0419e3226910a08b8bdc43b56c95d0 (patch)
treea5cf298efd7c9d3fc0a19e713ff7926bcbb938e9 /arch/arm/mach-omap2/timer.c
parentdf28472a1b28f5d2a6e5cf66265aa328995fde6b (diff)
ARM: OMAP: dmtimer: switch-over to platform device driver
Register timer devices by going through hwmod database using hwmod API. The driver probes each of the registered devices. Functionality which are already performed by hwmod framework are removed from timer code. New set of timers present on OMAP4 are now supported. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Acked-by: Cousson, Benoit <b-cousson@ti.com> [tony@atomide.com: folded in spinlock changes, left out is_omap2] 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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b2829ee0c4e4..9c2f58895a16 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -478,3 +478,23 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused)
478 478
479 return ret; 479 return ret;
480} 480}
481
482/**
483 * omap2_dm_timer_init - top level regular device initialization
484 *
485 * Uses dedicated hwmod api to parse through hwmod database for
486 * given class name and then build and register the timer device.
487 */
488static int __init omap2_dm_timer_init(void)
489{
490 int ret;
491
492 ret = omap_hwmod_for_each_by_class("timer", omap_timer_init, NULL);
493 if (unlikely(ret)) {
494 pr_err("%s: device registration failed.\n", __func__);
495 return -EINVAL;
496 }
497
498 return 0;
499}
500arch_initcall(omap2_dm_timer_init);