FDT for MPC5200, CPU revision, MSCAN

Wolfgang Grandegger wg at grandegger.com
Sat Apr 21 02:11:46 EST 2007


Grant Likely wrote:
> On 4/20/07, Wolfgang Grandegger <wg at grandegger.com> wrote:
>> Wolfgang Grandegger wrote:
>> > Hello,
>> >
>> > is there a way to distinguish the CPU revision (Rev.A vs. Rev.B) of the
>> > MPC5200, preferably at run time? Or should this be defined in the FDT?
>> > I ask, because some settings depend on the CPU revision due to hardware
>> > bugs, like the clock source used for MSCAN.
> 
> This stuff is defined in the device tree.  If you need to detect the
> version at runtime, then ideally your bootloader will read the PVR/SVR
> to determine the chip version and then pass the correct FDT to the
> kernel.

OK, I already realized the revision field in the DTS.

>> I found the information here:
>>
>> $ cat Documentation/powerpc/mpc52xx-device-tree-bindings.txt
> <snip>
>> Sorry for the noise.
> 
> Not noise; good question.

OK, then more questions for MSCAN related properties. The clock source 
for MSCAN is either derived from IPB or directly from the oscillator 
clock via CLKSRC bit. I guess that the property "system-clock" should 
provide that frequency:

$ cat Documentation/powerpc/mpc52xx-device-tree-bindings.txt
...
system-frequency        int             Fsystem frequency; source of all
                                         other clocks.

It needs also to be defined by the boot loader.

Thanks.

Wolfgang.



More information about the Linuxppc-embedded mailing list