All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jon-hunter@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	device-tree <devicetree-discuss@lists.ozlabs.org>
Subject: Re: [GIT PULL] ARM: OMAP: Timer and Counter DT Updates for v3.8
Date: Thu, 8 Nov 2012 13:47:10 -0600	[thread overview]
Message-ID: <509C0C3E.6070204@ti.com> (raw)
In-Reply-To: <20121108173824.GE6801@atomide.com>


On 11/08/2012 11:38 AM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti.com> [121108 09:21]:
>>
>> On 11/07/2012 05:44 PM, Tony Lindgren wrote:
>>
>> That's a bugger. I completely missed your patch last week sorry (I will blame the Danish
>> beer) and had clearly not folded in to my testing!
> 
> :)
>  
>>> I guess we should apply the following fix somewhere or
>>> do we need to check other places too?
>>
>> I will re-test your master branch today and put it through my dmtimer tests to double check.
>> However, in general I did ensure that we checked pdata was not NULL before accessing when 
>> I introduced the dt stuff. In my changelog [1] I had ...
>>
>> "5. When device-tree is present the platform_data structure will be NULL and so check for
>> this."
>>
>> I just need to make sure that get_context_loss_count() is not called before checking it is
>> populated.  
> 
> OK
> 
>   
>>> +
>>> +	if (pdata) {
>>> +		timer->capability = pdata->timer_capability;
>>
>> You don't need this it is already handled a few lines before.
>>
>>> +		timer->get_context_loss_count = pdata->get_context_loss_count;
>>
>> We could probably move this too. For example ...
> 
> OK yeah makes sense to me.
> 
> Regards,
> 
> Tony
>  
>> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
>> index 38c12ef..9dca23e 100644
>> --- a/arch/arm/plat-omap/dmtimer.c
>> +++ b/arch/arm/plat-omap/dmtimer.c
>> @@ -799,12 +799,11 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
>>                 timer->id = pdev->id;
>>                 timer->capability = pdata->timer_capability;
>>                 timer->reserved = omap_dm_timer_reserved_systimer(timer->id);
>> +               timer->get_context_loss_count = pdata->get_context_loss_count;
>>         }
>>  
>>         timer->irq = irq->start;
>>         timer->pdev = pdev;
>> -       timer->capability = pdata->timer_capability;
>> -       timer->get_context_loss_count = pdata->get_context_loss_count;
>>  
>>         /* Skip pm_runtime_enable for OMAP1 */
>>         if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {

I have tested the dmtimers with this on the 3430-beagle and 4430-panda
with and without device tree and is working fine.

Do you want to generate the patch or me?

Cheers
Jon

>> [1] http://marc.info/?l=linux-omap&m=135065877008624&w=2

WARNING: multiple messages have this Message-ID (diff)
From: jon-hunter@ti.com (Jon Hunter)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] ARM: OMAP: Timer and Counter DT Updates for v3.8
Date: Thu, 8 Nov 2012 13:47:10 -0600	[thread overview]
Message-ID: <509C0C3E.6070204@ti.com> (raw)
In-Reply-To: <20121108173824.GE6801@atomide.com>


On 11/08/2012 11:38 AM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti.com> [121108 09:21]:
>>
>> On 11/07/2012 05:44 PM, Tony Lindgren wrote:
>>
>> That's a bugger. I completely missed your patch last week sorry (I will blame the Danish
>> beer) and had clearly not folded in to my testing!
> 
> :)
>  
>>> I guess we should apply the following fix somewhere or
>>> do we need to check other places too?
>>
>> I will re-test your master branch today and put it through my dmtimer tests to double check.
>> However, in general I did ensure that we checked pdata was not NULL before accessing when 
>> I introduced the dt stuff. In my changelog [1] I had ...
>>
>> "5. When device-tree is present the platform_data structure will be NULL and so check for
>> this."
>>
>> I just need to make sure that get_context_loss_count() is not called before checking it is
>> populated.  
> 
> OK
> 
>   
>>> +
>>> +	if (pdata) {
>>> +		timer->capability = pdata->timer_capability;
>>
>> You don't need this it is already handled a few lines before.
>>
>>> +		timer->get_context_loss_count = pdata->get_context_loss_count;
>>
>> We could probably move this too. For example ...
> 
> OK yeah makes sense to me.
> 
> Regards,
> 
> Tony
>  
>> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
>> index 38c12ef..9dca23e 100644
>> --- a/arch/arm/plat-omap/dmtimer.c
>> +++ b/arch/arm/plat-omap/dmtimer.c
>> @@ -799,12 +799,11 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
>>                 timer->id = pdev->id;
>>                 timer->capability = pdata->timer_capability;
>>                 timer->reserved = omap_dm_timer_reserved_systimer(timer->id);
>> +               timer->get_context_loss_count = pdata->get_context_loss_count;
>>         }
>>  
>>         timer->irq = irq->start;
>>         timer->pdev = pdev;
>> -       timer->capability = pdata->timer_capability;
>> -       timer->get_context_loss_count = pdata->get_context_loss_count;
>>  
>>         /* Skip pm_runtime_enable for OMAP1 */
>>         if (!(timer->capability & OMAP_TIMER_NEEDS_RESET)) {

I have tested the dmtimers with this on the 3430-beagle and 4430-panda
with and without device tree and is working fine.

Do you want to generate the patch or me?

Cheers
Jon

>> [1] http://marc.info/?l=linux-omap&m=135065877008624&w=2

  reply	other threads:[~2012-11-08 19:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02 18:59 [GIT PULL] ARM: OMAP: Timer and Counter DT Updates for v3.8 Jon Hunter
2012-11-02 18:59 ` Jon Hunter
2012-11-07  0:47 ` Tony Lindgren
2012-11-07  0:47   ` Tony Lindgren
2012-11-07 23:44   ` Tony Lindgren
2012-11-07 23:44     ` Tony Lindgren
2012-11-08 17:19     ` Jon Hunter
2012-11-08 17:19       ` Jon Hunter
2012-11-08 17:38       ` Tony Lindgren
2012-11-08 17:38         ` Tony Lindgren
2012-11-08 19:47         ` Jon Hunter [this message]
2012-11-08 19:47           ` Jon Hunter
2012-11-09  0:18           ` Jon Hunter
2012-11-09  0:18             ` Jon Hunter
2012-11-09 22:00             ` Tony Lindgren
2012-11-09 22:00               ` Tony Lindgren

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=509C0C3E.6070204@ti.com \
    --to=jon-hunter@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.