diff options
author | Alvin Wang <wangat@tw.ibm.com> | 2019-05-24 04:11:23 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-06-13 09:35:39 -0500 |
commit | dbba2f9d8fe31f408c905e9df49f040fc1949218 (patch) | |
tree | 36a127594b216f49cea9934eb7002138f3919f59 /src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/omi/exp_omi_utils.H | |
parent | 9192b12a33dc07d4a4f3d88c323ac373dd8f6367 (diff) | |
download | talos-hostboot-dbba2f9d8fe31f408c905e9df49f040fc1949218.tar.gz talos-hostboot-dbba2f9d8fe31f408c905e9df49f040fc1949218.zip |
Add OMI_EDPL_DISABLE attribute
Change-Id: I75de2f084824c94eb3f70cc7c0898a8a87c1bf90
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77826
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77834
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Christian R. Geddes <crgeddes@us.ibm.com>
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.H | 45 |
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 { |