Re: [PATCH v13 10/11] OMAP: dmtimer: mark clocksource and clockevent timers reserved
Tarun, On 4/25/2011 3:11 PM, DebBarma, Tarun Kanti wrote: In driver probe use sys_timer_reserved to identify which all timers have already been used for clocksource and clockevent. Mark all those timers as reserved so that no one else can use them. Signed-off-by: Tarun Kanti DebBarma --- Changed CONFIG_ARCH_OMAP2 to CONFIG_ARCH_OMAP2PLUS. arch/arm/plat-omap/dmtimer.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index e15b3a8..14d01ec 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -554,7 +554,13 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev) timer->id = pdev->id; timer->irq = irq->start; timer->pdev = pdev; - timer->reserved = 0; +#if defined(CONFIG_ARCH_OMAP2PLUS) Do you really need this. You might want to reserve timer on OMAP1 as well. Avoid #ifdefery + /* Mark clocksource and clockevent timers as reserved */ + if ((sys_timer_reserved>> (pdev->id - 1))& 0x1) + timer->reserved = 1; + else +#endif + timer->reserved = 0; /* Skip pm_runtime_enable for OMAP1 */ if (!pdata->needs_manual_reset) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v13 10/11] OMAP: dmtimer: mark clocksource and clockevent timers reserved
In driver probe use sys_timer_reserved to identify which all timers have already been used for clocksource and clockevent. Mark all those timers as reserved so that no one else can use them. Signed-off-by: Tarun Kanti DebBarma --- Changed CONFIG_ARCH_OMAP2 to CONFIG_ARCH_OMAP2PLUS. arch/arm/plat-omap/dmtimer.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index e15b3a8..14d01ec 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -554,7 +554,13 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev) timer->id = pdev->id; timer->irq = irq->start; timer->pdev = pdev; - timer->reserved = 0; +#if defined(CONFIG_ARCH_OMAP2PLUS) + /* Mark clocksource and clockevent timers as reserved */ + if ((sys_timer_reserved >> (pdev->id - 1)) & 0x1) + timer->reserved = 1; + else +#endif + timer->reserved = 0; /* Skip pm_runtime_enable for OMAP1 */ if (!pdata->needs_manual_reset) -- 1.6.0.4 0010-OMAP-dmtimer-mark-clocksource-and-clockevent-timer.patch Description: 0010-OMAP-dmtimer-mark-clocksource-and-clockevent-timer.patch
RE: [PATCH v13 10/11] OMAP: dmtimer: mark clocksource and clockevent timers reserved
> -Original Message- > From: Shilimkar, Santosh > Sent: Sunday, April 17, 2011 11:42 AM > To: DebBarma, Tarun Kanti > Cc: linux-omap@vger.kernel.org > Subject: Re: [PATCH v13 10/11] OMAP: dmtimer: mark clocksource and > clockevent timers reserved > > On 4/16/2011 9:21 PM, Tarun Kanti DebBarma wrote: > > In driver probe use sys_timer_reserved to identify which all timers > > have already been used for clocksource and clockevent. Mark all those > > timers as reserved so that no one else can use them. > > > > Signed-off-by: Tarun Kanti DebBarma > > --- > > arch/arm/plat-omap/dmtimer.c |8 +++- > > 1 files changed, 7 insertions(+), 1 deletions(-) > > > > diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c > > index e15b3a8..8b6fd22 100644 > > --- a/arch/arm/plat-omap/dmtimer.c > > +++ b/arch/arm/plat-omap/dmtimer.c > > @@ -554,7 +554,13 @@ static int __devinit omap_dm_timer_probe(struct > platform_device *pdev) > > timer->id = pdev->id; > > timer->irq = irq->start; > > timer->pdev = pdev; > > - timer->reserved = 0; > > +#if defined(CONFIG_ARCH_OMAP2) > > Do you mean CONFIG_ARCH_OMAP2PLUS here ? Yes, I will correct. Thanks. -- Tarun > > > + /* Mark clocksource and clockevent timers as reserved */ > > + if ((sys_timer_reserved>> (pdev->id - 1))& 0x1) > > + timer->reserved = 1; > > + else > > +#endif > > + timer->reserved = 0; > > > > /* Skip pm_runtime_enable for OMAP1 */ > > if (!pdata->needs_manual_reset) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v13 10/11] OMAP: dmtimer: mark clocksource and clockevent timers reserved
On 4/16/2011 9:21 PM, Tarun Kanti DebBarma wrote: In driver probe use sys_timer_reserved to identify which all timers have already been used for clocksource and clockevent. Mark all those timers as reserved so that no one else can use them. Signed-off-by: Tarun Kanti DebBarma --- arch/arm/plat-omap/dmtimer.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index e15b3a8..8b6fd22 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -554,7 +554,13 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev) timer->id = pdev->id; timer->irq = irq->start; timer->pdev = pdev; - timer->reserved = 0; +#if defined(CONFIG_ARCH_OMAP2) Do you mean CONFIG_ARCH_OMAP2PLUS here ? + /* Mark clocksource and clockevent timers as reserved */ + if ((sys_timer_reserved>> (pdev->id - 1))& 0x1) + timer->reserved = 1; + else +#endif + timer->reserved = 0; /* Skip pm_runtime_enable for OMAP1 */ if (!pdata->needs_manual_reset) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html