Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/85xx: fix various PCI node compatible strings

Fix and/or improve the compatible strings of the PCI device tree nodes for
some Freescale SOCs. This fixes some issues and improves consistency among
the SOCs.

Specifically:

1) The P1022 has a v1 PCIe controller, so the compatible property should just
say "fsl,mpc8548-pcie". U-Boot does not look for "fsl,p1022-pcie", so it
wasn't fixing up the node.

2) The P4080 has a v2.1 PCIe controller, so add that version-specific string
to the device tree. Update the kernel to also look for that string.
Currently, the kernel looks for "fsl,p4080-pcie" specifically, but
eventually that check should be deleted.

3) The P1010 device tree claims compatibility with v2.2 and v2.3, but that's
redundant. No other device tree does this. Remove the v2.2 string.

4) The kernel looks for both "fsl,p1023-pcie" and "fsl,qoriq-pcie-v2.2",
even though the P1023 device trees has always included both strings. Remove
the search for "fsl,p1023-pcie".

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Timur Tabi and committed by
Kumar Gala
14bdc913 0408753f

+19 -14
+2 -2
arch/powerpc/boot/dts/fsl/p1010si-post.dtsi
··· 41 41 42 42 /* controller at 0x9000 */ 43 43 &pci0 { 44 - compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3", "fsl,qoriq-pcie-v2.2"; 44 + compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3"; 45 45 device_type = "pci"; 46 46 #size-cells = <2>; 47 47 #address-cells = <3>; ··· 69 69 70 70 /* controller at 0xa000 */ 71 71 &pci1 { 72 - compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3", "fsl,qoriq-pcie-v2.2"; 72 + compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3"; 73 73 device_type = "pci"; 74 74 #size-cells = <2>; 75 75 #address-cells = <3>;
+3 -3
arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
··· 45 45 46 46 /* controller at 0x9000 */ 47 47 &pci0 { 48 - compatible = "fsl,p1022-pcie"; 48 + compatible = "fsl,mpc8548-pcie"; 49 49 device_type = "pci"; 50 50 #size-cells = <2>; 51 51 #address-cells = <3>; ··· 73 73 74 74 /* controller at 0xa000 */ 75 75 &pci1 { 76 - compatible = "fsl,p1022-pcie"; 76 + compatible = "fsl,mpc8548-pcie"; 77 77 device_type = "pci"; 78 78 #size-cells = <2>; 79 79 #address-cells = <3>; ··· 102 102 103 103 /* controller at 0xb000 */ 104 104 &pci2 { 105 - compatible = "fsl,p1022-pcie"; 105 + compatible = "fsl,mpc8548-pcie"; 106 106 device_type = "pci"; 107 107 #size-cells = <2>; 108 108 #address-cells = <3>;
+3 -3
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
··· 41 41 42 42 /* controller at 0x200000 */ 43 43 &pci0 { 44 - compatible = "fsl,p4080-pcie"; 44 + compatible = "fsl,p4080-pcie", "fsl,qoriq-pcie-v2.1"; 45 45 device_type = "pci"; 46 46 #size-cells = <2>; 47 47 #address-cells = <3>; ··· 70 70 71 71 /* controller at 0x201000 */ 72 72 &pci1 { 73 - compatible = "fsl,p4080-pcie"; 73 + compatible = "fsl,p4080-pcie", "fsl,qoriq-pcie-v2.1"; 74 74 device_type = "pci"; 75 75 #size-cells = <2>; 76 76 #address-cells = <3>; ··· 99 99 100 100 /* controller at 0x202000 */ 101 101 &pci2 { 102 - compatible = "fsl,p4080-pcie"; 102 + compatible = "fsl,p4080-pcie", "fsl,qoriq-pcie-v2.1"; 103 103 device_type = "pci"; 104 104 #size-cells = <2>; 105 105 #address-cells = <3>;
+11 -6
arch/powerpc/sysdev/fsl_pci.c
··· 827 827 { .compatible = "fsl,mpc8548-pcie", }, 828 828 { .compatible = "fsl,mpc8610-pci", }, 829 829 { .compatible = "fsl,mpc8641-pcie", }, 830 - { .compatible = "fsl,p1022-pcie", }, 831 - { .compatible = "fsl,p1010-pcie", }, 832 - { .compatible = "fsl,p1023-pcie", }, 833 - { .compatible = "fsl,p4080-pcie", }, 834 - { .compatible = "fsl,qoriq-pcie-v2.4", }, 835 - { .compatible = "fsl,qoriq-pcie-v2.3", }, 830 + { .compatible = "fsl,qoriq-pcie-v2.1", }, 836 831 { .compatible = "fsl,qoriq-pcie-v2.2", }, 832 + { .compatible = "fsl,qoriq-pcie-v2.3", }, 833 + { .compatible = "fsl,qoriq-pcie-v2.4", }, 834 + 835 + /* 836 + * The following entries are for compatibility with older device 837 + * trees. 838 + */ 839 + { .compatible = "fsl,p1022-pcie", }, 840 + { .compatible = "fsl,p4080-pcie", }, 841 + 837 842 {}, 838 843 }; 839 844