summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/chips/ocmb/explorer')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H19
-rw-r--r--src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml38
2 files changed, 57 insertions, 0 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
index ae215936..866e1277 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
@@ -149,6 +149,25 @@ fapi_try_exit:
return fapi2::current_err;
}
+///
+/// @brief Checks if the I2C interface returns an ACK
+/// @param[in] i_target the OCMB target
+/// @return FAPI2_RC_SUCCESS iff okay
+///
+inline fapi2::ReturnCode is_ready(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target)
+{
+ // We send a simple but valid command to poll the I2C
+ // Arbitrarily send an EXP_FW_STATUS command id
+ size_t l_size = 0;
+ std::vector<uint8_t> l_cmd_id;
+ fw_status_setup(l_size, l_cmd_id);
+
+ // We just ignore the data. We'll see FAPI2_RC_SUCCESS if
+ // the I2C returns an ACK.
+ std::vector<uint8_t> l_data;
+ return fapi2::getI2c(i_target, l_size, l_cmd_id, l_data);
+}
+
}// i2c
}// exp
}// mss
diff --git a/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml b/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
index 05492570..c5061b45 100644
--- a/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
+++ b/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
@@ -60,4 +60,42 @@
</deconfigure>
</hwpError>
+ <hwpError>
+ <rc>RC_MSS_EXP_I2C_POLLING_TIMEOUT</rc>
+ <description>
+ Polling the explorer I2C slave interface for an ACK
+ timed out.
+ </description>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>MEDIUM</priority>
+ </callout>
+ <callout>
+ <target>TARGET</target>
+ <priority>HIGH</priority>
+ </callout>
+ <deconfigure>
+ <target>TARGET</target>
+ </deconfigure>
+ </hwpError>
+
+ <hwpError>
+ <rc>RC_MSS_EXP_STATUS_POLLING_TIMEOUT</rc>
+ <description>
+ Polling the explorer for successful return code
+ timed out.
+ </description>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>MEDIUM</priority>
+ </callout>
+ <callout>
+ <target>TARGET</target>
+ <priority>HIGH</priority>
+ </callout>
+ <deconfigure>
+ <target>TARGET</target>
+ </deconfigure>
+ </hwpError>
+
</hwpErrors>
OpenPOWER on IntegriCloud