aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorAndrew Donnellan <andrew.donnellan@au1.ibm.com>2018-03-01 18:57:12 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-03-01 20:17:54 -0600
commit3603f474e56693d7fcf9c41aa1cb83c4f127aefb (patch)
treefee097d85d22fa091f25617dbba9d3d6a43a477f /include/platform.h
parent11b46291111a6e77ecb8e0372ab308c4d5bee4bf (diff)
downloadskiboot-3603f474e56693d7fcf9c41aa1cb83c4f127aefb.zip
skiboot-3603f474e56693d7fcf9c41aa1cb83c4f127aefb.tar.gz
skiboot-3603f474e56693d7fcf9c41aa1cb83c4f127aefb.tar.bz2
platform: Add fields for OpenCAPI platform data
Add a platform_ocapi struct to store platform-specific values for resetting OpenCAPI devices via I2C and for setting up the ODL PHY. A later patch will add this to the relevant platforms. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index e6ece27..a777644 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -44,6 +44,17 @@ struct bmc_platform {
uint32_t ipmi_oem_pnor_access_status;
};
+/* OpenCAPI platform-specific I2C information */
+struct platform_ocapi {
+ uint8_t i2c_engine; /* I2C engine number */
+ uint8_t i2c_port; /* I2C port number */
+ uint32_t i2c_offset[3]; /* Offsets on I2C device */
+ uint8_t i2c_odl0_data[3]; /* Data to reset ODL0 */
+ uint8_t i2c_odl1_data[3]; /* Data to reset ODL1 */
+ bool odl_phy_swap; /* Swap ODL1 to use brick 2 rather than
+ * brick 1 lanes */
+};
+
/*
* Each platform can provide a set of hooks
* that can affect the generic code
@@ -58,6 +69,9 @@ struct platform {
*/
const struct bmc_platform *bmc;
+ /* OpenCAPI platform-specific I2C information */
+ const struct platform_ocapi *ocapi;
+
/*
* Probe platform, return true on a match, called before
* any allocation has been performed outside of the heap