* Inconsistent fsl_get_sys_freq() implementation
@ 2009-03-31 7:28 Wolfgang Grandegger
2009-03-31 7:33 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Grandegger @ 2009-03-31 7:28 UTC (permalink / raw)
To: linuxppc-dev, devicetree-discuss
Hello,
we realized an inconsistent implementation of fsl_get_sys_freq():
http://lxr.linux.no/linux+v2.6.29/arch/powerpc/sysdev/fsl_soc.c#L80
For 826x and 827x boards, the function is available but it cannot be
used because the "bus-frequency" property is not defined for the SOC and
U-Boot also does not try to do a fixup. I think that's a mistake, and
the DTS files and U-Boot should be fixed, right?
Furthermore, I find the name confusing. fsl_get_soc_bus_freq() would be
more appropriate also to distinguish from the frequencies of the CPU.
And why does the MPC52xx use a different name mpc52xx_find_ipb_freq()
for that frequency? It makes support for common hardware like I2C awkward.
Thanks.
Wolfgang.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Inconsistent fsl_get_sys_freq() implementation
2009-03-31 7:28 Inconsistent fsl_get_sys_freq() implementation Wolfgang Grandegger
@ 2009-03-31 7:33 ` Grant Likely
2009-03-31 7:48 ` Wolfgang Grandegger
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2009-03-31 7:33 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: linuxppc-dev, devicetree-discuss
On Tue, Mar 31, 2009 at 1:28 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
>
> Hello,
>
> we realized an inconsistent implementation of fsl_get_sys_freq():
>
> http://lxr.linux.no/linux+v2.6.29/arch/powerpc/sysdev/fsl_soc.c#L80
>
> For 826x and 827x boards, the function is available but it cannot be
> used because the "bus-frequency" property is not defined for the SOC and
> U-Boot also does not try to do a fixup. I think that's a mistake, and
> the DTS files and U-Boot should be fixed, right?
> Furthermore, I find the name confusing. fsl_get_soc_bus_freq() would be
> more appropriate also to distinguish from the frequencies of the CPU.
> And why does the MPC52xx use a different name mpc52xx_find_ipb_freq()
> for that frequency? It makes support for common hardware like I2C awkward.
I haven't looked at fsl_get_soc_bus_freq(), but if the functions are
duplicated, then I've got no problem changing the 52xx support to use
common code.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Inconsistent fsl_get_sys_freq() implementation
2009-03-31 7:33 ` Grant Likely
@ 2009-03-31 7:48 ` Wolfgang Grandegger
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Grandegger @ 2009-03-31 7:48 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, devicetree-discuss
Grant Likely wrote:
> On Tue, Mar 31, 2009 at 1:28 AM, Wolfgang Grandegger <wg@grandegger.com> wrote:
>> Hello,
>>
>> we realized an inconsistent implementation of fsl_get_sys_freq():
>>
>> http://lxr.linux.no/linux+v2.6.29/arch/powerpc/sysdev/fsl_soc.c#L80
>>
>> For 826x and 827x boards, the function is available but it cannot be
>> used because the "bus-frequency" property is not defined for the SOC and
>> U-Boot also does not try to do a fixup. I think that's a mistake, and
>> the DTS files and U-Boot should be fixed, right?
>> Furthermore, I find the name confusing. fsl_get_soc_bus_freq() would be
>> more appropriate also to distinguish from the frequencies of the CPU.
>> And why does the MPC52xx use a different name mpc52xx_find_ipb_freq()
>> for that frequency? It makes support for common hardware like I2C awkward.
>
> I haven't looked at fsl_get_soc_bus_freq(), but if the functions are
> duplicated, then I've got no problem changing the 52xx support to use
> common code.
The name used for devices using CONFIG_FSL_SOC is fsl_get_sys_freq(),
see the link above. Both functions return the bus frequency of the SOC
but they are implemented differently and allow some variation (which
needs some double-checking).
Wolfgang.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-31 7:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 7:28 Inconsistent fsl_get_sys_freq() implementation Wolfgang Grandegger
2009-03-31 7:33 ` Grant Likely
2009-03-31 7:48 ` Wolfgang Grandegger
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).