diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2017-04-07 10:16:20 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-15 18:03:26 +1000 |
commit | f3105cbf8d44f45a8c294ecb4cfc124065825131 (patch) | |
tree | ec50b93a7cda4920d777dc5002c783f0beb4f321 /core/pci.c | |
parent | 4a38543da57ef03fe3e4acae7eb0ffdc78904fa7 (diff) | |
download | talos-skiboot-f3105cbf8d44f45a8c294ecb4cfc124065825131.tar.gz talos-skiboot-f3105cbf8d44f45a8c294ecb4cfc124065825131.zip |
core/pci: Use macro as vendor ID register offset
This uses macro as PCI config register (vendor ID) offset because
it's more indicative.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r-- | core/pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -229,7 +229,7 @@ static struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *paren bool had_crs = false; for (retries = 0; retries < 40; retries++) { - rc = pci_cfg_read32(phb, bdfn, 0, &vdid); + rc = pci_cfg_read32(phb, bdfn, PCI_CFG_VENDOR_ID, &vdid); if (rc) return NULL; if (vdid == 0xffffffff || vdid == 0x00000000) @@ -250,7 +250,7 @@ static struct pci_device *pci_scan_one(struct phb *phb, struct pci_device *paren * capture it's own bus number, so any subsequent error * messages will be properly tagged */ - pci_cfg_write32(phb, bdfn, 0, vdid); + pci_cfg_write32(phb, bdfn, PCI_CFG_VENDOR_ID, vdid); pd = zalloc(sizeof(struct pci_device)); if (!pd) { @@ -1753,8 +1753,8 @@ static int __pci_restore_bridge_buses(struct phb *phb, uint32_t vdid; /* Make all devices below a bridge "re-capture" the bdfn */ - if (pci_cfg_read32(phb, pd->bdfn, 0, &vdid) == 0) - pci_cfg_write32(phb, pd->bdfn, 0, vdid); + if (pci_cfg_read32(phb, pd->bdfn, PCI_CFG_VENDOR_ID, &vdid) == 0) + pci_cfg_write32(phb, pd->bdfn, PCI_CFG_VENDOR_ID, vdid); return 0; } |