All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-core] IMX25 timer access patch
       [not found] <4F8FE2A9.8080303@domain.hid>
@ 2012-04-19 10:10 ` Gilles Chanteperdrix
  2012-04-19 10:55 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-19 10:10 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: Xenomai core

On 04/19/2012 12:02 PM, Michael Trimarchi wrote:
> Hi,
> 
> I will send a proper patch. Is it possible to include in the ipipe-arm branch?

Please use the public mailing lists.

What exactly are you trying to fix ? What version of kernel ? The
ipipe-arm kernels are compile-tested, so, the code as is is correct
(except that maybe I did not compile-test imx25). If what you are trying
to fix is compilation for non-vanilla kernels, then the answer is no,
the ipipe-arm branches only support vanilla kernels.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xenomai-core] IMX25 timer access patch
       [not found] <4F8FE2A9.8080303@domain.hid>
  2012-04-19 10:10 ` [Xenomai-core] IMX25 timer access patch Gilles Chanteperdrix
@ 2012-04-19 10:55 ` Gilles Chanteperdrix
       [not found]   ` <4F8FF141.1020805@domain.hid>
  2012-04-20 15:07   ` [Adeos-main] " Michael Trimarchi
  1 sibling, 2 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-19 10:55 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: Adeos, Xenomai core

On 04/19/2012 12:02 PM, Michael Trimarchi wrote:
> Hi,
> 
> I will send a proper patch. Is it possible to include in the ipipe-arm branch?
> 
> Michael

Yes, OK. Please resend the patch to the xenomai-core, or adeos-main
mailing list, I see ipipe-arm is broken since at least 2.6.33. It
compiles but probably does not work.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Xenomai-core] IMX25 timer access patch
       [not found]   ` <4F8FF141.1020805@domain.hid>
@ 2012-04-19 11:12     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 10+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-19 11:12 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: Adeos, Xenomai core

On 04/19/2012 01:04 PM, Michael Trimarchi wrote:
> Hi 
> On 04/19/2012 12:55 PM, Gilles Chanteperdrix wrote:
>> On 04/19/2012 12:02 PM, Michael Trimarchi wrote:
>>> Hi,
>>>
>>> I will send a proper patch. Is it possible to include in the ipipe-arm branch?
>>>
>>> Michael
>>
>> Yes, OK. Please resend the patch to the xenomai-core, or adeos-main
>> mailing list, I see ipipe-arm is broken since at least 2.6.33. It
>> compiles but probably does not work.
>>
> 
> I will send the two patches for the imx25.

Yes, and please provide an accurate commit log: the patch fixes more
than imx25.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-19 10:55 ` Gilles Chanteperdrix
       [not found]   ` <4F8FF141.1020805@domain.hid>
@ 2012-04-20 15:07   ` Michael Trimarchi
  2012-04-20 15:32     ` Gilles Chanteperdrix
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Trimarchi @ 2012-04-20 15:07 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Adeos, Michael Trimarchi

Hi Gilles

This is my version:

commit be8ccd4a39708cef6e67e4e00432d0207e596a76
Author: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Date:   Wed Feb 23 01:38:09 2011 +0100

    forward port, rebase on 3.0-noarch, adeos-ipipe-3.0.13-arm-1.18-05


on top of it I have my board patches and this commit for an error of the timer precision

commit fff6198ec1033e55d42cc24914b6b958365d7495
Author: Mehnert, Torsten <T.Mehnert@domain.hid>
Date:   Mon Aug 1 08:02:07 2011 +0000

    i.MX25 GPT clock fix: ensure correct the clock source
    
    Request for comment and commit.
    
    From: T. Mehnert <t.mehnert@domain.hid>
    Date: Mon, 4 Jul 2011 15:53:30 +0200
    Subject: [PATCH] i.MX25 GPT clock fix: ensure correct the clock source
    
    This patch ensures, that Linux will take the correct clock source (AHB_DIV)
    for gpt in the ARM i.MX25 implementation. The currect code depends on the re
    defaults of the CCM_MCR register. So on some boards it could happen that the
    UPLL is used for clock source, which results in faulty time behavior in Linu
    In this case all delays or sleeps will will be faktor 1.8 too long.
    
    Signed-off-by: Torsten Mehnert <t.mehnert@domain.hid>
    Signed-off-by: Sascha Hauer <s.hauer@domain.hid>


