@@ -586,10 +586,42 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0e1c, tegra_pcie_fixup_class);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0e1d, tegra_pcie_fixup_class);
+static const struct pci_device_id tegra_rootport_ids[] = {
+ {
+ /* Tegra20 4 lane root port */
+ .vendor = PCI_VENDOR_ID_NVIDIA, .device = 0x0bf0,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+ }, {
+ /* Tegra20 2 lane root port */
+ .vendor = PCI_VENDOR_ID_NVIDIA, .device = 0x0bf1,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+ }, {
+ /* Tegra30 4 lane root port */
+ .vendor = PCI_VENDOR_ID_NVIDIA, .device = 0x0e1c,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+ }, {
+ /* Tegra30 2 lane root port */
+ .vendor = PCI_VENDOR_ID_NVIDIA, .device = 0x0e1d,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+ }, {
+ /* Tegra124 4 lane root port */
+ .vendor = PCI_VENDOR_ID_NVIDIA, .device = 0x0e12,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+ }, {
+ /* Tegra124 1 lane root port */
+ .vendor = PCI_VENDOR_ID_NVIDIA, .device = 0x0e13,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+ }, {
+ /* sentinel */
+ }
+};
+
/* Tegra PCIE requires relaxed ordering */
static void tegra_pcie_relax_enable(struct pci_dev *dev)
{
- pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN);
+ if (pci_match_id(tegra_rootport_ids, pcie_find_root_port(dev)))
+ pcie_capability_set_word(dev, PCI_EXP_DEVCTL,
+ PCI_EXP_DEVCTL_RELAX_EN);
}
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_relax_enable);