devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: device-tree <devicetree-discuss@lists.ozlabs.org>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-omap <linux-omap@vger.kernel.org>,
	linux-arm <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V3 1/5] ARM: dts: OMAP: Add timer nodes
Date: Thu, 25 Oct 2012 07:33:37 -0500	[thread overview]
Message-ID: <508931A1.50608@ti.com> (raw)
In-Reply-To: <50892E27.7070102@ti.com>


On 10/25/2012 07:18 AM, Jon Hunter wrote:

...

>> @@ -113,6 +114,9 @@ static int omap_timer_interrupt_test(struct omap_dm_timer *gptimer)
>>
>>         irq_data.gptimer = gptimer;
>>         init_completion(&irq_data.complete);
>> +
>> +       omap_dm_timer_enable(gptimer);
>> +
>>         omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
>>         omap_dm_timer_set_load_start(gptimer, 0, 0xffffff00);
>>
>> @@ -128,6 +132,8 @@ static int omap_timer_interrupt_test(struct omap_dm_timer *gptimer)
>>
>>         omap_dm_timer_stop(gptimer);
>>         omap_dm_timer_set_int_enable(gptimer, 0);
>> +       omap_dm_timer_disable(gptimer);
>> +
> 
> Hmmm ... I am wondering if there is another bug lingering in the dmtimer
> driver. Ideally, the context should be preserved by the driver.

Looking at omap_dm_timer_set_load_start() we have the following code to
restore context ...

if (!(timer->capability & OMAP_TIMER_ALWON)) {
	if (omap_pm_get_dev_context_loss_count(&timer->pdev->dev) !=
			timer->ctx_loss_count)		
		omap_timer_restore_context(timer);
}

Can you see if this is getting called for AM33xx for the failing timers?
If not then it would suggest that we are not detecting context loss
correctly and not restoring the context. With the above context restore
code we should not need those extra omap_dm_timer_enable/disable calls.

Cheers
Jon


  reply	other threads:[~2012-10-25 12:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 18:01 [PATCH V3 0/5] ARM: OMAP2+: Add device-tree support for timers Jon Hunter
2012-10-17 18:01 ` [PATCH V3 1/5] ARM: dts: OMAP: Add timer nodes Jon Hunter
2012-10-24 18:17   ` Hiremath, Vaibhav
     [not found]     ` <79CD15C6BA57404B839C016229A409A83EB49C1B-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-10-24 23:00       ` Jon Hunter
2012-10-25 12:12         ` Hiremath, Vaibhav
2012-10-25 12:18           ` Jon Hunter
2012-10-25 12:33             ` Jon Hunter [this message]
2012-10-25 15:51               ` Hiremath, Vaibhav
2012-10-25 15:27             ` Hiremath, Vaibhav
2012-10-25 18:38               ` Jon Hunter
2012-10-17 18:01 ` [PATCH V3 2/5] ARM: OMAP3: Dynamically disable secure timer nodes for secure devices Jon Hunter
2012-10-17 18:01 ` [PATCH V3 3/5] ARM: OMAP: Add function to request a timer by capability Jon Hunter
2012-10-17 18:01 ` [PATCH V3 4/5] ARM: OMAP3: Add generic machine descriptor for boards with OMAP3 GP devices Jon Hunter
2012-10-17 18:01 ` [PATCH V3 5/5] ARM: OMAP: Add DT support for timer driver Jon Hunter
2012-10-17 18:03 ` [PATCH V3 0/5] ARM: OMAP2+: Add device-tree support for timers Jon Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=508931A1.50608@ti.com \
    --to=jon-hunter@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=hvaibhav@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).