aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-17 15:46:17 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-17 15:46:17 +1100
commit5af6acab5ccd0fe2aa1686c502580e984887c62c (patch)
tree596cb71ec15ec6a958ff58482167170fd8fa157a /hw
parent915cd77c123761301c2ae9fee7681cbe120401db (diff)
downloadskiboot-5af6acab5ccd0fe2aa1686c502580e984887c62c.zip
skiboot-5af6acab5ccd0fe2aa1686c502580e984887c62c.tar.gz
skiboot-5af6acab5ccd0fe2aa1686c502580e984887c62c.tar.bz2
PCI: use define for wanting dynamic PHB id for pci_register_phb
No functional change, but static analysis showed up the oddity of something that is generally unsigned (opal_id) having a signed value assigned to it. Took the opportunity to use a define to increase readability. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/npu.c2
-rw-r--r--hw/p5ioc2-phb.c2
-rw-r--r--hw/p7ioc-phb.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/hw/npu.c b/hw/npu.c
index 3649728..f0be9fc 100644
--- a/hw/npu.c
+++ b/hw/npu.c
@@ -1692,7 +1692,7 @@ static void npu_create_phb(struct dt_node *dn)
npu_add_phb_properties(p);
/* Register PHB */
- pci_register_phb(&p->phb, -1);
+ pci_register_phb(&p->phb, OPAL_DYNAMIC_PHB_ID);
/* Initialize IODA cache */
npu_ioda_init(p);
diff --git a/hw/p5ioc2-phb.c b/hw/p5ioc2-phb.c
index 1c9dbb6..70a1a09 100644
--- a/hw/p5ioc2-phb.c
+++ b/hw/p5ioc2-phb.c
@@ -1197,7 +1197,7 @@ void p5ioc2_phb_setup(struct p5ioc2 *ioc, struct p5ioc2_phb *p,
/* We register the PHB before we initialize it so we
* get a useful OPAL ID for it
*/
- pci_register_phb(&p->phb, -1);
+ pci_register_phb(&p->phb, OPAL_DYNAMIC_PHB_ID);
/* Platform additional setup */
if (platform.pci_setup_phb)
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 66c166f..97e4885 100644
--- a/hw/p7ioc-phb.c
+++ b/hw/p7ioc-phb.c
@@ -2929,7 +2929,7 @@ void p7ioc_phb_setup(struct p7ioc *ioc, uint8_t index)
/* We register the PHB before we initialize it so we
* get a useful OPAL ID for it
*/
- pci_register_phb(&p->phb, -1);
+ pci_register_phb(&p->phb, OPAL_DYNAMIC_PHB_ID);
/* Platform additional setup */
if (platform.pci_setup_phb)