powerpc/85xx: Add support for the "socrates" board (MPC8544)

Grant Likely grant.likely at secretlab.ca
Wed Apr 1 02:05:28 EST 2009


On Tue, Mar 31, 2009 at 7:36 AM, Wolfgang Grandegger <wg at grandegger.com> wrote:
> Grant Likely wrote:
>> On Tue, Mar 31, 2009 at 3:35 AM, Wolfgang Grandegger <wg at grandegger.com> wrote:
>>> Grant Likely wrote:
>>>> I agree 100% with David's comments, and I have some additional ones below.
>>>>
>>>> On Thu, Mar 19, 2009 at 9:26 AM, Wolfgang Grandegger <wg at grandegger.com> wrote:
>>>>> +       soc8544 at e0000000 {
>>>>> +               #address-cells = <1>;
>>>>> +               #size-cells = <1>;
>>>>> +               device_type = "soc";
>>>> Drop device_type here too.
>>> Grrr, I just realized that removing the devices type "soc" has broken
>>> fsl_get_sys_freq(). See:
>>>
>>> http://lxr.linux.no/linux+v2.6.29/arch/powerpc/sysdev/fsl_soc.c#L80
>>>
>>> We need a quick fix and we could take the occasion to establish a common
>>> function for the MPC52xx as well, but it's not obvious to me how to find
>>> the SOC node without the device type property.
>>
>> SoC node should have a compatible property, just like everything else.
>>
>> compatible = "fsl,mpc8544-immr";  (immr == Internally Memory Mapped Registers)
>>
>> Many other boards already do this.
>
> Yes, it does, but searching for the SOC node is not straight-forward
> because there is no common compatibility string but many CPU-specific
> compatibility strings, e.g. "fsl,mpc8560-immr", etc. Have I missed
> something?

Choose a new value ("fsl,mpc-immr" perhaps?), document exactly what it
means, and add add it to the end of the compatible list.

> Unfortunately, other 85xx functions search for the device type "soc" as
> well. Therefore I think we must keep the devices type "soc" for the time
> being. Kumar?

Fix them!  :-)

Most troublesome places are where of_find_node_by_type() is used (I
see two cases in fsl_soc.c).  I added the of_find_matching_node()
function specifically to rework code that was only matching on a
single compatible or type value.  See usage of mpc52xx_bus_ids in
arch/powerpc/platforms/52xx/mpc52xx_common.c for an example.

It is a pain, but I think it is important to be reducing device_type
usage as we hit against them.

g.

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



More information about the Linuxppc-dev mailing list