From 5212faa417612ba0d3ba23cf10ec6e756d4af04c Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 30 Sep 2014 15:34:44 +1000 Subject: 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 --- hw/phb3.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'hw/phb3.c') 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, ®); @@ -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); } -- cgit v1.1