> -----Original Message----- > From: Varadarajan, Charulatha > Sent: Tuesday, December 07, 2010 11:16 AM > To: DebBarma, Tarun Kanti > Cc: linux-omap@xxxxxxxxxxxxxxx; Gopinath, Thara > Subject: Re: [PATCH v5 8/12] OMAP2+: dmtimer: convert to platform devices > > Tarun, > > On Tue, Dec 7, 2010 at 05:14, Tarun Kanti DebBarma <tarun.kanti@xxxxxx> > wrote: > > Add routines to converts dmtimers to platform devices. The device data > > is obtained from hwmod database of respective platform and is registered > > to device model after successful binding to driver. It also provides > > provision to access timers during early boot when pm_runtime framework > > is not completely up and running. > > > > Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@xxxxxx> > > Signed-off-by: Thara Gopinath <thara@xxxxxx> > > Reviewed-by: Cousson, Benoit <b-cousson@xxxxxx> > > Reviewed-by: Varadarajan, Charulatha <charu@xxxxxx> > > --- > > arch/arm/mach-omap2/Makefile | 2 +- > > arch/arm/mach-omap2/dmtimer.c | 174 > +++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 175 insertions(+), 1 deletions(-) > > create mode 100644 arch/arm/mach-omap2/dmtimer.c > > > > <<snip>> > > > +/** > > + * omap_timer_init - build and register timer device with an > > + * associated timer hwmod > > + * @oh: timer hwmod pointer to be used to build timer device > > + * @user: parameter that can be passed from calling hwmod API > > + * > > + * Called by omap_hwmod_for_each_by_class to register each of the timer > > + * devices present in the system. The number of timer devices is known > > + * by parsing through the hwmod database for a given class name. At the > > + * end of function call memory is allocated for timer device and it is > > + * registered to the framework ready to be proved by the driver. > > + */ > > +static int __init omap_timer_init(struct omap_hwmod *oh, void *user) > > +{ > > + int id; > > + int ret = 0; > > + char *name = "omap_timer"; > > + struct dmtimer_platform_data *pdata; > > + struct omap_device *od; > > + > > + pr_debug("%s: %s\n", __func__, oh->name); > > + > > + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); > > + if (!pdata) { > > + pr_err("%s: No memory for [%s]\n", __func__, oh->name); > > + return -ENOMEM; > > + } > > + > > + if (user) > > Check for the value of "user". Ok. > > > + pdata->is_early_init = 1; > > + else > > + pdata->is_early_init = 0; > > + > > + /* hook clock set/get functions */ > > + pdata->set_timer_src = omap2_dm_timer_set_src; > > + > > <<snip>> -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html