]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
PCI: iproc: Hard-code PCIe capability offset instead of searching
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 6 Oct 2016 18:36:07 +0000 (13:36 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 12 Oct 2016 03:44:22 +0000 (22:44 -0500)
commite3a1698b1e7776fbb3304dfd68db1d1ac18f85c0
tree4491983d75db45409671fc82409466caa30b2a0b
parent6d76833c5223348dc8fddaa31584d923cae2a566
PCI: iproc: Hard-code PCIe capability offset instead of searching

We know where the PCIe capability lives in the host bridge's config space;
in fact, we already hard-coded the offset of the Link Control 2 register.

The hard-coded Link Control 2 offset was 0xdc.  Link Control 2 is at offset
0x30 into the PCIe capability, so the capability itself must be at
0xdc - 0x30 = 0xac.

Hard-code the PCIe capability offset, which means we don't have to search
for it and we can use the standard definitions for registers within the
capability.

No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/host/pcie-iproc.c