From d6bd1b69780193308c0a8156d2c7e86f0d76ccfe Mon Sep 17 00:00:00 2001 From: Louis Stermole Date: Fri, 21 Jun 2019 15:19:05 -0400 Subject: Increase doorbell polling duration in exp_draminit Change-Id: Icc300f35c727fd484c193388ad9e1e4394fb353f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79343 Tested-by: FSP CI Jenkins Reviewed-by: Mark Pizzutillo Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: STEPHEN GLANCY Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79358 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C') diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C index 9157b1583..e527207cd 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C @@ -538,6 +538,11 @@ fapi_try_exit: /// fapi2::ReturnCode poll_for_response_ready(const fapi2::Target& 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 50 to be safe + constexpr uint64_t NUM_LOOPS = 50; // So, why aren't we using the memory team's polling API? // This is a base function that will be utilized by the platform code @@ -552,7 +557,7 @@ fapi2::ReturnCode poll_for_response_ready(const fapi2::Target(); - FAPI_TRY( fapi2::delay( DELAY_100NS, 200) ); + FAPI_TRY( fapi2::delay(DELAY_100US, 200) ); } FAPI_DBG("%s stopped on loop%u/%u data:0x%016lx %u", -- cgit v1.2.1