summaryrefslogtreecommitdiffstats
path: root/src/import/chips
diff options
context:
space:
mode:
authorStephen Glancy <sglancy@us.ibm.com>2018-08-20 14:32:40 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-10-30 10:42:27 -0500
commitba07643615871f962b06f4d0eaeb03c1de275844 (patch)
tree91e96f4c8c791bbd8bc58ef5fed9da5432c99523 /src/import/chips
parenta77117372feee4284c7f7eee0d3e8102ec180cba (diff)
downloadtalos-hostboot-ba07643615871f962b06f4d0eaeb03c1de275844.tar.gz
talos-hostboot-ba07643615871f962b06f4d0eaeb03c1de275844.zip
Adds explorer OMI training code
Change-Id: I80a8976892072271db32d483450477d830a3385f Original-Change-Id: Ic4fcd226eea7478ffff6cacb830f8e1e83e6f247 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64919 Reviewed-by: Louis Stermole <stermole@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: RYAN P. KING <rpking@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68126 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H14
1 files changed, 12 insertions, 2 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 c6dd2b7df..aa1d23494 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
@@ -62,7 +62,7 @@ inline fapi2::ReturnCode status_code( const fapi2::Target<fapi2::TARGET_TYPE_OCM
const std::vector<uint8_t>& i_data )
{
// Set to a high number to make sure check for SUCCESS (== 0) isn't a fluke
- size_t l_status = ~(0);
+ uint8_t l_status = ~(0);
FAPI_TRY( status::get_status_code(i_target, i_data, l_status) );
// Technically many cmds have their own status code decoding..but SUCCESS is always 0.
@@ -92,7 +92,8 @@ inline void fw_status_setup(size_t& o_size,
std::vector<uint8_t>& o_cmd_id)
{
o_size = FW_STATUS_BYTE_LEN;
- o_cmd_id.assign({FW_STATUS});
+ o_cmd_id.clear();
+ o_cmd_id.push_back(FW_STATUS);
}
///
@@ -125,7 +126,16 @@ fapi_try_exit:
inline void boot_config_setup(std::vector<uint8_t>& io_data)
{
+ // Need data length as well - boot config can only ever be written
+ io_data.insert(io_data.begin(), FW_BOOT_CONFIG_BYTE_LEN);
+
+ // Then add the command
io_data.insert(io_data.begin(), FW_BOOT_CONFIG);
+
+ // Written commands need to be in the form of
+ // CMD
+ // DATA LEN
+ // DATA
}
///
OpenPOWER on IntegriCloud