[PATCH 3/3] powerpc/mpc512x: add platform code for MPC5125.
Matteo Facchinetti
matteo.facchinetti at sirius-es.it
Tue Apr 2 20:49:22 EST 2013
On 03/30/2013 11:32 PM, Anatolij Gustschin wrote:
>> +{
>> + char *psc_compats[] = {
>> + "fsl,mpc5121-psc",
>> + "fsl,mpc5125-psc"
>> + };
>> + int i;
>> +
>> + for (i = 0; i < ARRAY_SIZE(psc_compats); i++)
>> + if (of_find_compatible_node(NULL, NULL, psc_compats[i]))
>> + return psc_compats[i];
> I don't like this, better would be to use something like:
>
> if (of_machine_is_compatible("fsl,mpc5121"))
> return "fsl,mpc5121-psc";
>
> if (of_machine_is_compatible("fsl,mpc5125"))
> return "fsl,mpc5125-psc";
>
> but note that it will only work if we add these compatibles
> to the compatible list of the root nodes in 5121 and 5125
> device trees.
I agree with you.
But I don't like that:
"fsl,mpc5121" is already present in <mpc5121.dtsi> and after its
inclusion in <mpc5121ads.dts> , compatible root node value is replaced
by "fsl,mpc5121ads".
Idea is automatically generate
compatible = "fsl,mpc5121", "fsl,mpc5121ads";
using dtsi hierarchy.
Is there a way to extend compatible values instead of replace it?
Matteo
More information about the Linuxppc-dev
mailing list