On 04/19/2012 12:55 PM, Gilles Chanteperdrix wrote:
> On 04/19/2012 12:02 PM, Michael Trimarchi wrote:
>> Hi,
>>
>> I will send a proper patch. Is it possible to include in the ipipe-arm branch?
>>
>> Michael
> 
> Yes, OK. Please resend the patch to the xenomai-core, or adeos-main
> mailing list, I see ipipe-arm is broken since at least 2.6.33. It
> compiles but probably does not work.
> 

I'm still debugging my imx25 board, and I have problem with the timer. If I execute
clocktest for xenomai after some while I have:


now at 2897236425903 nsecs

cpu: 0
 clock 0:
  .base:       c04f26a8
  .index:      0
  .resolution: 1 nsecs
  .get_time:   ktime_get
  .offset:     0 nsecs
active timers:
 #0: <c04f2c00>, tick_sched_timer, S:01
 # expires at 2889380000000-2889380000000 nsecs [in -7856425903 to -7856425903 nsecs]
 #1: <c3aa1f38>, hrtimer_wakeup, S:01
 # expires at 2889470961229-2889471011229 nsecs [in -7765464674 to -7765414674 nsecs]
 #2: <c3a97f38>, hrtimer_wakeup, S:01
 # expires at 2889508847229-2889508897229 nsecs [in -7727578674 to -7727528674 nsecs]
 #3: <c0510648>, sched_rt_period_timer, S:01
 # expires at 2890000000000-2890000000000 nsecs [in -7236425903 to -7236425903 nsecs]
 #4: <c04f2d68>, watchdog_timer_fn, S:01
 # expires at 2892070000002-2892070000002 nsecs [in -5166425901 to -5166425901 nsecs]


And I don't have any tick from the i.Mx timer until they wrap again to be positive.
Can you suggest some way to debug? Do you know what it can happen?

Michael


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-20 15:07   ` [Adeos-main] " Michael Trimarchi
@ 2012-04-20 15:32     ` Gilles Chanteperdrix
  2012-04-20 16:06       ` Michael Trimarchi
  0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-20 15:32 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: Adeos, Michael Trimarchi

On 04/20/2012 05:07 PM, Michael Trimarchi wrote:
> Hi Gilles
> 
> This is my version:
> 
> commit be8ccd4a39708cef6e67e4e00432d0207e596a76
> Author: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
> Date:   Wed Feb 23 01:38:09 2011 +0100
> 
>     forward port, rebase on 3.0-noarch, adeos-ipipe-3.0.13-arm-1.18-05
> 
> 
> on top of it I have my board patches and this commit for an error of the timer precision
> 
> commit fff6198ec1033e55d42cc24914b6b958365d7495
> Author: Mehnert, Torsten <T.Mehnert@domain.hid>
> Date:   Mon Aug 1 08:02:07 2011 +0000
> 
>     i.MX25 GPT clock fix: ensure correct the clock source
>     
>     Request for comment and commit.
>     
>     From: T. Mehnert <t.mehnert@domain.hid>
>     Date: Mon, 4 Jul 2011 15:53:30 +0200
>     Subject: [PATCH] i.MX25 GPT clock fix: ensure correct the clock source
>     
>     This patch ensures, that Linux will take the correct clock source (AHB_DIV)
>     for gpt in the ARM i.MX25 implementation. The currect code depends on the re
>     defaults of the CCM_MCR register. So on some boards it could happen that the
>     UPLL is used for clock source, which results in faulty time behavior in Linu
>     In this case all delays or sleeps will will be faktor 1.8 too long.
>     
>     Signed-off-by: Torsten Mehnert <t.mehnert@domain.hid>
>     Signed-off-by: Sascha Hauer <s.hauer@domain.hid>
> 
> 
> On 04/19/2012 12:55 PM, Gilles Chanteperdrix wrote:
>> On 04/19/2012 12:02 PM, Michael Trimarchi wrote:
>>> Hi,
>>>
>>> I will send a proper patch. Is it possible to include in the ipipe-arm branch?
>>>
>>> Michael
>>
>> Yes, OK. Please resend the patch to the xenomai-core, or adeos-main
>> mailing list, I see ipipe-arm is broken since at least 2.6.33. It
>> compiles but probably does not work.
>>
> 
> I'm still debugging my imx25 board, and I have problem with the timer. If I execute
> clocktest for xenomai after some while I have:
> 
> 
> now at 2897236425903 nsecs
> 
> cpu: 0
>  clock 0:
>   .base:       c04f26a8
>   .index:      0
>   .resolution: 1 nsecs
>   .get_time:   ktime_get
>   .offset:     0 nsecs
> active timers:
>  #0: <c04f2c00>, tick_sched_timer, S:01
>  # expires at 2889380000000-2889380000000 nsecs [in -7856425903 to -7856425903 nsecs]
>  #1: <c3aa1f38>, hrtimer_wakeup, S:01
>  # expires at 2889470961229-2889471011229 nsecs [in -7765464674 to -7765414674 nsecs]
>  #2: <c3a97f38>, hrtimer_wakeup, S:01
>  # expires at 2889508847229-2889508897229 nsecs [in -7727578674 to -7727528674 nsecs]
>  #3: <c0510648>, sched_rt_period_timer, S:01
>  # expires at 2890000000000-2890000000000 nsecs [in -7236425903 to -7236425903 nsecs]
>  #4: <c04f2d68>, watchdog_timer_fn, S:01
>  # expires at 2892070000002-2892070000002 nsecs [in -5166425901 to -5166425901 nsecs]
> 
> 
> And I don't have any tick from the i.Mx timer until they wrap again to be positive.
> Can you suggest some way to debug? Do you know what it can happen?

If you have CONFIG_MXC_IRQ_PRIO enabled, disable it, this option is
incompatible with xenomai.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-20 15:32     ` Gilles Chanteperdrix
@ 2012-04-20 16:06       ` Michael Trimarchi
  2012-04-20 16:17         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Trimarchi @ 2012-04-20 16:06 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Adeos, Michael Trimarchi

Hi

On 04/20/2012 05:32 PM, Gilles Chanteperdrix wrote:
> On 04/20/2012 05:07 PM, Michael Trimarchi wrote:
>> Hi Gilles
>>
>> This is my version:
>>
>> commit be8ccd4a39708cef6e67e4e00432d0207e596a76
>> Author: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
>> Date:   Wed Feb 23 01:38:09 2011 +0100
>>
>>     forward port, rebase on 3.0-noarch, adeos-ipipe-3.0.13-arm-1.18-05
>>
>>
>> on top of it I have my board patches and this commit for an error of the timer precision
>>
>> commit fff6198ec1033e55d42cc24914b6b958365d7495
>> Author: Mehnert, Torsten <T.Mehnert@domain.hid>
>> Date:   Mon Aug 1 08:02:07 2011 +0000
>>
>>     i.MX25 GPT clock fix: ensure correct the clock source
>>     
>>     Request for comment and commit.
>>     
>>     From: T. Mehnert <t.mehnert@domain.hid>
>>     Date: Mon, 4 Jul 2011 15:53:30 +0200
>>     Subject: [PATCH] i.MX25 GPT clock fix: ensure correct the clock source
>>     
>>     This patch ensures, that Linux will take the correct clock source (AHB_DIV)
>>     for gpt in the ARM i.MX25 implementation. The currect code depends on the re
>>     defaults of the CCM_MCR register. So on some boards it could happen that the
>>     UPLL is used for clock source, which results in faulty time behavior in Linu
>>     In this case all delays or sleeps will will be faktor 1.8 too long.
>>     
>>     Signed-off-by: Torsten Mehnert <t.mehnert@domain.hid>
>>     Signed-off-by: Sascha Hauer <s.hauer@domain.hid>
>>
>>
>> On 04/19/2012 12:55 PM, Gilles Chanteperdrix wrote:
>>> On 04/19/2012 12:02 PM, Michael Trimarchi wrote:
>>>> Hi,
>>>>
>>>> I will send a proper patch. Is it possible to include in the ipipe-arm branch?
>>>>
>>>> Michael
>>>
>>> Yes, OK. Please resend the patch to the xenomai-core, or adeos-main
>>> mailing list, I see ipipe-arm is broken since at least 2.6.33. It
>>> compiles but probably does not work.
>>>
>>
>> I'm still debugging my imx25 board, and I have problem with the timer. If I execute
>> clocktest for xenomai after some while I have:
>>
>>
>> now at 2897236425903 nsecs
>>
>> cpu: 0
>>  clock 0:
>>   .base:       c04f26a8
>>   .index:      0
>>   .resolution: 1 nsecs
>>   .get_time:   ktime_get
>>   .offset:     0 nsecs
>> active timers:
>>  #0: <c04f2c00>, tick_sched_timer, S:01
>>  # expires at 2889380000000-2889380000000 nsecs [in -7856425903 to -7856425903 nsecs]
>>  #1: <c3aa1f38>, hrtimer_wakeup, S:01
>>  # expires at 2889470961229-2889471011229 nsecs [in -7765464674 to -7765414674 nsecs]
>>  #2: <c3a97f38>, hrtimer_wakeup, S:01
>>  # expires at 2889508847229-2889508897229 nsecs [in -7727578674 to -7727528674 nsecs]
>>  #3: <c0510648>, sched_rt_period_timer, S:01
>>  # expires at 2890000000000-2890000000000 nsecs [in -7236425903 to -7236425903 nsecs]
>>  #4: <c04f2d68>, watchdog_timer_fn, S:01
>>  # expires at 2892070000002-2892070000002 nsecs [in -5166425901 to -5166425901 nsecs]
>>
>>
>> And I don't have any tick from the i.Mx timer until they wrap again to be positive.
>> Can you suggest some way to debug? Do you know what it can happen?
> 
> If you have CONFIG_MXC_IRQ_PRIO enabled, disable it, this option is
> incompatible with xenomai.
> 

It's already disable. 

# CONFIG_MACH_EUKREA_CPUIMX25 is not set
# CONFIG_MXC_IRQ_PRIOR is not set
CONFIG_MXC_AVIC=y
CONFIG_MXC_PWM=y


During clock test it stuck for a while and then start again 

# /usr/bin/clocktest 
== Tested clock: 0 (CLOCK_REALTIME)
CPU      ToD offset [us] ToD drift [us/s]      warps max delta [us]
--- -------------------- ---------------- ---------- --------------
  0             662480.6           -0.033          0            0.0

Michael


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-20 16:06       ` Michael Trimarchi
@ 2012-04-20 16:17         ` Gilles Chanteperdrix
  2012-04-20 16:43           ` Michael Trimarchi
  0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-20 16:17 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: Adeos, Michael Trimarchi

