From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Juergen Beisert" <juergen.beisert@weihenstephan.org>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: How to detect fsystem clock on MPC5200
Date: Thu, 8 Feb 2007 19:42:16 -0700 [thread overview]
Message-ID: <528646bc0702081842r3390c0dvb4767f4d66daabd@mail.gmail.com> (raw)
In-Reply-To: <200702081813.35776.juergen.beisert@weihenstephan.org>
On 2/8/07, Juergen Beisert <juergen.beisert@weihenstephan.org> wrote:
> Hi all,
>
> currently I am writing an SPI driver for a PSC unit.
Cool; that would be useful! :) I look forward to seeing it.
> To calculate the baudrate
> this unit should use I need the fsystem frequence (fsystem is the used name
> in the datasheet). Is there a generic way (API) to read back this clock?
>
> For the IPB clock I found mpc52xx_find_ipb_freq() from the open firmware
> framework. Is there something similar for the fsystem clock?
Hmmm, yeah... Sylvain brought this up a while ago. We currently don't
have that information in the device tree definition; but it is needed.
I need to add a new device tree property; probably 'system-frequency'
in the soc node. It is also possible to derive fsystem from the
/soc5200/bus-frequency by interpreting the registers; but i think
that's rather ugly.
I'm working on the device tree bindings at the moment. I'll add in a
property for the system frequency and post the patch for comments.
Once that's defined, it's trivial to add a function to return the
system frequency.
Cheers,
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
prev parent reply other threads:[~2007-02-09 2:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-08 17:13 How to detect fsystem clock on MPC5200 Juergen Beisert
2007-02-09 2:42 ` Grant Likely [this message]
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=528646bc0702081842r3390c0dvb4767f4d66daabd@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=juergen.beisert@weihenstephan.org \
--cc=linuxppc-embedded@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).