aboutsummaryrefslogtreecommitdiff
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-09-30 15:34:44 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-09-30 15:34:44 +1000
commit5212faa417612ba0d3ba23cf10ec6e756d4af04c (patch)
tree5fc41a04e31b2574e72a64bacf3dc5b995c826c9 /hw/phb3.c
parenta3be370710b06df32768f09d3d0e412b91797c73 (diff)
downloadskiboot-5212faa417612ba0d3ba23cf10ec6e756d4af04c.zip
skiboot-5212faa417612ba0d3ba23cf10ec6e756d4af04c.tar.gz
skiboot-5212faa417612ba0d3ba23cf10ec6e756d4af04c.tar.bz2
phb3/capi: Some tweaks to the new CAPI interfaces
Use real functionality based flags instead of a mode list in the DT and other cleanups & missing bits (this one actually builds !) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index 10e3e59..f2af4a5 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -2950,21 +2950,21 @@ static int64_t phb3_set_capi_mode(struct phb *phb, uint64_t mode,
return OPAL_BUSY;
}
- if (mode == OPAL_PHB_MODE_PCIE)
+ if (mode == OPAL_PHB_CAPI_MODE_PCIE)
return OPAL_UNSUPPORTED;
- if (mode == OPAL_PHB_MODE_SNOOP_OFF) {
+ if (mode == OPAL_PHB_CAPI_MODE_SNOOP_OFF) {
xscom_write(p->chip_id, SNOOP_CAPI_CONFIG, 0x0000000000000000);
return OPAL_SUCCESS;
}
- if (mode == OPAL_PHB_MODE_SNOOP_ON) {
+ if (mode == OPAL_PHB_CAPI_MODE_SNOOP_ON) {
xscom_write(p->chip_id, CAPP_ERR_STATUS_CTRL, 0x0000000000000000);
xscom_write(p->chip_id, SNOOP_CAPI_CONFIG, 0xA1F0000000000000);
return OPAL_SUCCESS;
}
- if (mode != OPAL_PHB_MODE_CAPI)
+ if (mode != OPAL_PHB_CAPI_MODE_CAPI)
return OPAL_UNSUPPORTED;
xscom_read(p->chip_id, 0x9013c03, &reg);
@@ -4173,9 +4173,8 @@ static void phb3_probe_pbcq(struct dt_node *pbcq)
}
max_link_speed = dt_prop_get_u32_def(pbcq, "ibm,max-link-speed", 3);
dt_add_property_cells(np, "ibm,max-link-speed", max_link_speed);
- dt_add_property_cells(np, "ibm,capi-modes", OPAL_PHB_MODE_CAPI |
- OPAL_PHB_MODE_SNOOP_ON |
- OPAL_PHB_MODE_SNOOP_OFF);
+ dt_add_property_cells(np, "ibm,capi-flags",
+ OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL);
add_chip_dev_associativity(np);
}