Skip to content

Commit

Permalink
Increase timeout for OCMB inband communication doorbell
Browse files Browse the repository at this point in the history
During explorer bringup on firmware we noticed that we are not waiting
nearly long enough for draminit training for complete. We have found that
we needed to poll 18+ times longer with firmware than we did for cronus.
The new max timeout is 4 seconds , we expect on average to poll for about
.36 seconds.

Change-Id: I5bf29b5989761a8afac8a65bde3bec9609b6532b
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/85296
Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/85318
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: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
crgeddes authored and dcrowell77 committed Oct 16, 2019
1 parent b403e67 commit 1629aca
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -515,10 +515,10 @@ fapi_try_exit:
///
fapi2::ReturnCode poll_for_response_ready(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target)
{
// NUM_LOOPS is based on EXP_FW_DDR_PHY_INIT command, which completes in ~10ms in HW.
// We initially delay 8ms, so we should only need to poll for ~2ms here.
// We're waiting 100us between polls, so we should only need about 20 loops here,
// but we make it 200 to be safe
// NUM_LOOPS is based on EXP_FW_DDR_PHY_INIT command, which completes in ~370ms in HW.
// We initially delay 8ms, so we should only need to poll for ~360ms here.
// We're waiting 20ms between polls, so we should only need about 18 loops here,
// but we make it 200 to be safe. Max timeout is (200 x 20ms) = 4 seconds
constexpr uint64_t NUM_LOOPS = 200;

// So, why aren't we using the memory team's polling API?
Expand All @@ -534,7 +534,7 @@ fapi2::ReturnCode poll_for_response_ready(const fapi2::Target<fapi2::TARGET_TYPE
{
FAPI_TRY(fapi2::getScom(i_target, EXPLR_MIPS_TO_OCMB_INTERRUPT_REGISTER1, l_data));
l_doorbell_response = l_data.getBit<EXPLR_MIPS_TO_OCMB_INTERRUPT_REGISTER1_DOORBELL>();
FAPI_TRY(fapi2::delay(DELAY_100US, 200));
FAPI_TRY(fapi2::delay(20 * DELAY_1MS, 200));
}

FAPI_DBG("%s stopped on loop%u/%u data:0x%016lx %u",
Expand Down

0 comments on commit 1629aca

Please sign in to comment.