]> 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)
commit62a5c5d8065fe2351c01b5628b77947a68136b02
tree4491983d75db45409671fc82409466caa30b2a0b
parent4126328e7edb688648a8dfa0781f0edcfc4462de
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