Skip to content

Commit

Permalink
ARM: OMAP: dmtimer: switch-over to platform device driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tarun Kanti DebBarma authored and Tony Lindgren committed Sep 21, 2011
1 parent df28472 commit 3392cdd
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 248 deletions.
20 changes: 20 additions & 0 deletions arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,3 +478,23 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused)

return ret;
}

/**
* omap2_dm_timer_init - top level regular device initialization
*
* Uses dedicated hwmod api to parse through hwmod database for
* given class name and then build and register the timer device.
*/
static int __init omap2_dm_timer_init(void)
{
int ret;

ret = omap_hwmod_for_each_by_class("timer", omap_timer_init, NULL);
if (unlikely(ret)) {
pr_err("%s: device registration failed.\n", __func__);
return -EINVAL;
}

return 0;
}
arch_initcall(omap2_dm_timer_init);
Loading

0 comments on commit 3392cdd

Please sign in to comment.