]> git.baikalelectronics.ru Git - kernel.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)
commitf077212b2ec371d009d6e5759bf2277da36e04aa
tree4491983d75db45409671fc82409466caa30b2a0b
parentf5810212fd8ea1c7d2838fa95bdc38ca6d845ff8
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