From ba07643615871f962b06f4d0eaeb03c1de275844 Mon Sep 17 00:00:00 2001 From: Stephen Glancy Date: Mon, 20 Aug 2018 14:32:40 -0500 Subject: 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 Tested-by: Jenkins Server Reviewed-by: RYAN P. KING Reviewed-by: ANDRE A. MARIN Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68126 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- .../ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H | 14 ++++++++++++-- 1 file 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& 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& 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& 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 } /// -- cgit v1.2.1