diff options
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_dl_scom.C')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_dl_scom.C | 74 |
1 files changed, 11 insertions, 63 deletions
diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_dl_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_dl_scom.C index 9d2b98c38..1df63d2fa 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_dl_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_ioe_dl_scom.C @@ -37,97 +37,45 @@ constexpr auto literal_0b11 = 0b11; fapi2::ReturnCode p9_fbc_ioe_dl_scom(const fapi2::Target<fapi2::TARGET_TYPE_XBUS>& TGT0) { - fapi2::ReturnCode l_rc = 0; - - do { fapi2::buffer<uint64_t> l_scom_buffer; { - l_rc = fapi2::getScom( TGT0, 0x6011803ull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x6011803ull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x6011803ull, l_scom_buffer )); l_scom_buffer.insert<uint64_t> (literal_0xFFFFFFFFFFFFFFFF, 0, 64, 0 ); - l_rc = fapi2::putScom(TGT0, 0x6011803ull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x6011803ull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x6011803ull, l_scom_buffer)); } { - l_rc = fapi2::getScom( TGT0, 0x601180aull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x601180aull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x601180aull, l_scom_buffer )); constexpr auto l_PB_IOE_LL1_CONFIG_LINK_PAIR_ON = 0x1; l_scom_buffer.insert<uint64_t> (l_PB_IOE_LL1_CONFIG_LINK_PAIR_ON, 0, 1, 63 ); constexpr auto l_PB_IOE_LL1_CONFIG_CRC_LANE_ID_ON = 0x1; l_scom_buffer.insert<uint64_t> (l_PB_IOE_LL1_CONFIG_CRC_LANE_ID_ON, 2, 1, 63 ); - l_rc = fapi2::putScom(TGT0, 0x601180aull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x601180aull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x601180aull, l_scom_buffer)); } { - l_rc = fapi2::getScom( TGT0, 0x6011818ull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x6011818ull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x6011818ull, l_scom_buffer )); l_scom_buffer.insert<uint64_t> (literal_0xE00, 8, 3, 61 ); l_scom_buffer.insert<uint64_t> (literal_0x0000, 32, 16, 48 ); l_scom_buffer.insert<uint64_t> (literal_0x0000, 48, 16, 48 ); l_scom_buffer.insert<uint64_t> (literal_0x0, 4, 4, 60 ); l_scom_buffer.insert<uint64_t> (literal_0x0, 0, 4, 60 ); - l_rc = fapi2::putScom(TGT0, 0x6011818ull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x6011818ull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x6011818ull, l_scom_buffer)); } { - l_rc = fapi2::getScom( TGT0, 0x6011819ull, l_scom_buffer ); - - if (l_rc) - { - FAPI_ERR("ERROR executing: getScom (0x6011819ull)"); - break; - } + FAPI_TRY(fapi2::getScom( TGT0, 0x6011819ull, l_scom_buffer )); l_scom_buffer.insert<uint64_t> (literal_0b11, 8, 2, 62 ); l_scom_buffer.insert<uint64_t> (literal_0x0000, 32, 16, 48 ); l_scom_buffer.insert<uint64_t> (literal_0x0000, 48, 16, 48 ); l_scom_buffer.insert<uint64_t> (literal_0x0, 4, 4, 60 ); l_scom_buffer.insert<uint64_t> (literal_0x0, 0, 4, 60 ); - l_rc = fapi2::putScom(TGT0, 0x6011819ull, l_scom_buffer); - - if (l_rc) - { - FAPI_ERR("ERROR executing: putScom (0x6011819ull)"); - break; - } + FAPI_TRY(fapi2::putScom(TGT0, 0x6011819ull, l_scom_buffer)); } - } - while(0); - - return l_rc; + }; +fapi_try_exit: + return fapi2::current_err; } |