[Skiboot] [PATCH] capi: Add new flags in the device-tree
Christophe Lombard
clombard at linux.vnet.ibm.com
Sat Dec 2 02:53:29 AEDT 2017
We need to add new CAPI flags in the device-tree (PHB DT node)
indicating which version of CAPI are supported. The cxl module will
handle these flags instead of using PVR values.
Signed-off-by: Christophe Lombard <clombard at linux.vnet.ibm.com>
---
hw/phb3.c | 3 ++-
hw/phb4.c | 3 ++-
include/opal-api.h | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/phb3.c b/hw/phb3.c
index 0b4c3c3..625b101 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -4929,7 +4929,8 @@ static void phb3_probe_pbcq(struct dt_node *pbcq)
dt_add_property_cells(np, "ibm,max-link-speed", max_link_speed);
}
dt_add_property_cells(np, "ibm,capi-flags",
- OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL);
+ OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL |
+ OPAL_PHB_CAPI_FLAG_CAIA1);
add_chip_dev_associativity(np);
}
diff --git a/hw/phb4.c b/hw/phb4.c
index cfadf59..2fe82de 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -5193,7 +5193,8 @@ static void phb4_probe_stack(struct dt_node *stk_node, uint32_t pec_index,
dt_add_property_cells(np, "ibm,max-link-speed", max_link_speed);
}
dt_add_property_cells(np, "ibm,capi-flags",
- OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL);
+ OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL |
+ OPAL_PHB_CAPI_FLAG_CAIA2);
add_chip_dev_associativity(np);
}
diff --git a/include/opal-api.h b/include/opal-api.h
index e058089..696bc98 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1171,6 +1171,8 @@ enum {
/* CAPI feature flags (in device-tree) */
#define OPAL_PHB_CAPI_FLAG_SNOOP_CONTROL 0x00000001
#define OPAL_PHB_CAPI_FLAG_REVERT_TO_PCIE 0x00000002
+#define OPAL_PHB_CAPI_FLAG_CAIA1 0x00000004
+#define OPAL_PHB_CAPI_FLAG_CAIA2 0x00000008
/* OPAL I2C request */
struct opal_i2c_request {
--
2.7.4
More information about the Skiboot
mailing list