diff options
author | Jenny Huynh <jhuynh@us.ibm.com> | 2019-05-20 15:49:35 -0400 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-05-22 16:03:13 -0500 |
commit | cf8f5459f14f8429fa967bd58c6d59e9e02eb207 (patch) | |
tree | 36d7f604bb32791501ff691c1dd01740f7d0d0cb /src/import/chips/p9/procedures/hwp/initfiles | |
parent | 6a6b6852f6e29d8931ecf3fd440a37d579998741 (diff) | |
download | talos-hostboot-cf8f5459f14f8429fa967bd58c6d59e9e02eb207.tar.gz talos-hostboot-cf8f5459f14f8429fa967bd58c6d59e9e02eb207.zip |
Fix fabric inits for Axone
ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE is used before it is defined;
since Axone has no plans to configure SMP Alinks, the np2_en setting
can be hardcoded to ON.
Change-Id: I609577e43b0e489681adfeb8398cb85e8c40a102
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77650
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Steven B. Janssen <janssens@us.ibm.com>
Dev-Ready: Steven B. Janssen <janssens@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77659
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/initfiles')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C index ba5d1a069..44bc30c3f 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_no_hp_scom.C @@ -31,8 +31,8 @@ using namespace fapi2; constexpr uint64_t literal_0 = 0; constexpr uint64_t literal_1 = 1; -constexpr uint64_t literal_3 = 3; constexpr uint64_t literal_0x0 = 0x0; +constexpr uint64_t literal_3 = 3; constexpr uint64_t literal_0x3 = 0x3; constexpr uint64_t literal_2 = 2; constexpr uint64_t literal_0x4 = 0x4; @@ -89,8 +89,6 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_ uint64_t l_def_IS_FLAT_8 = (l_TGT1_ATTR_PROC_EPS_TABLE_TYPE == fapi2::ENUM_ATTR_PROC_EPS_TABLE_TYPE_EPS_TYPE_HE_F8); fapi2::ATTR_PROC_FABRIC_PUMP_MODE_Type l_TGT1_ATTR_PROC_FABRIC_PUMP_MODE; FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_PUMP_MODE, TGT1, l_TGT1_ATTR_PROC_FABRIC_PUMP_MODE)); - fapi2::ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_Type l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE; - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE, TGT0, l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE)); fapi2::buffer<uint64_t> l_scom_buffer; { FAPI_TRY(fapi2::getScom( TGT0, 0x501180aull, l_scom_buffer )); @@ -133,16 +131,8 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_ if (((l_chip_id == 0x7) && (l_chip_ec == 0x10)) ) { - if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_SMP)) - { - constexpr auto l_PB_COM_PB_CFG_NP2_EN_OFF = 0x0; - l_scom_buffer.insert<49, 1, 61, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_OFF ); - } - else if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_NV)) - { - constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; - l_scom_buffer.insert<49, 1, 61, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); - } + constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; + l_scom_buffer.insert<49, 1, 61, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); } FAPI_TRY(fapi2::putScom(TGT0, 0x501180aull, l_scom_buffer)); @@ -188,16 +178,8 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_ if (((l_chip_id == 0x7) && (l_chip_ec == 0x10)) ) { - if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_SMP)) - { - constexpr auto l_PB_COM_PB_CFG_NP2_EN_OFF = 0x0; - l_scom_buffer.insert<49, 1, 62, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_OFF ); - } - else if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_NV)) - { - constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; - l_scom_buffer.insert<49, 1, 62, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); - } + constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; + l_scom_buffer.insert<49, 1, 62, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); } FAPI_TRY(fapi2::putScom(TGT0, 0x5011c0aull, l_scom_buffer)); @@ -1745,16 +1727,8 @@ fapi2::ReturnCode p9_fbc_no_hp_scom(const fapi2::Target<fapi2::TARGET_TYPE_PROC_ if (((l_chip_id == 0x7) && (l_chip_ec == 0x10)) ) { - if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_SMP)) - { - constexpr auto l_PB_COM_PB_CFG_NP2_EN_OFF = 0x0; - l_scom_buffer.insert<49, 1, 63, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_OFF ); - } - else if ((l_TGT0_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE[literal_3] == fapi2::ENUM_ATTR_PROC_FABRIC_OPTICS_CONFIG_MODE_NV)) - { - constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; - l_scom_buffer.insert<49, 1, 63, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); - } + constexpr auto l_PB_COM_PB_CFG_NP2_EN_ON = 0x7; + l_scom_buffer.insert<49, 1, 63, uint64_t>(l_PB_COM_PB_CFG_NP2_EN_ON ); } FAPI_TRY(fapi2::putScom(TGT0, 0x501200aull, l_scom_buffer)); |