All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] ADEOS NIOS II port - definitions in include/asm-nios2/ipipe.h
@ 2011-04-08 15:21 Martin Elshuber
  2011-04-11 13:36 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Elshuber @ 2011-04-08 15:21 UTC (permalink / raw)
  To: adeos-main

Hello,

I faced a problem with Xenomai xntimer when using the
http://download.gna.org/adeos/patches/v2.6/nios2/adeos-ipipe-2.6.30-nios2-1.2-00.patch
patch.

xntimer uses the ipipe abstractions for hrclock and hrtimer and relies 
on the constants

#define __ipipe_hrtimer_freq    1000000 /* 1 us */
#define __ipipe_hrclock_freq    nasys_clock_freq

defined in include/asm-nios2/ipipe.h to do a final adjustment.

The two definitions above will fail, if either the hrtimer is not 
clocked with 1Mhz, or
the hrclock is clocked with another frequency than nasys_clock_freq.
I am quite new to ADEOS, but guess that

#define __ipipe_hrtimer_freq    na_hrtimer_clock_freq
#define __ipipe_hrclock_freq    na_hrclock_clock_freq

is a better choice. At least for me this solves the problem.

Martin Elshuber



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

* Re: [Adeos-main] ADEOS NIOS II port - definitions in include/asm-nios2/ipipe.h
  2011-04-08 15:21 [Adeos-main] ADEOS NIOS II port - definitions in include/asm-nios2/ipipe.h Martin Elshuber
@ 2011-04-11 13:36 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2011-04-11 13:36 UTC (permalink / raw)
  To: Martin Elshuber; +Cc: adeos-main

On Fri, 2011-04-08 at 17:21 +0200, Martin Elshuber wrote:
> Hello,
> 
> I faced a problem with Xenomai xntimer when using the
> http://download.gna.org/adeos/patches/v2.6/nios2/adeos-ipipe-2.6.30-nios2-1.2-00.patch
> patch.
> 
> xntimer uses the ipipe abstractions for hrclock and hrtimer and relies 
> on the constants
> 
> #define __ipipe_hrtimer_freq    1000000 /* 1 us */
> #define __ipipe_hrclock_freq    nasys_clock_freq
> 
> defined in include/asm-nios2/ipipe.h to do a final adjustment.
> 
> The two definitions above will fail, if either the hrtimer is not 
> clocked with 1Mhz, or
> the hrclock is clocked with another frequency than nasys_clock_freq.
> I am quite new to ADEOS, but guess that
> 
> #define __ipipe_hrtimer_freq    na_hrtimer_clock_freq
> #define __ipipe_hrclock_freq    na_hrclock_clock_freq
> 
> is a better choice. At least for me this solves the problem.

Agreed, this was sloppy, only fitting the DE2 I used for porting Xenomai
over nios2 mmu-less, and I was just about to propagate this bug to the
next patch...

Yet another set of macro is involved (instead of na_*) with the new
design I've been using lately for the nio2mmu port over 2.6.35, but at
least they are consistent this time, wrt hrtimer/hrclock settings.
Thanks for the heads up.

> 
> Martin Elshuber
> 
> 
> _______________________________________________
> Adeos-main mailing list
> Adeos-main@domain.hid
> https://mail.gna.org/listinfo/adeos-main

-- 
Philippe.




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

end of thread, other threads:[~2011-04-11 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 15:21 [Adeos-main] ADEOS NIOS II port - definitions in include/asm-nios2/ipipe.h Martin Elshuber
2011-04-11 13:36 ` Philippe Gerum

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.