On 04/20/2012 06:06 PM, Michael Trimarchi wrote:
> During clock test it stuck for a while and then start again 

Have you read tip #4 in the "Tips and tricks" section of the porting
I-pipe to ARM linux document?

http://www.xenomai.org/index.php/I-pipe:ArmPorting#Tips_and_tricks.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-20 16:17         ` Gilles Chanteperdrix
@ 2012-04-20 16:43           ` Michael Trimarchi
  2012-04-20 16:45             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Trimarchi @ 2012-04-20 16:43 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Adeos, Michael Trimarchi

On 04/20/2012 06:17 PM, Gilles Chanteperdrix wrote:
> On 04/20/2012 06:06 PM, Michael Trimarchi wrote:
>> During clock test it stuck for a while and then start again 
> 
> Have you read tip #4 in the "Tips and tricks" section of the porting
> I-pipe to ARM linux document?
> 

gettimeoffset?

> http://www.xenomai.org/index.php/I-pipe:ArmPorting#Tips_and_tricks.
> 

btw this is another potential bug... I will send as a separate patch

        if (timer_is_v1()) {
                tsc_info.u.counter_paddr = phys + MX1_2_TCN;
-               tsc_info.counter_vaddr =(unsigned long)(phys + MX1_2_TCN);
+               tsc_info.counter_vaddr = (unsigned long)(timer_base + MX1_2_TCN)
        } else {
                tsc_info.u.counter_paddr = phys + V2_TCN;
                tsc_info.counter_vaddr = (unsigned long)(timer_base + V2_TCN);

Michael


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-20 16:43           ` Michael Trimarchi
@ 2012-04-20 16:45             ` Gilles Chanteperdrix
  2012-04-20 17:07               ` Michael Trimarchi
  0 siblings, 1 reply; 10+ messages in thread
