[PATCH 05/04] *** NOT FOR RELEASE *** HACK *** Work around MII clock issue ***

Grant Likely grant.likely at secretlab.ca
Tue Jun 9 00:37:16 EST 2009


On Sun, Jun 7, 2009 at 2:34 PM, Wolfgang Denk<wd at denx.de> wrote:
> Dear John,
>
> in message <4b73d43f0906061708o763409d0u10a344dfc30e32c1 at mail.gmail.com> you wrote:
>>
>> > The big question seems to be what the RefMan means when talking about
>> > the "system clock frequency". Obiously it is NOT  the  CPU  clock  as
> ...
>> > But which one is it?
>>
>> My best guess is still that it is ips clock.  I think I stated in a previous
>> email ipb, but I meant ips.  5200 has ibp and 5121 has ips.  Have you looked
>> at he MII clock on a scope to see how the calculated values compare to
>> actual?
>
> Yes, it seems very much as if you were right again.
>
> When using ips/ibp everything makes sense, and works.
>
> Hm... so that means on MPC512x we should use mpc512x_find_ips_freq(),
> while on MPC5200 we should use  mpc52xx_find_ipb_freq()  -  but  hey,
> apart from the name these two functions are identical.
>
> Grant - how would you like to see this handled? Should we merge these
> two code-wise identical functions into one?  What should be the name,
> and in which file should we put it?

If you want to merge them... Seeing as the function just walks up the
parent nodes looking for the "bus-frequency" property; how about
"mpc5xxx_get_bus_frequency()"?  It should go somewhere in
arch/powerpc/sysdev/

Alternately, it is a pretty trivial function; 52xx and 512x could both
have their own versions of it.  Whichever makes the most sense to you
(I haven't personally looked at the device driver impact).

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Linuxppc-dev mailing list