summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer
diff options
context:
space:
mode:
authorAndre Marin <aamarin@us.ibm.com>2018-09-05 14:51:17 -0500
committerRaja Das <rajadas2@in.ibm.com>2019-07-26 00:52:54 -0500
commitad9f79634896daf649be988c841568aedc09f01c (patch)
tree790b65a96526f5ed1f7443471521984113071a20 /src/import/chips/ocmb/explorer
parent8fb1ba1eb112adcd0a4b6de779ec1fd55e011350 (diff)
downloadtalos-sbe-ad9f79634896daf649be988c841568aedc09f01c.tar.gz
talos-sbe-ad9f79634896daf649be988c841568aedc09f01c.zip
Initial mss_field endian modification
Change-Id: Ie46040843e7007efb9c6595544a156f1f60c962c Original-Change-Id: Ia64288c78b36dc77cd0440a83e859650631e3c06 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65722 Reviewed-by: Louis Stermole <stermole@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'src/import/chips/ocmb/explorer')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H6
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c_fields.H32
2 files changed, 19 insertions, 19 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 3d7ae5c9..46baf760 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
@@ -127,12 +127,12 @@ 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);
+ io_data.push_back(FW_BOOT_CONFIG_BYTE_LEN);
// Then add the command
- io_data.insert(io_data.begin(), FW_BOOT_CONFIG);
+ io_data.push_back(FW_BOOT_CONFIG);
- // Written commands need to be in the form of
+ // Written commands need to be in the form of (MSB first)
// CMD
// DATA LEN
// DATA
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c_fields.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c_fields.H
index df60c4e5..dd9fa1f6 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c_fields.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c_fields.H
@@ -50,25 +50,25 @@ namespace i2c
///
/// @class fields
/// @brief Explorer I2C command fields
+/// @tparam E Endian type
///
struct fields
{
// First value is byte index, then buffer extract start bit, and extract data length
// Part of EXP_FW_BOOT_CONFIG
- static constexpr mss::field_t BOOT_MODE{0, 0, 1};
- static constexpr mss::field_t LANE_MODE{0, 1, 3};
- static constexpr mss::field_t SERDES_FREQ{0, 4, 4};
-
- static constexpr mss::field_t FW_MODE{1, 2, 1};
- static constexpr mss::field_t LOOPBACK_TEST{1, 3, 1};
- static constexpr mss::field_t TRANSPORT_LAYER{1, 4, 2};
- static constexpr mss::field_t DL_LAYER_BOOT_MODE{1, 6, 2};
+ static constexpr mss::field_t<mss::endian::BIG> BOOT_MODE{0, 0, 1};
+ static constexpr mss::field_t<mss::endian::BIG> LANE_MODE{0, 1, 3};
+ static constexpr mss::field_t<mss::endian::BIG> SERDES_FREQ{0, 4, 4};
+ static constexpr mss::field_t<mss::endian::BIG> FW_MODE{1, 2, 1};
+ static constexpr mss::field_t<mss::endian::BIG> LOOPBACK_TEST{1, 3, 1};
+ static constexpr mss::field_t<mss::endian::BIG> TRANSPORT_LAYER{1, 4, 2};
+ static constexpr mss::field_t<mss::endian::BIG> DL_LAYER_BOOT_MODE{1, 6, 2};
// Part of EXP_FW_STATUS
- static constexpr mss::field_t CMD_ID{0, 0, 8};
- static constexpr mss::field_t STATUS_CODE{1, 0, 8};
- static constexpr mss::field_t BOOT_STAGE{2, 6, 2};
+ static constexpr mss::field_t<mss::endian::BIG> CMD_ID{0, 0, 8};
+ static constexpr mss::field_t<mss::endian::BIG> STATUS_CODE{1, 0, 8};
+ static constexpr mss::field_t<mss::endian::BIG> BOOT_STAGE{2, 6, 2};
};
///
@@ -76,7 +76,7 @@ struct fields
/// @brief Traits assoiated with the Explorer I2C commands
/// @tparam F the Explorer I2C field
///
-template < const field_t& F >
+template < const mss::field_t<endian::BIG>& F >
struct fieldTraits;
///
@@ -230,7 +230,7 @@ struct fieldTraits<fields::BOOT_STAGE>
/// @param[out] o_value the output value received
/// @return FAPI2_RC_SUCCESS iff okay
///
-template< const field_t& F,
+template< const mss::field_t<endian::BIG>& F,
typename IT,
typename OT,
typename TT = fieldTraits<F> >
@@ -238,7 +238,7 @@ inline fapi2::ReturnCode get_field(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_C
const std::vector<IT>& i_data,
OT& o_value)
{
- return mss::get_field<F, TT>(i_target, i_data, EXP_I2C_GET_FIELD, o_value);
+ return mss::get_field<endian::BIG, F, TT>(i_target, i_data, EXP_I2C_GET_FIELD, o_value);
}
///
@@ -251,7 +251,7 @@ inline fapi2::ReturnCode get_field(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_C
/// @param[in,out] io_data the buffer as a reference to a vector
/// @return FAPI2_RC_SUCCESS iff okay
///
-template< const field_t& F,
+template< const mss::field_t<endian::BIG>& F,
typename IT,
typename OT,
typename TT = fieldTraits<F> >
@@ -260,7 +260,7 @@ inline fapi2::ReturnCode set_field(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_C
const IT i_value)
{
- return mss::set_field<F, TT>(i_target, i_value, EXP_I2C_SET_FIELD, io_data);
+ return mss::set_field<endian::BIG, F, TT>(i_target, i_value, EXP_I2C_SET_FIELD, io_data);
}
namespace boot_cfg
OpenPOWER on IntegriCloud