From 45e92544fd56fcb772f6d87060e0a67d19057148 Mon Sep 17 00:00:00 2001 From: dchowe Date: Thu, 8 Jun 2017 17:46:21 -0500 Subject: [PATCH] Fix for cd hotplug initfile Change-Id: Iae93fb2369483251965a8e46942febee8267f131 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41580 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Joseph J. McGill Dev-Ready: Joseph J. McGill Reviewed-by: Jenny Huynh Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41582 Reviewed-by: Hostboot Team Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- .../hwp/initfiles/p9_fbc_cd_hp_scom.C | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp_scom.C b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp_scom.C index 592805a7703..8b84cb07fe7 100644 --- a/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp_scom.C +++ b/src/import/chips/p9/procedures/hwp/initfiles/p9_fbc_cd_hp_scom.C @@ -29,8 +29,6 @@ using namespace fapi2; -constexpr uint64_t literal_0x10 = 0x10; -constexpr uint64_t literal_0b01 = 0b01; constexpr uint64_t literal_0 = 0; constexpr uint64_t literal_6 = 6; constexpr uint64_t literal_5 = 5; @@ -73,6 +71,8 @@ constexpr uint64_t literal_0b11111 = 0b11111; constexpr uint64_t literal_0b111 = 0b111; constexpr uint64_t literal_0x4 = 0x4; constexpr uint64_t literal_0b000 = 0b000; +constexpr uint64_t literal_0b01 = 0b01; +constexpr uint64_t literal_0b11 = 0b11; constexpr uint64_t literal_0x0 = 0x0; constexpr uint64_t literal_0x1 = 0x1; constexpr uint64_t literal_0x2 = 0x2; @@ -87,9 +87,10 @@ constexpr uint64_t literal_0b00 = 0b00; constexpr uint64_t literal_0b0 = 0b0; constexpr uint64_t literal_0b1 = 0b1; constexpr uint64_t literal_0b10 = 0b10; -constexpr uint64_t literal_0b11 = 0b11; constexpr uint64_t literal_0x400 = 0x400; constexpr uint64_t literal_0b010 = 0b010; +constexpr uint64_t literal_0b00010000 = 0b00010000; +constexpr uint64_t literal_0x10 = 0x10; constexpr uint64_t literal_0x141 = 0x141; constexpr uint64_t literal_0x21B = 0x21B; constexpr uint64_t literal_0x30D = 0x30D; @@ -153,14 +154,6 @@ fapi2::ReturnCode p9_fbc_cd_hp_scom(const fapi2::Target l_scom_buffer; - { - if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x6) && (l_chip_ec == 0x10)) ) - { - FAPI_TRY(fapi2::getScom( TGT0, 0x0ull, l_scom_buffer )); - - FAPI_TRY(fapi2::putScom(TGT0, 0x0ull, l_scom_buffer)); - } - } { if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x6) && (l_chip_ec == 0x10)) ) { @@ -487,7 +480,17 @@ fapi2::ReturnCode p9_fbc_cd_hp_scom(const fapi2::Target (); - l_scom_buffer.insert<43, 2, 62, uint64_t>(literal_0b01 ); + + if ((l_def_TRUE == literal_1)) + { + l_scom_buffer.insert<41, 2, 62, uint64_t>(literal_0b01 ); + } + + if ((l_def_TRUE == literal_1)) + { + l_scom_buffer.insert<43, 2, 62, uint64_t>(literal_0b11 ); + } + FAPI_TRY(fapi2::putScom(TGT0, 0x90000d6805011c11ull, l_scom_buffer)); } } @@ -714,7 +717,20 @@ fapi2::ReturnCode p9_fbc_cd_hp_scom(const fapi2::Target (); - l_scom_buffer.insert<20, 8, 56, uint64_t>(literal_0x10 ); + + if (((l_chip_id == 0x5) && (l_chip_ec == 0x20)) || ((l_chip_id == 0x6) && (l_chip_ec == 0x10)) ) + { + if ((l_def_TRUE == literal_1)) + { + l_scom_buffer.insert<20, 8, 56, uint64_t>(literal_0b00010000 ); + } + } + + if (((l_chip_id == 0x5) && (l_chip_ec == 0x10)) ) + { + l_scom_buffer.insert<20, 8, 56, uint64_t>(literal_0x10 ); + } + FAPI_TRY(fapi2::putScom(TGT0, 0x90000ec705011c11ull, l_scom_buffer)); } {