diff options
author | Louis Stermole <stermole@us.ibm.com> | 2016-08-22 14:30:14 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2016-08-23 15:08:30 -0400 |
commit | a86d8531ce08dfc5149aa45491a9f3bb079be5cb (patch) | |
tree | 5921c424ef56bd361a075fd111f8b1468587f188 /src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H | |
parent | a5340931cbe312bb0f7e027ea056af765fea604a (diff) | |
download | talos-hostboot-a86d8531ce08dfc5149aa45491a9f3bb079be5cb.tar.gz talos-hostboot-a86d8531ce08dfc5149aa45491a9f3bb079be5cb.zip |
Add AC BOOST API function with dp instance as parameter
Change-Id: I1ade3bb2a24deb20d3f874e8a4606947755bd379
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28633
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Brian R. Silver <bsilver@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28635
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H b/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H index b2c7b98c6..a2832ad5a 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/dp16.H @@ -287,6 +287,43 @@ fapi_try_exit: } /// +/// @brief Read AC_BOOST_CNTL +/// @tparam T fapi2 Target Type - derived +/// @tparam P the type of the std::pair elements +/// @tparam TT traits type defaults to dp16Traits<T> +/// @param[in] i_target the fapi2 target of the port +/// @param[in] i_dp the dp16 instance's index +/// @param[out] o_data the value of both of the the registers (upper and lower bytes) +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok +/// +template< fapi2::TargetType T, typename P, typename TT = dp16Traits<T> > +inline fapi2::ReturnCode read_ac_boost_cntl( const fapi2::Target<T>& i_target, + const uint64_t i_dp, + std::pair<P, P>& o_data ) +{ + switch (i_dp) + { + case(0): + return ( read_ac_boost_cntl<0>( i_target, o_data ) ); + + case(1): + return ( read_ac_boost_cntl<1>( i_target, o_data ) ); + + case(2): + return ( read_ac_boost_cntl<2>( i_target, o_data ) ); + + case(3): + return ( read_ac_boost_cntl<3>( i_target, o_data ) ); + + case(4): + return ( read_ac_boost_cntl<4>( i_target, o_data ) ); + + default: + return fapi2::FAPI2_RC_INVALID_PARAMETER; + } +} + +/// /// @brief Write AC_BOOST_CNTL /// @tparam I DP16 instance /// @tparam T fapi2 Target Type - derived @@ -312,6 +349,43 @@ fapi_try_exit: } /// +/// @brief Write AC_BOOST_CNTL +/// @tparam T fapi2 Target Type - derived +/// @tparam P the type of the std::pair elements +/// @tparam TT traits type defaults to dp16Traits<T> +/// @param[in] i_target the fapi2 target of the port +/// @param[in] i_dp the dp16 instance's index +/// @param[in] i_data the value of both of the the registers (upper and lower bytes) +/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok +/// +template< fapi2::TargetType T, typename P, typename TT = dp16Traits<T> > +inline fapi2::ReturnCode write_ac_boost_cntl( const fapi2::Target<T>& i_target, + const uint64_t i_dp, + const std::pair<P, P>& i_data ) +{ + switch (i_dp) + { + case(0): + return ( write_ac_boost_cntl<0>( i_target, i_data ) ); + + case(1): + return ( write_ac_boost_cntl<1>( i_target, i_data ) ); + + case(2): + return ( write_ac_boost_cntl<2>( i_target, i_data ) ); + + case(3): + return ( write_ac_boost_cntl<3>( i_target, i_data ) ); + + case(4): + return ( write_ac_boost_cntl<4>( i_target, i_data ) ); + + default: + return fapi2::FAPI2_RC_INVALID_PARAMETER; + } +} + +/// /// @brief Reset AC_BOOST_CNTL - for all DP16 in the target /// @tparam T fapi2 Target Type - derived /// @tparam TT traits type defaults to dp16Traits<T> |