* How to detect fsystem clock on MPC5200
@ 2007-02-08 17:13 Juergen Beisert
2007-02-09 2:42 ` Grant Likely
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Beisert @ 2007-02-08 17:13 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
currently I am writing an SPI driver for a PSC unit. 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?
Juergen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to detect fsystem clock on MPC5200
2007-02-08 17:13 How to detect fsystem clock on MPC5200 Juergen Beisert
@ 2007-02-09 2:42 ` Grant Likely
0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2007-02-09 2:42 UTC (permalink / raw)
To: Juergen Beisert; +Cc: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-09 2:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-08 17:13 How to detect fsystem clock on MPC5200 Juergen Beisert
2007-02-09 2:42 ` Grant Likely
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).