summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H
index 1faf02014..3658100b1 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H
@@ -103,6 +103,27 @@ inline bool get_enterprise_config( const fapi2::buffer<uint64_t>& i_data )
return i_data.getBit<EXPLR_MMIO_MENTERP_CFG_ENTERPRISE_MODE>();
}
+
+///
+/// @brief Get edpl enable bit
+/// @param[in] i_data the register data
+/// @return The register's EDPL_ENA bit
+///
+inline bool get_edpl_enable_bit( const fapi2::buffer<uint64_t>& i_data )
+{
+ return i_data.getBit<EXPLR_DLX_DL0_CONFIG1_CFG_EDPL_ENA>();
+}
+
+///
+/// @brief Set edpl enable bit
+/// @param[in,out] io_data the register data
+/// @param[in] i_enable The register's EDPL_ENA bit
+///
+inline void set_edpl_enable_bit( fapi2::buffer<uint64_t>& io_data, const bool i_enable )
+{
+ io_data.writeBit<EXPLR_DLX_DL0_CONFIG1_CFG_EDPL_ENA>(i_enable);
+}
+
///
/// @brief Checks if the enterprise config bit is in the correct mode
/// @param[in] i_target target on which we are operating - for logging
@@ -157,6 +178,30 @@ inline fapi2::ReturnCode write_enterprise_config( const fapi2::Target<fapi2::TAR
return fapi2::putScom(i_target, EXPLR_MMIO_MENTERP, i_data);
}
+///
+/// @brief Reads the EXPLR_DLX_DL0_CONFIG1 register using I2C
+/// @param[in] i_target the OCMB target on which to operate
+/// @param[out] o_data the register contents
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+///
+inline fapi2::ReturnCode read_dlx_config1( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target,
+ fapi2::buffer<uint64_t>& o_data )
+{
+ return fapi2::getScom(i_target, EXPLR_DLX_DL0_CONFIG1, o_data);
+}
+
+///
+/// @brief Writes the EXPLR_DLX_DL0_CONFIG1 register using I2C
+/// @param[in] i_target the OCMB target on which to operate
+/// @param[in] i_data the register contents
+/// @return fapi2::ReturnCode - FAPI2_RC_SUCCESS iff get is OK
+///
+inline fapi2::ReturnCode write_dlx_config1( const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target,
+ const fapi2::buffer<uint64_t>& i_data )
+{
+ return fapi2::putScom(i_target, EXPLR_DLX_DL0_CONFIG1, i_data);
+}
+
namespace train
{
OpenPOWER on IntegriCloud