All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Lowell Gilbert <kludge@be-well.ilk.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Altera Cyclone V
Date: Thu, 09 Jan 2014 00:19:08 +0100	[thread overview]
Message-ID: <52CDDCEC.6030205@xenomai.org> (raw)
In-Reply-To: <44lhyqgkip.fsf@lowell-desk.lan>

On 01/08/2014 11:45 PM, Lowell Gilbert wrote:
> Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> writes:
> 
>> On 01/07/2014 08:52 PM, Lowell Gilbert wrote:
>>> What I'm hitting at the moment is that gt_setup() is getting called, 
>>> but twd_timer_setup() hasn't run yet, so the frequency isn't set yet. 
>>> Both functions are in __cpuinit, and the file would be used the same for
>>> other chips containing the Cortex A9, so I'm confused about what might
>>> be wrong.
>>
>> gt_setup is supposed to be called after twd_local_timer_common_register,
>> which calls twd_get_clock, which gets the timer frequency from the twd
>> clock node. If your SOC does not have a clock node for the twd clock,
>> then you should add one, because the calibration method yields unprecise
>> results, which may result in "early shots", meaning too many interrupts,
>> if the GT is not used as TSC.
> 
> But I do want the GT to be my TSC, no?

Yes, but that is not always possible, not all cortex A9 have a GT.
And as I said the calibration is imprecise, so, even if you do not get 
early shots, you will still have the Xenomai clock drifting fast from 
the Linux clock (if it is syncrhonized with ntp for instance).

> 
>>>
>>> Any pointers would be appreciated.
>>
>> See:
>> https://www.xenomai.org/index.php/I-pipe-core:ArmPorting
>> In particular, about this specific issue:
>>
>> https://www.xenomai.org/index.php/I-pipe-core:ArmPorting#The_Cortex-A9_case
> 
> Ah; I had read that as saying that the clock node would be part of the
> general A9 support. It should be the same for all chips using a Cortex
> A9, no? 

No, every ARM SOC has its own clocks implementation. This is currently 
changing with the switch to device tree, but not all SOCs are 
converted, at least not all of them were last time I checked. Anyway, 
if your SOC uses device tree, adding a clock may simply be a matter of 
adding it to the device tree.

> 
> Come to think of it, this is similar to my surprise at having to write
> my own __ipipe_mach_update_tsc(), which surprised me. I'm clearly still

No, you do not have to write your own __ipipe_mach_update_tsc(). See:
https://www.xenomai.org/index.php/I-pipe-core:ArmPorting#High_resolution_counter


-- 
                                                                Gilles.


  reply	other threads:[~2014-01-08 23:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 19:52 [Xenomai] Altera Cyclone V Lowell Gilbert
2014-01-07 20:25 ` Gilles Chanteperdrix
2014-01-08 22:45   ` Lowell Gilbert
2014-01-08 23:19     ` Gilles Chanteperdrix [this message]
2014-01-09 18:06       ` Lowell Gilbert
2014-01-10  0:14         ` Gilles Chanteperdrix
2014-01-14  0:15       ` Lowell Gilbert
2014-01-07 22:19 ` Charles Steinkuehler
2014-01-07 22:47   ` Gilles Chanteperdrix
2014-01-07 22:55     ` Charles Steinkuehler
2014-01-07 23:13       ` Gilles Chanteperdrix
2014-01-08  0:51         ` Charles Steinkuehler
2014-01-08  4:04           ` Charles Steinkuehler
2014-01-08  8:21             ` Gilles Chanteperdrix
2014-01-08  8:58             ` Gilles Chanteperdrix
2014-01-11 10:22           ` [Xenomai] i-pipe tracer on in production kernels? (was Re: Altera Cyclone V) Michael Haberler
2014-01-11 12:16             ` Gilles Chanteperdrix
2014-01-11 18:11             ` Gilles Chanteperdrix
2014-01-11 18:20             ` Philippe Gerum
2014-01-11 18:27               ` Gilles Chanteperdrix
2014-01-11 19:01                 ` Philippe Gerum
2014-01-11 19:11                   ` Gilles Chanteperdrix
2014-01-08  3:21     ` [Xenomai] Altera Cyclone V Lowell Gilbert

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=52CDDCEC.6030205@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=kludge@be-well.ilk.org \
    --cc=xenomai@xenomai.org \
    /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.