On 12/15/2012 02:56 PM, Gilles Chanteperdrix wrote:
> On 12/15/2012 02:31 PM, GUGLIELMO NAVARRA wrote:
>
>> Thanks for your reply,
>> my tsc_info definition is:
>>
>> /*------------------------------------------------
>> Timer che utilizza IPIPE
>> -------------------------------------------------*/
>> #ifdef CONFIG_IPIPE
>> static struct __ipipe_tscinfo tsc_info = {
>> .type = IPIPE_TSC_TYPE_FREERUNNING,
>> .u = {
>> {
>> .mask = 0xffffffff,
>> },
>> },
>> };
>>
>> static void l138_xenomai_tsc_init(void)
>> {
>> struct timer_s *t = &timers[TID_CLOCKSOURCE];
>>
>> tsc_info.type = IPIPE_TSC_TYPE_FREERUNNING;
>> tsc_info.freq = l138_clock_tick_rate;
>
>> tsc_info.counter_vaddr = (unsigned long)(t->base + t->tim_off);
>
>> tsc_info.u.counter_paddr = DAVINCI_TIMER0_BASE + TIM12;
>
>
> What about t->tim_off ?
Also, if t->base can be something else than the result of an
ioremap(DAVINCI_TIMER0_BASE), then you should not hardcode
DAVINCI_TIMER0_BASE, as other boards may pass a different value, rather,
you should add a phys_base to "struct timer_s", and set it correctly for
each possible physical address.
--
Gilles.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai