Loading arch/arm64/boot/dts/qcom/sdxprairie-pcie.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ pcie0_rp: pcie0_rp { reg = <0 0 0 0 0>; pci-ids = "17cb:010c"; }; }; Loading arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ mhi_0: qcom,mhi@0 { reg = <0 0 0 0 0 >; pci-ids = "17cb:0305", "17cb:0306"; /* controller specific configuration */ qcom,smmu-cfg = <0x3>; Loading Loading @@ -548,6 +550,8 @@ mhi_1: qcom,mhi@0 { reg = <0 0 0 0 0 >; pci-ids = "17cb:0305", "17cb:0306"; /* controller specific configuration */ qcom,smmu-cfg = <0x3>; qcom,msm-bus,name = "mhi"; Loading arch/arm64/boot/dts/qcom/sm8150-pcie.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ pcie_rc0: pcie_rc0 { reg = <0 0 0 0 0>; pci-ids = "17cb:0108"; }; }; Loading Loading @@ -556,6 +557,7 @@ pcie_rc1: pcie_rc1 { reg = <0 0 0 0 0>; pci-ids = "17cb:0108"; }; }; Loading drivers/of/of_pci.c +20 −3 Original line number Diff line number Diff line Loading @@ -8,6 +8,20 @@ #include <linux/of_pci.h> #include <linux/slab.h> static inline bool __of_pci_pci_compare_id(struct device_node *node, struct pci_dev *dev) { char dev_id_str[10]; scnprintf(dev_id_str, sizeof(dev_id_str), "%04x:%04x", dev->vendor, dev->device); if (of_property_match_string(node, "pci-ids", dev_id_str) < 0) return false; return true; } static inline int __of_pci_pci_compare(struct device_node *node, unsigned int data) { Loading @@ -20,14 +34,17 @@ static inline int __of_pci_pci_compare(struct device_node *node, return devfn == data; } struct device_node *of_pci_find_child_device(struct device_node *parent, unsigned int devfn) struct device_node *of_pci_find_child_device(struct pci_dev *dev) { struct device_node *node, *node2; struct device_node *parent = dev->bus->dev.of_node; unsigned int devfn = dev->devfn; for_each_child_of_node(parent, node) { if (__of_pci_pci_compare(node, devfn)) if (__of_pci_pci_compare_id(node, dev)) return node; /* * Some OFs create a parent node "multifunc-device" as * a fake root for all functions of a multi-function Loading drivers/pci/of.c +1 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,7 @@ void pci_set_of_node(struct pci_dev *dev) { if (!dev->bus->dev.of_node) return; dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node, dev->devfn); dev->dev.of_node = of_pci_find_child_device(dev); if (dev->dev.of_node) of_reserved_mem_device_init_by_idx(&dev->dev, dev->dev.of_node, Loading Loading
arch/arm64/boot/dts/qcom/sdxprairie-pcie.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ pcie0_rp: pcie0_rp { reg = <0 0 0 0 0>; pci-ids = "17cb:010c"; }; }; Loading
arch/arm64/boot/dts/qcom/sm8150-mhi.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ mhi_0: qcom,mhi@0 { reg = <0 0 0 0 0 >; pci-ids = "17cb:0305", "17cb:0306"; /* controller specific configuration */ qcom,smmu-cfg = <0x3>; Loading Loading @@ -548,6 +550,8 @@ mhi_1: qcom,mhi@0 { reg = <0 0 0 0 0 >; pci-ids = "17cb:0305", "17cb:0306"; /* controller specific configuration */ qcom,smmu-cfg = <0x3>; qcom,msm-bus,name = "mhi"; Loading
arch/arm64/boot/dts/qcom/sm8150-pcie.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ pcie_rc0: pcie_rc0 { reg = <0 0 0 0 0>; pci-ids = "17cb:0108"; }; }; Loading Loading @@ -556,6 +557,7 @@ pcie_rc1: pcie_rc1 { reg = <0 0 0 0 0>; pci-ids = "17cb:0108"; }; }; Loading
drivers/of/of_pci.c +20 −3 Original line number Diff line number Diff line Loading @@ -8,6 +8,20 @@ #include <linux/of_pci.h> #include <linux/slab.h> static inline bool __of_pci_pci_compare_id(struct device_node *node, struct pci_dev *dev) { char dev_id_str[10]; scnprintf(dev_id_str, sizeof(dev_id_str), "%04x:%04x", dev->vendor, dev->device); if (of_property_match_string(node, "pci-ids", dev_id_str) < 0) return false; return true; } static inline int __of_pci_pci_compare(struct device_node *node, unsigned int data) { Loading @@ -20,14 +34,17 @@ static inline int __of_pci_pci_compare(struct device_node *node, return devfn == data; } struct device_node *of_pci_find_child_device(struct device_node *parent, unsigned int devfn) struct device_node *of_pci_find_child_device(struct pci_dev *dev) { struct device_node *node, *node2; struct device_node *parent = dev->bus->dev.of_node; unsigned int devfn = dev->devfn; for_each_child_of_node(parent, node) { if (__of_pci_pci_compare(node, devfn)) if (__of_pci_pci_compare_id(node, dev)) return node; /* * Some OFs create a parent node "multifunc-device" as * a fake root for all functions of a multi-function Loading
drivers/pci/of.c +1 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,7 @@ void pci_set_of_node(struct pci_dev *dev) { if (!dev->bus->dev.of_node) return; dev->dev.of_node = of_pci_find_child_device(dev->bus->dev.of_node, dev->devfn); dev->dev.of_node = of_pci_find_child_device(dev); if (dev->dev.of_node) of_reserved_mem_device_init_by_idx(&dev->dev, dev->dev.of_node, Loading