From: Gilles Chanteperdrix @ 2012-04-20 16:45 UTC (permalink / raw)
  To: Michael Trimarchi; +Cc: Adeos, Michael Trimarchi

On 04/20/2012 06:43 PM, Michael Trimarchi wrote:
> On 04/20/2012 06:17 PM, Gilles Chanteperdrix wrote:
>> On 04/20/2012 06:06 PM, Michael Trimarchi wrote:
>>> During clock test it stuck for a while and then start again 
>>
>> Have you read tip #4 in the "Tips and tricks" section of the porting
>> I-pipe to ARM linux document?
>>
> 
> gettimeoffset?

No. RTFL

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Adeos-main] IMX25 timer access patch
  2012-04-20 16:45             ` Gilles Chanteperdrix
@ 2012-04-20 17:07               ` Michael Trimarchi
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Trimarchi @ 2012-04-20 17:07 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Adeos, Michael Trimarchi

Hi

On 04/20/2012 06:45 PM, Gilles Chanteperdrix wrote:
> On 04/20/2012 06:43 PM, Michael Trimarchi wrote:
>> On 04/20/2012 06:17 PM, Gilles Chanteperdrix wrote:
>>> On 04/20/2012 06:06 PM, Michael Trimarchi wrote:
>>>> During clock test it stuck for a while and then start again 
>>>
>>> Have you read tip #4 in the "Tips and tricks" section of the porting
>>> I-pipe to ARM linux document?
>>>
>>
>> gettimeoffset?
> 
> No. RTFL
> 

Thank you

Ok I think that I have fixed this too. Let me do some tests and the I will
post all the patches

Michael

-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-20 17:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4F8FE2A9.8080303@domain.hid>
2012-04-19 10:10 ` [Xenomai-core] IMX25 timer access patch Gilles Chanteperdrix
2012-04-19 10:55 ` Gilles Chanteperdrix
     [not found]   ` <4F8FF141.1020805@domain.hid>
2012-04-19 11:12     ` Gilles Chanteperdrix
2012-04-20 15:07   ` [Adeos-main] " Michael Trimarchi
2012-04-20 15:32     ` Gilles Chanteperdrix
2012-04-20 16:06       ` Michael Trimarchi
2012-04-20 16:17         ` Gilles Chanteperdrix
2012-04-20 16:43           ` Michael Trimarchi
2012-04-20 16:45             ` Gilles Chanteperdrix
2012-04-20 17:07               ` Michael Trimarchi

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.